46 #ifndef __ophTriMesh_h 47 #define __ophTriMesh_h 139 void setTextureImgDim(
int dim1,
int dim2) { texture.dim[0] = dim1; texture.dim[1] = dim2; }
163 bool readConfig(
const char* fname);
173 bool loadMeshData(
const char* fileName,
const char* ext);
190 void loadTexturePattern(
const char* fileName,
const char* ext);
192 virtual void encoding(
unsigned int ENCODE_FLAG);
200 Real generateHologram(
uint SHADING_FLAG);
202 void reconTest(
const char* fname);
204 void triTimeMultiplexing(
char* dirName,
uint ENCODE_METHOD,
Real cenFx,
Real cenFy,
Real rangeFx,
Real rangeFy,
Real stepFx,
Real stepFy);
215 void setViewingWindow(
bool is_ViewingWindow);
224 void prepareMeshData();
225 void objSort(
bool isAscending);
226 bool checkValidity(
vec3 no);
234 void calGlobalFrequency(
Point* frequency,
Real lambda);
238 void refASInner_flat(
Real* freqTermX,
Real* freqTermY);
239 bool refAS_Continuous(
uint n,
Real* freqTermX,
Real* freqTermY);
240 bool generateAS(
uint SHADING_FLAG);
241 bool findNormals(
uint SHADING_FLAG);
245 bool loadMeshText(
const char* fileName);
247 void initialize_GPU();
248 void generateAS_GPU(
uint SHADING_FLAG);
254 Face* scaledMeshData;
272 bool is_ViewingWindow;
285 Real mesh_local[9] = { 0.0 };
316 const char* meshDataFileName;
324 Real carrierWave[3] = { 0,0,1 };
333 int idxCarr, idxCarrFx, idxCarrFy;
334 cufftDoubleComplex* angularSpectrum_GPU;
335 cufftDoubleComplex* ffttemp;
337 cudaStream_t streamTriMesh;
Face * getScaledMeshData()
SHADING_FLAG
Mesh object data scaling and shifting.
void setOcclusion(bool in)
const vec3 & getObjSize(void)
void setTextureMapping(bool in)
structure for 2-dimensional integer vector and its arithmetic.
Complex< Real > * pattern
void setTexturePeriod(Real in)
void setShadingType(int in)
void setIllumination(vec3 in)
unsigned long long ulonglong
void setIllumination(Real inx, Real iny, Real inz)
Openholo Triangular Mesh based CGH generation.
void setTextureImgDim(int dim1, int dim2)
void setObjShift(vec3 in)
Data for triangular mesh.
Complex< Real > * getAngularSpectrum()
structure for 3-dimensional Real type vector and its arithmetic.
void setRandPhase(bool in)
texture mapping parameters
const vec3 & getIllumination(void)
const vec3 & getObjShift(void)
void setCarrierWave(Real in1, Real in2, Real in3)
virtual ~ophTri(void)
Destructor.