Added txp::TerrapageNode to the txp plugin, and implemented the node so that it

automatically assign handles the updates of eye points and database merges.
This commit is contained in:
Robert Osfield
2002-12-17 15:41:05 +00:00
parent 64341828b8
commit ee3348afc9
14 changed files with 377 additions and 88 deletions

View File

@@ -189,6 +189,10 @@ class SG_EXPORT NodeVisitor : public Referenced
/** Get the World To Local Matrix from the NodePath for specified Transform::Mode.*/
virtual bool getWorldToLocalMatrix(Matrix& matrix, Node* node);
/** Get the eye point in local coordinates.
* Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.*/
virtual osg::Vec3 getEyePoint() const { return Vec3(0.0f,0.0f,0.0f); }
/** Get the distance from a point to the eye point, distance value in local coordinate system.
* Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
* If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.*/

View File

@@ -166,5 +166,5 @@ namespace txp
TrPageParser*parse;
};
}; // namespace txp
} // namespace txp
#endif

View File

@@ -34,6 +34,7 @@
#include <osgTXP/trpage_scene.h>
#include <osgTXP/trpage_managers.h>
#include <osgTXP/WaitBlock.h>
#include <osgTXP/TrPageArchive.h>
namespace txp
{

View File

@@ -48,6 +48,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
virtual void reset();
virtual osg::Vec3 getEyePoint() const { return getEyeLocal(); }
virtual float getDistanceToEyePoint(const osg::Vec3& pos, bool withLODScale) const;
virtual float getDistanceFromEyePoint(const osg::Vec3& pos, bool withLODScale) const;