diff --git a/include/osg/Vec2b b/include/osg/Vec2b index 489273b73..cbeaec157 100644 --- a/include/osg/Vec2b +++ b/include/osg/Vec2b @@ -28,7 +28,7 @@ class Vec2b // Methods are defined here so that they are implicitly inlined - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef signed char value_type; /** Number of vector components. */ @@ -37,6 +37,7 @@ class Vec2b /** Vec member variable. */ value_type _v[2]; + /** Constructor that sets all components of the vector to zero */ Vec2b() { _v[0]=0; _v[1]=0; } Vec2b(value_type r, value_type g) diff --git a/include/osg/Vec2d b/include/osg/Vec2d index b9ddd7178..9b7deb6dd 100644 --- a/include/osg/Vec2d +++ b/include/osg/Vec2d @@ -29,7 +29,7 @@ class Vec2d { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef double value_type; /** Number of vector components. */ @@ -37,6 +37,7 @@ class Vec2d value_type _v[2]; + /** Constructor that sets all components of the vector to zero */ Vec2d() {_v[0]=0.0; _v[1]=0.0;} Vec2d(value_type x,value_type y) { _v[0]=x; _v[1]=y; } @@ -71,7 +72,9 @@ class Vec2d inline value_type x() const { return _v[0]; } inline value_type y() const { return _v[1]; } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]); } /** Dot product. */ diff --git a/include/osg/Vec2f b/include/osg/Vec2f index 0a059df5b..3ae2bd1c9 100644 --- a/include/osg/Vec2f +++ b/include/osg/Vec2f @@ -29,7 +29,7 @@ class Vec2f { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef float value_type; /** Number of vector components. */ @@ -39,6 +39,7 @@ class Vec2f value_type _v[2]; + /** Constructor that sets all components of the vector to zero */ Vec2f() {_v[0]=0.0; _v[1]=0.0;} Vec2f(value_type x,value_type y) { _v[0]=x; _v[1]=y; } @@ -68,7 +69,9 @@ class Vec2f inline value_type x() const { return _v[0]; } inline value_type y() const { return _v[1]; } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]); } /** Dot product. */ diff --git a/include/osg/Vec2s b/include/osg/Vec2s index a8e743c8e..662b02c40 100644 --- a/include/osg/Vec2s +++ b/include/osg/Vec2s @@ -20,7 +20,7 @@ class Vec2s { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef short value_type; /** Number of vector components. */ @@ -28,6 +28,7 @@ class Vec2s value_type _v[2]; + /** Constructor that sets all components of the vector to zero */ Vec2s() { _v[0]=0; _v[1]=0; } Vec2s(value_type x, value_type y) { _v[0] = x; _v[1] = y; } diff --git a/include/osg/Vec3b b/include/osg/Vec3b index 64fb53ba0..53d8522c8 100644 --- a/include/osg/Vec3b +++ b/include/osg/Vec3b @@ -26,7 +26,7 @@ class Vec3b { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef signed char value_type; /** Number of vector components. */ @@ -34,6 +34,7 @@ class Vec3b value_type _v[3]; + /** Constructor that sets all components of the vector to zero */ Vec3b() { _v[0]=0; _v[1]=0; _v[2]=0; } Vec3b(value_type r, value_type g, value_type b) { _v[0]=r; _v[1]=g; _v[2]=b; } diff --git a/include/osg/Vec3d b/include/osg/Vec3d index 4d313f074..3d2cd9b8e 100644 --- a/include/osg/Vec3d +++ b/include/osg/Vec3d @@ -30,7 +30,7 @@ class Vec3d { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef double value_type; /** Number of vector components. */ @@ -38,6 +38,7 @@ class Vec3d value_type _v[3]; + /** Constructor that sets all components of the vector to zero */ Vec3d() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0;} inline Vec3d(const Vec3f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2];} @@ -89,7 +90,9 @@ class Vec3d inline value_type y() const { return _v[1]; } inline value_type z() const { return _v[2]; } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]) || osg::isNaN(_v[2]); } /** Dot product. */ diff --git a/include/osg/Vec3f b/include/osg/Vec3f index 8d4693b44..6c3abf3aa 100644 --- a/include/osg/Vec3f +++ b/include/osg/Vec3f @@ -29,7 +29,7 @@ class Vec3f { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef float value_type; /** Number of vector components. */ @@ -37,6 +37,7 @@ class Vec3f value_type _v[3]; + /** Constructor that sets all components of the vector to zero */ Vec3f() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f;} Vec3f(value_type x,value_type y,value_type z) { _v[0]=x; _v[1]=y; _v[2]=z; } Vec3f(const Vec2f& v2,value_type zz) @@ -84,7 +85,9 @@ class Vec3f inline value_type y() const { return _v[1]; } inline value_type z() const { return _v[2]; } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]) || osg::isNaN(_v[2]); } /** Dot product. */ diff --git a/include/osg/Vec3s b/include/osg/Vec3s index edcf0a24a..ca6cf6a9e 100644 --- a/include/osg/Vec3s +++ b/include/osg/Vec3s @@ -20,7 +20,7 @@ class Vec3s { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef short value_type; /** Number of vector components. */ @@ -28,6 +28,7 @@ class Vec3s value_type _v[3]; + /** Constructor that sets all components of the vector to zero */ Vec3s() { _v[0]=0; _v[1]=0; _v[2]=0; } Vec3s(value_type r, value_type g, value_type b) { _v[0]=r; _v[1]=g; _v[2]=b; } diff --git a/include/osg/Vec4b b/include/osg/Vec4b index 2c8a9fffd..4a0dee6a1 100644 --- a/include/osg/Vec4b +++ b/include/osg/Vec4b @@ -26,7 +26,7 @@ class Vec4b { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef signed char value_type; /** Number of vector components. */ @@ -34,6 +34,7 @@ class Vec4b value_type _v[4]; + /** Constructor that sets all components of the vector to zero */ Vec4b() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } Vec4b(value_type x, value_type y, value_type z, value_type w) diff --git a/include/osg/Vec4d b/include/osg/Vec4d index 14c6569fd..c020ee4a4 100644 --- a/include/osg/Vec4d +++ b/include/osg/Vec4d @@ -29,7 +29,7 @@ class Vec4d { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef double value_type; /** Number of vector components. */ @@ -37,6 +37,7 @@ class Vec4d value_type _v[4]; + /** Constructor that sets all components of the vector to zero */ Vec4d() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0; _v[3]=0.0; } Vec4d(value_type x, value_type y, value_type z, value_type w) @@ -123,7 +124,9 @@ class Vec4d (unsigned int)clampTo((_v[0]*255.0),0.0,255.0); } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]) || osg::isNaN(_v[2]) || osg::isNaN(_v[3]); } /** Dot product. */ diff --git a/include/osg/Vec4f b/include/osg/Vec4f index 70f416030..507e3695b 100644 --- a/include/osg/Vec4f +++ b/include/osg/Vec4f @@ -28,7 +28,7 @@ class Vec4f { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef float value_type; /** Number of vector components. */ @@ -39,6 +39,7 @@ class Vec4f // Methods are defined here so that they are implicitly inlined + /** Constructor that sets all components of the vector to zero */ Vec4f() { _v[0]=0.0f; _v[1]=0.0f; _v[2]=0.0f; _v[3]=0.0f;} Vec4f(value_type x, value_type y, value_type z, value_type w) @@ -119,7 +120,9 @@ class Vec4f (unsigned int)clampTo((_v[0]*255.0f),0.0f,255.0f); } + /** Returns true if all components have values that are not NaN. */ inline bool valid() const { return !isNaN(); } + /** Returns true if at least one component has value NaN. */ inline bool isNaN() const { return osg::isNaN(_v[0]) || osg::isNaN(_v[1]) || osg::isNaN(_v[2]) || osg::isNaN(_v[3]); } /** Dot product. */ diff --git a/include/osg/Vec4s b/include/osg/Vec4s index 1e1ded4ae..85cf984cb 100644 --- a/include/osg/Vec4s +++ b/include/osg/Vec4s @@ -26,7 +26,7 @@ class Vec4s { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef short value_type; /** Number of vector components. */ @@ -35,6 +35,7 @@ class Vec4s /** Vec member variable. */ value_type _v[4]; + /** Constructor that sets all components of the vector to zero */ Vec4s() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } Vec4s(value_type x, value_type y, value_type z, value_type w) diff --git a/include/osg/Vec4ub b/include/osg/Vec4ub index 9d6467a80..ea139ea35 100644 --- a/include/osg/Vec4ub +++ b/include/osg/Vec4ub @@ -28,7 +28,7 @@ class Vec4ub { public: - /** Type of Vec class.*/ + /** Data type of vector components.*/ typedef unsigned char value_type; /** Number of vector components. */ @@ -36,7 +36,8 @@ class Vec4ub /** Vec member variable. */ value_type _v[4]; - + + /** Constructor that sets all components of the vector to zero */ Vec4ub() { _v[0]=0; _v[1]=0; _v[2]=0; _v[3]=0; } Vec4ub(value_type x, value_type y, value_type z, value_type w)