46 #ifndef __ophPointCloud_h 47 #define __ophPointCloud_h 58 #define OPH_Bitsperpixel 8 //24 // 3byte=24 60 #define OPH_Compression 0 61 #define OPH_Xpixelpermeter 0x130B //2835 , 72 DPI 62 #define OPH_Ypixelpermeter 0x130B //2835 , 72 DPI 63 #define OPH_Pixel 0xFF 570 inline void setScale(
Real sx,
Real sy,
Real sz) { pc_config_.scale.v[0] = sx; pc_config_.scale.v[1] = sy; pc_config_.scale.v[2] = sz; }
574 inline void setFocalLength(
Real lens_in,
Real lens_out,
Real lens_eye_piece) { pc_config_.focal_length_lens_in = lens_in; pc_config_.focal_length_lens_out = lens_out; pc_config_.focal_length_lens_eye_piece = lens_eye_piece; }
575 inline void setTiltAngle(
Real ax,
Real ay) { pc_config_.tilt_angle.v[0] = ax; pc_config_.tilt_angle.v[1] = ay; }
579 if (pc_data_.n_points < 1)
return;
580 pc_data_.vertices =
new Vertex[pc_data_.n_points];
581 memcpy(pc_data_.vertices, vertex,
sizeof(
Vertex) * pc_data_.n_points);
591 if (lens_in !=
nullptr) *lens_in = pc_config_.focal_length_lens_in;
592 if (lens_out !=
nullptr) *lens_out = pc_config_.focal_length_lens_out;
593 if (lens_eye_piece !=
nullptr) *lens_eye_piece = pc_config_.focal_length_lens_eye_piece;
628 int loadPointCloud(
const char* pc_file);
637 bool readConfig(
const char* cfg_file);
646 Real generateHologram(
uint diff_flag = PC_DIFF_RS);
652 void encodeHologram(
vec2 band_limit =
vec2(0.8, 0.5),
vec2 spectrum_shift =
vec2(0.0, 0.5));
654 virtual void encoding(
unsigned int ENCODE_FLAG,
unsigned int SSB_PASSBAND);
655 virtual void encoding(
unsigned int ENCODE_FLAG);
666 void setViewingWindow(
bool is_ViewingWindow);
681 void genCghPointCloudCPU(
uint diff_flag);
689 void genCghPointCloudGPU(
uint diff_flag);
692 bool is_ViewingWindow;
698 #endif // !__ophPointCloud_h void setScale(Real sx, Real sy, Real sz)
void setFilterShapeFlag(int8_t *fsf)
void getScale(vec3 &scale)
void setPointCloudModel(Vertex *vertex)
void setTiltAngle(Real ax, Real ay)
void getTiltAngle(vec2 &tiltangle)
void setDistance(Real distance)
void setFocalLength(Real lens_in, Real lens_out, Real lens_eye_piece)
void setNumberOfPoints(ulonglong n_points)
void setFilterWidth(Real wx, Real wy)
unsigned long long ulonglong
void getFocalLength(Real *lens_in, Real *lens_out, Real *lens_eye_piece)
Openholo Point Cloud based Compter-generated holography.
structure for 2-dimensional Real type vector and its arithmetic.
structure for 3-dimensional Real type vector and its arithmetic.
int8_t * getFilterShapeFlag(void)
Configuration for Point Cloud.
ulonglong getNumberOfPoints()
Directly Get Basic Data.
void getFilterWidth(vec2 &filterwidth)
uint * getProgress()
Get the value of a CGH progress status.
Vertex * getPointCloudModel()
Get point cloud vertex data.
bool isCPU()
get the value of a variable generation mode (true or false)