51#ifndef OPENMESH_VDPROGMESH_VIEWINGPARAMETERS_HH
52#define OPENMESH_VDPROGMESH_VIEWINGPARAMETERS_HH
57#include <OpenMesh/Core/Geometry/VectorT.hh>
58#include <OpenMesh/Core/Geometry/Plane3d.hh>
77 double modelview_matrix_[16];
80 float tolerance_square_;
93 void increase_tolerance() { tolerance_square_ *= 5.0f; }
94 void decrease_tolerance() { tolerance_square_ /= 5.0f; }
96 float fovy()
const {
return fovy_; }
97 float aspect()
const {
return aspect_; }
98 float tolerance_square()
const {
return tolerance_square_; }
100 void set_fovy(
float _fovy) { fovy_ = _fovy; }
101 void set_aspect(
float _aspect) { aspect_ = _aspect; }
102 void set_tolerance_square(
float _tolerance_square) { tolerance_square_ = _tolerance_square; }
104 const Vec3f& eye_pos()
const {
return eye_pos_; }
105 const Vec3f& right_dir()
const {
return right_dir_; }
106 const Vec3f& up_dir()
const {
return up_dir_; }
107 const Vec3f& view_dir()
const {
return view_dir_; }
108 Vec3f& eye_pos() {
return eye_pos_; }
109 Vec3f& right_dir() {
return right_dir_; }
110 Vec3f& up_dir() {
return up_dir_; }
111 Vec3f& view_dir() {
return view_dir_; }
113 void frustum_planes(
Plane3d _plane[4] )
115 for (
unsigned int i=0; i<4; ++i)
116 _plane[i] = frustum_plane_[i];
119 void get_modelview_matrix(
double _modelview_matrix[16])
121 for (
unsigned int i=0; i<16; ++i)
122 _modelview_matrix[i] = modelview_matrix_[i];
125 void set_modelview_matrix(
const double _modelview_matrix[16])
127 for (
unsigned int i=0; i<16; ++i)
128 modelview_matrix_[i] = _modelview_matrix[i];
131 void update_viewing_configurations();
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
ax + by + cz + d = 0
Definition: Plane3d.hh:79
Definition: ViewingParameters.hh:75