Added default values in the constructors of Vec2,Vec3,Vec4 and Quat

default constructors.
This commit is contained in:
Robert Osfield 2002-05-07 11:08:12 +00:00
parent b3979fa647
commit c47e082fa8
4 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class SG_EXPORT Quat
---------------------------------------------------------- */ ---------------------------------------------------------- */
Vec4 _fv; // a four-vector Vec4 _fv; // a four-vector
Quat() {} Quat(): _fv(0.0f,0.0f,0.0f,1.0f) {}
Quat( float x, float y, float z, float w ): _fv(x,y,z,w) {} Quat( float x, float y, float z, float w ): _fv(x,y,z,w) {}
Quat( const Vec4& v ): _fv(v) {} Quat( const Vec4& v ): _fv(v) {}

View File

@ -22,7 +22,7 @@ class Vec2
{ {
public: public:
Vec2() {} // no operations done to maintain speed Vec2() {_v[0]=0.0f; _v[1]=0.0f;}
Vec2(float x,float y) { _v[0]=x; _v[1]=y; } Vec2(float x,float y) { _v[0]=x; _v[1]=y; }
float _v[2]; float _v[2];

View File

@ -21,7 +21,7 @@ class Vec3
{ {
public: public:
Vec3() {} // no operations done to maintain speed Vec3() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f;}
Vec3(float x,float y,float z) { _v[0]=x; _v[1]=y; _v[2]=z; } Vec3(float x,float y,float z) { _v[0]=x; _v[1]=y; _v[2]=z; }
float _v[3]; float _v[3];

View File

@ -23,7 +23,7 @@ class Vec4
// Methods are defined here so that they are implicitly inlined // Methods are defined here so that they are implicitly inlined
Vec4() {} // no operations done to maintain speed Vec4() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f; _v[3]=0.0f;}
Vec4(float x, float y, float z, float w) Vec4(float x, float y, float z, float w)
{ {
_v[0]=x; _v[1]=y; _v[2]=z; _v[3]=w; _v[0]=x; _v[1]=y; _v[2]=z; _v[3]=w;