From c47e082fa8caa8201dd1a1310f362f63d31909b9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 7 May 2002 11:08:12 +0000 Subject: [PATCH] Added default values in the constructors of Vec2,Vec3,Vec4 and Quat default constructors. --- include/osg/Quat | 2 +- include/osg/Vec2 | 2 +- include/osg/Vec3 | 2 +- include/osg/Vec4 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osg/Quat b/include/osg/Quat index 03d9bf20b..a9f796f80 100644 --- a/include/osg/Quat +++ b/include/osg/Quat @@ -29,7 +29,7 @@ class SG_EXPORT Quat ---------------------------------------------------------- */ 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( const Vec4& v ): _fv(v) {} diff --git a/include/osg/Vec2 b/include/osg/Vec2 index 79b18a270..c74a8c449 100644 --- a/include/osg/Vec2 +++ b/include/osg/Vec2 @@ -22,7 +22,7 @@ class Vec2 { 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; } float _v[2]; diff --git a/include/osg/Vec3 b/include/osg/Vec3 index 932d0eb7b..1b24f2de0 100644 --- a/include/osg/Vec3 +++ b/include/osg/Vec3 @@ -21,7 +21,7 @@ class Vec3 { 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; } float _v[3]; diff --git a/include/osg/Vec4 b/include/osg/Vec4 index f81109c56..15c8d4735 100644 --- a/include/osg/Vec4 +++ b/include/osg/Vec4 @@ -23,7 +23,7 @@ class Vec4 // 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) { _v[0]=x; _v[1]=y; _v[2]=z; _v[3]=w;