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:
@@ -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.*/
|
||||
|
||||
@@ -166,5 +166,5 @@ namespace txp
|
||||
TrPageParser*parse;
|
||||
};
|
||||
|
||||
}; // namespace txp
|
||||
} // namespace txp
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <osgTXP/trpage_scene.h>
|
||||
#include <osgTXP/trpage_managers.h>
|
||||
#include <osgTXP/WaitBlock.h>
|
||||
#include <osgTXP/TrPageArchive.h>
|
||||
|
||||
namespace txp
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user