From ac2bdbda30f1237c30df686eef5d9e1b8215251e Mon Sep 17 00:00:00 2001
From: Don BURNS
Date: Wed, 19 Sep 2001 23:52:12 +0000
Subject: [PATCH] 1) new implementation of the osg::Matrix class. Note
details below. 2) cleaned up osg::Timer, still in progress. My intent has
been to pave the way for support for other OS's. 3) new
osg::FrameStamp class which has a frame number, reference time for each
frame to be app, culled and drawn. The FrameStamp also can be passed to
other machines (i.e. cluster) and the FrameStamp can be used with the
slaves own app,cull and draw. I've also added the beginings of a
calander time data to the FrameStamp to allow time or day and year to be
used in setting up position of sun/moon etc. etc. 4) The osg::State
now has contains a pointer to the last applied osg::Camera and the
current osg::FrameStamp, so that drawables can use both pieces of
information for creating effects such CLOD, earth/sky etc. The
osg::NodeVisitor also now allows you to attach a FrameStamp to support
syncronization of actions on the scene graph.
---
doc/doc++/osg/FrameStamp.html | 192 +++++++++++
doc/doc++/osg/MatrixNew.html | 503 ++++++++++++++++++++++++++++
doc/doc++/osg/MatrixNewProduct.html | 51 +++
doc/doc++/osg/MatrixOld.html | 367 ++++++++++++++++++++
include/osg/FrameStamp | 66 ++++
src/osg/FrameStamp.cpp | 74 ++++
6 files changed, 1253 insertions(+)
create mode 100644 doc/doc++/osg/FrameStamp.html
create mode 100644 doc/doc++/osg/MatrixNew.html
create mode 100644 doc/doc++/osg/MatrixNewProduct.html
create mode 100644 doc/doc++/osg/MatrixOld.html
create mode 100644 include/osg/FrameStamp
create mode 100644 src/osg/FrameStamp.cpp
diff --git a/doc/doc++/osg/FrameStamp.html b/doc/doc++/osg/FrameStamp.html
new file mode 100644
index 000000000..e24f4ec49
--- /dev/null
+++ b/doc/doc++/osg/FrameStamp.html
@@ -0,0 +1,192 @@
+
+
+
+
+ class SG_EXPORT osg::FrameStamp
+
+
+
+
+Class which encapsulates the frame number, reference time and calander time of specific frame, used to synchonize operations on the scene graph and other machines when using a graphics cluster.
+
+
+Inheritance:
+
+
+
+
+
+Public Methods
-
+ FrameStamp()
+
-
+ FrameStamp(const FrameStamp& fs)
+
-
+ ~FrameStamp()
+
-
+FrameStamp& operator = (const FrameStamp& fs)
+
-
+void setFrameNumber(int fnum)
+
-
+int getFrameNumber() const
+
-
+void setReferenceTime(double refTime)
+
-
+double getReferenceTime() const
+
-
+void setCalanderTime(const tm& calanderTime)
+
-
+void getCalanderTime(tm& calanderTime) const
+
+
+
+Protected Fields
-
+int _frameNumber
+
-
+double _referenceTime
+
-
+int tm_sec
+
-
+int tm_min
+
-
+int tm_hour
+
-
+int tm_mday
+
-
+int tm_mon
+
-
+int tm_year
+
-
+int tm_wday
+
-
+int tm_yday
+
-
+int tm_isdst
+
+
+
+
+
+
+Public Methods
-
+inline void ref() const
+
-
+inline void unref() const
+
-
+inline const int referenceCount() const
+
+
+
+Protected Fields
-
+mutable int _refCount
+
+
+
+
+
+
+Documentation
+Class which encapsulates the frame number, reference time and calander
+time of specific frame, used to synchonize operations on the scene graph
+and other machines when using a graphics cluster. Note the calander
+time can be an artificial simulation time or capture the real time
+of day etc.
+
+
+
+
+- FrameStamp()
+
+
+
+
- FrameStamp(const FrameStamp& fs)
+
+
+
+
- ~FrameStamp()
+
+
+
+
- FrameStamp& operator = (const FrameStamp& fs)
+
+
+
+
- void setFrameNumber(int fnum)
+
+
+
+
- int getFrameNumber() const
+
+
+
+
- void setReferenceTime(double refTime)
+
+
+
+
- double getReferenceTime() const
+
+
+
+
- void setCalanderTime(const tm& calanderTime)
+
+
+
+
- void getCalanderTime(tm& calanderTime) const
+
+
+
+
- int _frameNumber
+
+
+
+
- double _referenceTime
+
+
+
+
- int tm_sec
+
+
+
+
- int tm_min
+
+
+
+
- int tm_hour
+
+
+
+
- int tm_mday
+
+
+
+
- int tm_mon
+
+
+
+
- int tm_year
+
+
+
+
- int tm_wday
+
+
+
+
- int tm_yday
+
+
+
+
- int tm_isdst
+
+
+
- This class has no child classes.
+
+
Alphabetic index HTML hierarchy of classes or Java
+
+This page was generated with the help of DOC++.
+
+
diff --git a/doc/doc++/osg/MatrixNew.html b/doc/doc++/osg/MatrixNew.html
new file mode 100644
index 000000000..c84b546f2
--- /dev/null
+++ b/doc/doc++/osg/MatrixNew.html
@@ -0,0 +1,503 @@
+
+
+
+
+ class SG_EXPORT osg::MatrixNew
+
+
+
+
+
+
+Inheritance:
+
+
+
+
+
+Public Fields
-
+float _mat[4][4]
+
-
+bool fully_realized
+
+
+
+Public Methods
-
+ META_Object(MatrixNew)
+
-
+ MatrixNew()
+
-
+ MatrixNew( const MatrixNew& other )
+
-
+explicit MatrixNew( float const* const def )
+
-
+ MatrixNew( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
-
+virtual ~MatrixNew()
+
-
+MatrixNew& operator = (const MatrixNew& )
+
-
+int compare(const MatrixNew& m) const
+
-
+bool operator < (const MatrixNew& m) const
+
-
+bool operator == (const MatrixNew& m) const
+
-
+bool operator != (const MatrixNew& m) const
+
-
+inline float& operator()(int col, int row)
+
-
+inline float operator()(int col, int row) const
+
-
+void set( float const* const )
+
-
+void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
-
+const float* values()
+
-
+void makeIdent()
+
-
+void makeScale( const Vec3& )
+
-
+void makeScale( float, float, float )
+
-
+void makeTrans( const Vec3& )
+
-
+void makeTrans( float, float, float )
+
-
+void makeRot( const Vec3& from, const Vec3& to )
+
-
+void makeRot( float angle, const Vec3& orientation )
+
-
+void makeRot( float angle, float x, float y, float z )
+
-
+void makeRot( const Quat& )
+
-
+void makeRot( float, float, float )
+
-
+bool invert( const MatrixNew& )
+
-
+bool invertAffine( const MatrixNew& )
+
-
+static MatrixNew scale( const Vec3& )
+
-
+static MatrixNew scale( float, float, float )
+
-
+static MatrixNew trans( const Vec3& )
+
-
+static MatrixNew trans( float, float, float )
+
-
+static MatrixNew rotate( const Vec3&, const Vec3& )
+
-
+static MatrixNew rotate( float, float, float, float )
+
-
+static MatrixNew rotate( const Quat& )
+
-
+void setTrans( float tx, float ty, float tz )
+
-
+void setTrans( const Vec3& v )
+
-
+Vec3 getTrans() const
+
-
+void copy( const MatrixNew& )
+
-
+void preScale( float sx, float sy, float sz, const MatrixNew& m )
+
-
+void postScale( const MatrixNew& m, float sx, float sy, float sz )
+
-
+void preScale( float sx, float sy, float sz )
+
-
+void postScale( float sx, float sy, float sz )
+
-
+void preTrans( float tx, float ty, float tz, const MatrixNew& m )
+
-
+void postTrans( const MatrixNew& m, float tx, float ty, float tz )
+
-
+void preTrans( float tx, float ty, float tz)
+
-
+void postTrans( float tx, float ty, float tz )
+
-
+void preRot( float deg, float x, float y, float z, const MatrixNew& m )
+
-
+void postRot( const MatrixNew& m, float deg, float x, float y, float z )
+
-
+void preRot( float deg, float x, float y, float z )
+
-
+void postRot( float deg, float x, float y, float z )
+
-
+inline static Vec3 transform3x3(const Vec3& v, const MatrixNew& m)
+
- apply apply an 3x3 transform of v*M[02,02]
+
-
+inline static Vec3 transform3x3(const MatrixNew& m, const Vec3& v)
+
- apply apply an 3x3 transform of M[02,02]*v
+
-
+void mult( const MatrixNew&, const MatrixNew& )
+
- nd of Deprecated methods
+
-
+void preMult( const MatrixNew& )
+
-
+void postMult( const MatrixNew& )
+
-
+inline MatrixNewProduct operator * ( const MatrixNew& other ) const
+
-
+inline void operator *= ( const MatrixNew& other )
+
-
+inline void operator = ( const MatrixNewProduct& p )
+
-
+ MatrixNew( const MatrixNewProduct& p )
+
-
+inline Vec3 postMult( const Vec3& v ) const
+
-
+inline Vec3 preMult( const Vec3& v ) const
+
-
+inline Vec4 postMult( const Vec4& v ) const
+
-
+inline Vec4 preMult( const Vec4& v ) const
+
-
+inline Vec3 transform3x3(const Vec3& v, const MatrixNew& m)
+
-
+inline Vec3 transform3x3(const MatrixNew& m, const Vec3& v)
+
-
+inline Vec3 operator* (const Vec3& v) const
+
-
+inline Vec4 operator* (const Vec4& v) const
+
+
+
+Public Members
-
+class MatrixNewProduct
+
+
+
+
Inherited from Object:
+
+
+Public Methods
-
+virtual Object* clone() const
+
-
+virtual bool isSameKindAs(const Object*) const
+
-
+virtual const char* className() const
+
+
+
+
+
+
+Public Methods
-
+inline void ref() const
+
-
+inline void unref() const
+
-
+inline const int referenceCount() const
+
+
+
+Protected Fields
-
+mutable int _refCount
+
+
+
+
+
+
+Documentation
+
+
+
+
+- float _mat[4][4]
+
+
+
+
- bool fully_realized
+
+
+
+
- META_Object(MatrixNew)
+
+
+
+
- MatrixNew()
+
+
+
+
- MatrixNew( const MatrixNew& other )
+
+
+
+
- explicit MatrixNew( float const* const def )
+
+
+
+
- MatrixNew( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
+
+
+
- virtual ~MatrixNew()
+
+
+
+
- MatrixNew& operator = (const MatrixNew& )
+
+
+
+
- int compare(const MatrixNew& m) const
+
+
+
+
- bool operator < (const MatrixNew& m) const
+
+
+
+
- bool operator == (const MatrixNew& m) const
+
+
+
+
- bool operator != (const MatrixNew& m) const
+
+
+
+
- inline float& operator()(int col, int row)
+
+
+
+
- inline float operator()(int col, int row) const
+
+
+
+
- void set( float const* const )
+
+
+
+
- void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
+
+
+
- const float* values()
+
+
+
+
- void makeIdent()
+
+
+
+
- void makeScale( const Vec3& )
+
+
+
+
- void makeScale( float, float, float )
+
+
+
+
- void makeTrans( const Vec3& )
+
+
+
+
- void makeTrans( float, float, float )
+
+
+
+
- void makeRot( const Vec3& from, const Vec3& to )
+
+
+
+
- void makeRot( float angle, const Vec3& orientation )
+
+
+
+
- void makeRot( float angle, float x, float y, float z )
+
+
+
+
- void makeRot( const Quat& )
+
+
+
+
- void makeRot( float, float, float )
+
+
+
+
- bool invert( const MatrixNew& )
+
+
+
+
- bool invertAffine( const MatrixNew& )
+
+
+
+
- static MatrixNew scale( const Vec3& )
+
+
+
+
- static MatrixNew scale( float, float, float )
+
+
+
+
- static MatrixNew trans( const Vec3& )
+
+
+
+
- static MatrixNew trans( float, float, float )
+
+
+
+
- static MatrixNew rotate( const Vec3&, const Vec3& )
+
+
+
+
- static MatrixNew rotate( float, float, float, float )
+
+
+
+
- static MatrixNew rotate( const Quat& )
+
+
+
+
- void setTrans( float tx, float ty, float tz )
+
+
+
+
- void setTrans( const Vec3& v )
+
+
+
+
- Vec3 getTrans() const
+
+
+
+
- void copy( const MatrixNew& )
+
+
+
+
- void preScale( float sx, float sy, float sz, const MatrixNew& m )
+
+
+
+
- void postScale( const MatrixNew& m, float sx, float sy, float sz )
+
+
+
+
- void preScale( float sx, float sy, float sz )
+
+
+
+
- void postScale( float sx, float sy, float sz )
+
+
+
+
- void preTrans( float tx, float ty, float tz, const MatrixNew& m )
+
+
+
+
- void postTrans( const MatrixNew& m, float tx, float ty, float tz )
+
+
+
+
- void preTrans( float tx, float ty, float tz)
+
+
+
+
- void postTrans( float tx, float ty, float tz )
+
+
+
+
- void preRot( float deg, float x, float y, float z, const MatrixNew& m )
+
+
+
+
- void postRot( const MatrixNew& m, float deg, float x, float y, float z )
+
+
+
+
- void preRot( float deg, float x, float y, float z )
+
+
+
+
- void postRot( float deg, float x, float y, float z )
+
+
+
+
- inline static Vec3 transform3x3(const Vec3& v, const MatrixNew& m)
+
- apply apply an 3x3 transform of v*M[02,02]
+
+
+
+
- inline static Vec3 transform3x3(const MatrixNew& m, const Vec3& v)
+
- apply apply an 3x3 transform of M[02,02]*v
+
+
+
+
- void mult( const MatrixNew&, const MatrixNew& )
+
- nd of Deprecated methods
+
+
+
+
- void preMult( const MatrixNew& )
+
+
+
+
- void postMult( const MatrixNew& )
+
+
+
+
- inline MatrixNewProduct operator * ( const MatrixNew& other ) const
+
+
+
+
- inline void operator *= ( const MatrixNew& other )
+
+
+
+
- inline void operator = ( const MatrixNewProduct& p )
+
+
+
+
- MatrixNew( const MatrixNewProduct& p )
+
+
+
+
- inline Vec3 postMult( const Vec3& v ) const
+
+
+
+
- inline Vec3 preMult( const Vec3& v ) const
+
+
+
+
- inline Vec4 postMult( const Vec4& v ) const
+
+
+
+
- inline Vec4 preMult( const Vec4& v ) const
+
+
+
+
- inline Vec3 transform3x3(const Vec3& v, const MatrixNew& m)
+
+
+
+
- inline Vec3 transform3x3(const MatrixNew& m, const Vec3& v)
+
+
+
+
- inline Vec3 operator* (const Vec3& v) const
+
+
+
+
- inline Vec4 operator* (const Vec4& v) const
+
+
+
- This class has no child classes.
+
+
Alphabetic index HTML hierarchy of classes or Java
+
+This page was generated with the help of DOC++.
+
+
diff --git a/doc/doc++/osg/MatrixNewProduct.html b/doc/doc++/osg/MatrixNewProduct.html
new file mode 100644
index 000000000..8148d2dc3
--- /dev/null
+++ b/doc/doc++/osg/MatrixNewProduct.html
@@ -0,0 +1,51 @@
+
+
+
+
+ class osg::MatrixNew::MatrixNewProduct
+
+
+
+
+
+
+
+
+Public Fields
-
+const MatrixNew& A
+
-
+const MatrixNew& B
+
+
+
+Public Methods
-
+ MatrixNewProduct( const MatrixNew& lhs, const MatrixNew& rhs )
+
+
+
+
+
+
+Documentation
+
+
+
+
+- const MatrixNew& A
+
+
+
+
- const MatrixNew& B
+
+
+
+
- MatrixNewProduct( const MatrixNew& lhs, const MatrixNew& rhs )
+
+
+
- This class has no child classes.
+
+
Alphabetic index HTML hierarchy of classes or Java
+
+This page was generated with the help of DOC++.
+
+
diff --git a/doc/doc++/osg/MatrixOld.html b/doc/doc++/osg/MatrixOld.html
new file mode 100644
index 000000000..4dbc54413
--- /dev/null
+++ b/doc/doc++/osg/MatrixOld.html
@@ -0,0 +1,367 @@
+
+
+
+
+ class SG_EXPORT osg::MatrixOld
+
+
+
+
+4x4 MatrixOld for storage & manipulation of transformations in scene graph.
+
+
+Inheritance:
+
+
+
+
+
+Public Fields
-
+float _mat[4][4]
+
+
+
+Public Methods
-
+ MatrixOld()
+
-
+ MatrixOld(const MatrixOld& MatrixOld)
+
-
+ MatrixOld( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
-
+MatrixOld& operator = (const MatrixOld& MatrixOld)
+
-
+virtual ~MatrixOld()
+
-
+virtual Object* clone() const
+
-
+virtual bool isSameKindAs(const Object* obj) const
+
-
+virtual const char* className() const
+
-
+int compare(const MatrixOld& m) const
+
-
+bool operator < (const MatrixOld& m) const
+
-
+bool operator == (const MatrixOld& m) const
+
-
+bool operator != (const MatrixOld& m) const
+
-
+void makeIdent()
+
-
+void set(const float* m)
+
-
+void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
-
+void copy(const MatrixOld& MatrixOld)
+
-
+void makeScale(float sx, float sy, float sz)
+
-
+void preScale( float sx, float sy, float sz, const MatrixOld& m )
+
-
+void postScale( const MatrixOld& m, float sx, float sy, float sz )
+
-
+void preScale( float sx, float sy, float sz )
+
-
+void postScale( float sx, float sy, float sz )
+
-
+void makeTrans( float tx, float ty, float tz )
+
-
+void preTrans( float tx, float ty, float tz, const MatrixOld& m )
+
-
+void postTrans( const MatrixOld& m, float tx, float ty, float tz )
+
-
+void preTrans( float tx, float ty, float tz )
+
-
+void postTrans( float tx, float ty, float tz )
+
-
+void makeRot( const Vec3& old_vec, const Vec3& new_vec )
+
- Calc the rotation MatrixOld which aligns vector \a old_vec with vector \a new_vec.
+
-
+void makeRot( float deg, float x, float y, float z )
+
-
+void preRot( float deg, float x, float y, float z, const MatrixOld& m )
+
-
+void postRot( const MatrixOld& m, float deg, float x, float y, float z )
+
-
+void preRot( float deg, float x, float y, float z )
+
-
+void postRot( float deg, float x, float y, float z )
+
-
+void setTrans( float tx, float ty, float tz )
+
-
+void setTrans( const Vec3& v )
+
-
+Vec3 getTrans() const
+
-
+void preMult(const MatrixOld& m)
+
-
+void postMult(const MatrixOld& m)
+
-
+void mult(const MatrixOld& lhs, const MatrixOld& rhs)
+
-
+MatrixOld operator * (const MatrixOld& m) const
+
-
+inline static Vec3 transform3x3(const Vec3& v, const MatrixOld& m)
+
- apply apply an 3x3 transform of v*M[02,02]
+
-
+inline static Vec3 transform3x3(const MatrixOld& m, const Vec3& v)
+
- apply apply an 3x3 transform of M[02,02]*v
+
-
+bool invert(const MatrixOld& m)
+
-
+inline Vec3 operator * (const Vec3& v) const
+
- post multipy v.
+
-
+inline Vec4 operator * (const Vec4& v) const
+
- post multipy v.
+
-
+inline Vec3 transform3x3(const Vec3& v, const MatrixOld& m)
+
-
+inline Vec3 transform3x3(const MatrixOld& m, const Vec3& v)
+
+
+
+
Inherited from Object:
+
+
+
+
+
+Public Methods
-
+inline void ref() const
+
-
+inline void unref() const
+
-
+inline const int referenceCount() const
+
+
+
+Protected Fields
-
+mutable int _refCount
+
+
+
+
+
+
+Documentation
+4x4 MatrixOld for storage & manipulation of transformations in scene graph.
+Provides basic maths operations, IO and via osg::Object reference counting.
+You can directly load the MatrixOld with OpenGL's LoadMatrixOldf() function via
+the public member _mat as the MatrixOld is stored in the OpenGL format.
+Caution: The disadvantage of this feature is, that the MatrixOld access is
+'transposed' if you compare it with the standard C/C++ 2d-array-access
+convention . I.e. _mat[i][j] accesses the ith column of the jth row in the
+4x4 MatrixOld.
+
+
+
+
+- MatrixOld()
+
+
+
+
- MatrixOld(const MatrixOld& MatrixOld)
+
+
+
+
- MatrixOld( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
+
+
+
- MatrixOld& operator = (const MatrixOld& MatrixOld)
+
+
+
+
- virtual ~MatrixOld()
+
+
+
+
- virtual Object* clone() const
+
+
+
+
- virtual bool isSameKindAs(const Object* obj) const
+
+
+
+
- virtual const char* className() const
+
+
+
+
- int compare(const MatrixOld& m) const
+
+
+
+
- bool operator < (const MatrixOld& m) const
+
+
+
+
- bool operator == (const MatrixOld& m) const
+
+
+
+
- bool operator != (const MatrixOld& m) const
+
+
+
+
- void makeIdent()
+
+
+
+
- void set(const float* m)
+
+
+
+
- void set( float a00, float a01, float a02, float a03, float a10, float a11, float a12, float a13, float a20, float a21, float a22, float a23, float a30, float a31, float a32, float a33)
+
+
+
+
- void copy(const MatrixOld& MatrixOld)
+
+
+
+
- void makeScale(float sx, float sy, float sz)
+
+
+
+
- void preScale( float sx, float sy, float sz, const MatrixOld& m )
+
+
+
+
- void postScale( const MatrixOld& m, float sx, float sy, float sz )
+
+
+
+
- void preScale( float sx, float sy, float sz )
+
+
+
+
- void postScale( float sx, float sy, float sz )
+
+
+
+
- void makeTrans( float tx, float ty, float tz )
+
+
+
+
- void preTrans( float tx, float ty, float tz, const MatrixOld& m )
+
+
+
+
- void postTrans( const MatrixOld& m, float tx, float ty, float tz )
+
+
+
+
- void preTrans( float tx, float ty, float tz )
+
+
+
+
- void postTrans( float tx, float ty, float tz )
+
+
+
+
- void makeRot( const Vec3& old_vec, const Vec3& new_vec )
+
-
+Calc the rotation MatrixOld which aligns vector \a old_vec with
+vector \a new_vec. Both \a old_vec and \a new_vec must have
+length 1.0.
+
+
+
+
- void makeRot( float deg, float x, float y, float z )
+
+
+
+
- void preRot( float deg, float x, float y, float z, const MatrixOld& m )
+
+
+
+
- void postRot( const MatrixOld& m, float deg, float x, float y, float z )
+
+
+
+
- void preRot( float deg, float x, float y, float z )
+
+
+
+
- void postRot( float deg, float x, float y, float z )
+
+
+
+
- void setTrans( float tx, float ty, float tz )
+
+
+
+
- void setTrans( const Vec3& v )
+
+
+
+
- Vec3 getTrans() const
+
+
+
+
- void preMult(const MatrixOld& m)
+
+
+
+
- void postMult(const MatrixOld& m)
+
+
+
+
- void mult(const MatrixOld& lhs, const MatrixOld& rhs)
+
+
+
+
- MatrixOld operator * (const MatrixOld& m) const
+
+
+
+
- inline static Vec3 transform3x3(const Vec3& v, const MatrixOld& m)
+
- apply apply an 3x3 transform of v*M[02,02]
+
+
+
+
- inline static Vec3 transform3x3(const MatrixOld& m, const Vec3& v)
+
- apply apply an 3x3 transform of M[02,02]*v
+
+
+
+
- bool invert(const MatrixOld& m)
+
+
+
+
- float _mat[4][4]
+
+
+
+
- inline Vec3 operator * (const Vec3& v) const
+
- post multipy v. ie. (m*v)
+
+
+
+
- inline Vec4 operator * (const Vec4& v) const
+
- post multipy v. ie. (m*v)
+
+
+
+
- inline Vec3 transform3x3(const Vec3& v, const MatrixOld& m)
+
+
+
+
- inline Vec3 transform3x3(const MatrixOld& m, const Vec3& v)
+
+
+
- This class has no child classes.
+
+- Friends:
- inline Vec3 operator * (const Vec3& v,const MatrixOld& m)
inline Vec4 operator * (const Vec4& v,const MatrixOld& m)
inline ostream& operator << (ostream& output, const MatrixOld& MatrixOld)
Alphabetic index HTML hierarchy of classes or Java
+
+This page was generated with the help of DOC++.
+
+
diff --git a/include/osg/FrameStamp b/include/osg/FrameStamp
new file mode 100644
index 000000000..148379b07
--- /dev/null
+++ b/include/osg/FrameStamp
@@ -0,0 +1,66 @@
+#ifndef OSG_FRAMESTAMP
+#define OSG_FRAMESTAMP 1
+
+#include
+
+#include
+
+namespace osg
+{
+
+/** Class which encapsulates the frame number, reference time and calander
+ * time of specific frame, used to synchonize operations on the scene graph
+ * and other machines when using a graphics cluster. Note the calander
+ * time can be an artificial simulation time or capture the real time
+ * of day etc.*/
+class SG_EXPORT FrameStamp : public Referenced
+{
+ public:
+
+ FrameStamp();
+ FrameStamp(const FrameStamp& fs);
+ ~FrameStamp();
+
+ FrameStamp& operator = (const FrameStamp& fs);
+
+ void setFrameNumber(int fnum) { _frameNumber = fnum; }
+ int getFrameNumber() const { return _frameNumber; }
+
+ void setReferenceTime(double refTime) { _referenceTime = refTime; }
+ double getReferenceTime() const { return _referenceTime; }
+
+ void setCalanderTime(const tm& calanderTime);
+ void getCalanderTime(tm& calanderTime) const;
+
+ protected:
+
+ // note no dynamic memory is used so that data can be passed
+ // via a simple memory copy or within a data packet across
+ // the network.
+
+ int _frameNumber;
+ double _referenceTime;
+
+
+ // member varaibles of time.h's tm structure, copied here to
+ // ensure that all data is no dynamic. The tm structure itself
+ // is not completely consistent betweem implementations, which
+ // could be a problem when sending the FrameStamp across a network
+ // with differnt versions of tm (i.e mixing Unix and Windows.)
+ int tm_sec; /* Seconds. [0-60] (1 leap second) */
+ int tm_min; /* Minutes. [0-59] */
+ int tm_hour; /* Hours. [0-23] */
+ int tm_mday; /* Day. [1-31] */
+ int tm_mon; /* Month. [0-11] */
+ int tm_year; /* Year - 1900. */
+ int tm_wday; /* Day of week. [0-6] */
+ int tm_yday; /* Days in year. [0-365] */
+ int tm_isdst; /* DST. [-1/0/1]*/
+
+
+};
+
+};
+
+
+#endif
diff --git a/src/osg/FrameStamp.cpp b/src/osg/FrameStamp.cpp
new file mode 100644
index 000000000..79774412d
--- /dev/null
+++ b/src/osg/FrameStamp.cpp
@@ -0,0 +1,74 @@
+#include
+
+using namespace osg;
+
+FrameStamp::FrameStamp():Referenced()
+{
+}
+
+FrameStamp::FrameStamp(const FrameStamp& fs):Referenced()
+{
+ _frameNumber = fs._frameNumber;
+ _referenceTime = fs._referenceTime;
+
+ tm_sec = fs.tm_sec; /* Seconds. [0-60] (1 leap second) */
+ tm_min = fs.tm_min; /* Minutes. [0-59] */
+ tm_hour = fs.tm_hour; /* Hours. [0-23] */
+ tm_mday = fs.tm_mday; /* Day. [1-31] */
+ tm_mon = fs.tm_mon; /* Month. [0-11] */
+ tm_year = fs.tm_year; /* Year - 1900. */
+ tm_wday = fs.tm_wday; /* Day of week. [0-6] */
+ tm_yday = fs.tm_yday; /* Days in year.[0-365] */
+ tm_isdst = fs.tm_isdst; /* DST. [-1/0/1]*/
+
+}
+
+FrameStamp::~FrameStamp()
+{
+}
+
+FrameStamp& FrameStamp::operator = (const FrameStamp& fs)
+{
+ if (this==&fs) return *this;
+
+ _frameNumber = fs._frameNumber;
+ _referenceTime = fs._referenceTime;
+
+ tm_sec = fs.tm_sec; /* Seconds. [0-60] (1 leap second) */
+ tm_min = fs.tm_min; /* Minutes. [0-59] */
+ tm_hour = fs.tm_hour; /* Hours. [0-23] */
+ tm_mday = fs.tm_mday; /* Day. [1-31] */
+ tm_mon = fs.tm_mon; /* Month. [0-11] */
+ tm_year = fs.tm_year; /* Year - 1900. */
+ tm_wday = fs.tm_wday; /* Day of week. [0-6] */
+ tm_yday = fs.tm_yday; /* Days in year.[0-365] */
+ tm_isdst = fs.tm_isdst; /* DST. [-1/0/1]*/
+
+ return *this;
+}
+
+void FrameStamp::setCalanderTime(const tm& ct)
+{
+ tm_sec = ct.tm_sec; /* Seconds. [0-60] (1 leap second) */
+ tm_min = ct.tm_min; /* Minutes. [0-59] */
+ tm_hour = ct.tm_hour; /* Hours. [0-23] */
+ tm_mday = ct.tm_mday; /* Day. [1-31] */
+ tm_mon = ct.tm_mon; /* Month. [0-11] */
+ tm_year = ct.tm_year; /* Year - 1900. */
+ tm_wday = ct.tm_wday; /* Day of week. [0-6] */
+ tm_yday = ct.tm_yday; /* Days in year.[0-365] */
+ tm_isdst = ct.tm_isdst; /* DST. [-1/0/1]*/
+}
+
+void FrameStamp::getCalanderTime(tm& ct) const
+{
+ ct.tm_sec = tm_sec; /* Seconds. [0-60] (1 leap second) */
+ ct.tm_min = tm_min; /* Minutes. [0-59] */
+ ct.tm_hour = tm_hour; /* Hours. [0-23] */
+ ct.tm_mday = tm_mday; /* Day. [1-31] */
+ ct.tm_mon = tm_mon; /* Month. [0-11] */
+ ct.tm_year = tm_year; /* Year - 1900. */
+ ct.tm_wday = tm_wday; /* Day of week. [0-6] */
+ ct.tm_yday = tm_yday; /* Days in year.[0-365] */
+ ct.tm_isdst = tm_isdst; /* DST. [-1/0/1]*/
+}