56 #ifndef OPENMESH_VDPROGMESH_VIEWINGPARAMETERS_HH
57 #define OPENMESH_VDPROGMESH_VIEWINGPARAMETERS_HH
62 #include <OpenMesh/Core/Geometry/VectorT.hh>
63 #include <OpenMesh/Core/Geometry/Plane3d.hh>
82 double modelview_matrix_[16];
85 float tolerance_square_;
98 void increase_tolerance() { tolerance_square_ *= 5.0f; }
99 void decrease_tolerance() { tolerance_square_ /= 5.0f; }
101 float fovy()
const {
return fovy_; }
102 float aspect()
const {
return aspect_; }
103 float tolerance_square()
const {
return tolerance_square_; }
105 void set_fovy(
float _fovy) { fovy_ = _fovy; }
106 void set_aspect(
float _aspect) { aspect_ = _aspect; }
107 void set_tolerance_square(
float _tolerance_square) { tolerance_square_ = _tolerance_square; }
109 const Vec3f& eye_pos()
const {
return eye_pos_; }
110 const Vec3f& right_dir()
const {
return right_dir_; }
111 const Vec3f& up_dir()
const {
return up_dir_; }
112 const Vec3f& view_dir()
const {
return view_dir_; }
113 Vec3f& eye_pos() {
return eye_pos_; }
114 Vec3f& right_dir() {
return right_dir_; }
115 Vec3f& up_dir() {
return up_dir_; }
116 Vec3f& view_dir() {
return view_dir_; }
118 void frustum_planes(
Plane3d _plane[4] )
120 for (
unsigned int i=0; i<4; ++i)
121 _plane[i] = frustum_plane_[i];
124 void get_modelview_matrix(
double _modelview_matrix[16])
126 for (
unsigned int i=0; i<16; ++i)
127 _modelview_matrix[i] = modelview_matrix_[i];
130 void set_modelview_matrix(
const double _modelview_matrix[16])
132 for (
unsigned int i=0; i<16; ++i)
133 modelview_matrix_[i] = _modelview_matrix[i];
136 void update_viewing_configurations();
146 #endif // OPENMESH_VDPROGMESH_VIEWINGPARAMETERS_HH defined
Definition: ViewingParameters.hh:79
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
ax + by + cz + d = 0
Definition: Plane3d.hh:83