- fixed RenderingModalityGLOptions init bug

This commit is contained in:
Guido Ranzuglia 2016-08-31 13:45:11 +02:00
parent eacb3c0d46
commit 5c72790884
4 changed files with 16 additions and 4 deletions

View File

@ -138,7 +138,13 @@ public:
void operator*=( const T k ); void operator*=( const T k );
template <class Matrix44Type> template <class Matrix44Type>
void ToMatrix(Matrix44Type & m) const {for(int i = 0; i < 16; i++) m.V()[i]=V()[i];} void ToMatrix(Matrix44Type & m) const
{
for(int i = 0; i < 16; i++)
{
m.V()[i]= V()[i];
}
}
void ToEulerAngles(T &alpha, T &beta, T &gamma); void ToEulerAngles(T &alpha, T &beta, T &gamma);

View File

@ -75,7 +75,7 @@ public:
RotoType rot; // rotation RotoType rot; // rotation
Point3<S> tra; // viewpoint Point3<S> tra; // viewpoint
public: public:
ReferenceFrame(){} ReferenceFrame():rot(),tra(){}
void SetIdentity(){ rot.SetIdentity(); tra = Point3<S>(0.0,0.0,0.0);} void SetIdentity(){ rot.SetIdentity(); tra = Point3<S>(0.0,0.0,0.0);}
void SetTra(const Point3<S> & tr) {tra = tr;} void SetTra(const Point3<S> & tr) {tra = tr;}
@ -87,18 +87,21 @@ public:
Camera<S> Intrinsics; // the camera that made the shot Camera<S> Intrinsics; // the camera that made the shot
ReferenceFrame<S,RotationType> Extrinsics; // the position and orientation of the camera ReferenceFrame<S,RotationType> Extrinsics; // the position and orientation of the camera
Shot(const Camera<S> &i, const ReferenceFrame<S,RotationType> &e) Shot(const Camera<S> &i, const ReferenceFrame<S,RotationType> &e)
:Intrinsics(),Extrinsics()
{ {
Intrinsics = i; Intrinsics = i;
Extrinsics = e; Extrinsics = e;
} }
Shot(const Camera<S> &c) Shot(const Camera<S> &c)
:Intrinsics(),Extrinsics()
{ {
Intrinsics = c; Intrinsics = c;
Extrinsics.SetIdentity(); Extrinsics.SetIdentity();
} }
Shot() Shot()
:Intrinsics(),Extrinsics()
{ {
Extrinsics.SetIdentity(); Extrinsics.SetIdentity();
} }

View File

@ -288,6 +288,7 @@ namespace vcg
} }
}; };
protected: protected:
struct INT_ATT_NAMES : public ATT_NAMES struct INT_ATT_NAMES : public ATT_NAMES
{ {

View File

@ -75,19 +75,21 @@ namespace vcg
RenderingModalityGLOptions() RenderingModalityGLOptions()
{ {
_perbbox_enabled = false; _perbbox_enabled = false;
_perbbox_fixed_color_enabled = true; _perbbox_fixed_color_enabled = true;
_perpoint_fixed_color_enabled = false; _perpoint_fixed_color_enabled = false;
_perwire_fixed_color_enabled = true; _perwire_fixed_color_enabled = true;
_persolid_fixed_color_enabled = true;
_perbbox_fixed_color = vcg::Color4b(Color4b::White); _perbbox_fixed_color = vcg::Color4b(Color4b::White);
_perpoint_fixed_color = vcg::Color4b(Color4b::White); _perpoint_fixed_color = vcg::Color4b(Color4b::White);
_perwire_fixed_color = Color4b(Color4b::DarkGray); _perwire_fixed_color = Color4b(Color4b::DarkGray);
_persolid_fixed_color = vcg::Color4b(Color4b::White); _persolid_fixed_color = vcg::Color4b(Color4b::White);
_persolid_fixed_color_enabled = false;
_perbbox_mesh_color_enabled = false; _perbbox_mesh_color_enabled = false;
_perpoint_mesh_color_enabled = false; _perpoint_mesh_color_enabled = false;
_perwire_mesh_color_enabled = false; _perwire_mesh_color_enabled = false;
_persolid_mesh_color_enabled = false;
_perpoint_dot_enabled = false; _perpoint_dot_enabled = false;