46 #ifndef __ophTriMesh_h 47 #define __ophTriMesh_h 73 Complex<Real>* pattern;
129 const char* meshDataFileName;
134 Complex<Real>* angularSpectrum;
142 Real carrierWave[3] = { 0,0,1 };
182 bool readConfig(
const char* fname);
192 bool loadMeshData(
const char* fileName,
const char* ext);
209 void loadTexturePattern(
const char* fileName,
const char* ext);
217 bool generateHologram(
uint SHADING_FLAG);
219 void reconTest(
const char* fname);
222 int idxCarr, idxCarrFx, idxCarrFy;
223 void triTimeMultiplexing(
char* dirName,
uint ENCODE_METHOD,
Real cenFx,
Real cenFy,
Real rangeFx,
Real rangeFy,
Real stepFx,
Real stepFy);
234 void setViewingWindow(
bool is_ViewingWindow);
243 void prepareMeshData();
244 void objSort(
bool isAscending);
245 bool checkValidity(vec3 no);
246 bool findGeometricalRelations(
Real* mesh, vec3 no,
geometric& geom);
247 void calGlobalFrequency(
Real** frequency);
250 void refASInner_flat(
Real* freqTermX,
Real* freqTermY);
251 bool refAS_Continuous(
uint n,
Real* freqTermX,
Real* freqTermY);
252 bool generateAS(
uint SHADING_FLAG);
253 bool findNormals(
uint SHADING_FLAG);
256 bool loadMeshText(
const char* fileName);
258 void initialize_GPU();
259 void generateAS_GPU(
uint SHADING_FLAG);
260 void refAS_GPU(
int idx,
int ch,
uint SHADING_FLAG);
263 void conv_fft2_scale(Complex<Real>* src1, Complex<Real>* src2, Complex<Real>* dst, ivec2 size);
266 Real* scaledMeshData;
282 Complex<Real>* refAS;
291 Real mesh_local[9] = { 0.0 };
306 Complex<Real> refTerm1;
307 Complex<Real> refTerm2;
308 Complex<Real> refTerm3;
316 Complex<Real>* rearAS;
317 Complex<Real>* convol;
320 Complex<Real>* phaseTerm;
322 bool is_ViewingWindow;
325 Complex<Real>* textFFT;
328 Complex<Real> refTemp;
ulonglong n_faces
The number of faces in object.
SHADING_FLAG
Mesh object data scaling and shifting.
void setOcclusion(bool in)
const vec3 & getObjSize(void)
void setTextureMapping(bool in)
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)
Real * getScaledMeshData()
void setObjShift(vec3 in)
Data for triangular mesh.
Complex< Real > * getAngularSpectrum()
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.