14#ifndef OSGUTIL_CULLVISITOR
15#define OSGUTIL_CULLVISITOR 1
142 if (useRenderBinDetails)
172 if (useRenderBinDetails)
339 if (callback) callback->
run(&node,
this);
346 if (callback) callback->
run(&node,
this);
347 else acceptNode->
accept(*
this);
390 for(osg::Polytope::PlaneList::const_iterator itr=frustum.
getPlaneList().begin();
394 if (result_mask&selector_mask)
_planes.push_back(*itr);
460 _currentRenderBin->getStage()->addPositionedTextureAttribute(textureUnit,matrix,attr);
Definition CullVisitor:49
virtual void apply(osg::Camera &node)
void setStateGraph(StateGraph *rg)
Definition CullVisitor:187
RenderLeaf * createOrReuseRenderLeaf(osg::Drawable *drawable, osg::RefMatrix *projection, osg::RefMatrix *matrix, float depth=0.0f)
Definition CullVisitor:463
unsigned int _traversalOrderNumber
Definition CullVisitor:360
Identifier * getIdentifier()
Definition CullVisitor:99
osg::Camera * getCurrentCamera()
Definition CullVisitor:219
virtual void apply(osg::Projection &node)
RenderStage * getCurrentRenderStage()
Definition CullVisitor:214
value_type getCalculatedFarPlane() const
Definition CullVisitor:238
virtual void apply(osg::ClearNode &node)
virtual void apply(osg::Geode &node)
bool updateCalculatedNearFar(const osg::Matrix &matrix, const osg::Drawable &drawable, bool isBillboard=false)
value_type _computed_zfar
Definition CullVisitor:358
static CullVisitor * create()
value_type getCalculatedNearPlane() const
Definition CullVisitor:235
DistanceMatrixDrawableMap _nearPlaneCandidateMap
Definition CullVisitor:418
virtual const osgUtil::CullVisitor * asCullVisitor() const
Definition CullVisitor:68
osg::ref_ptr< StateGraph > _rootStateGraph
Definition CullVisitor:350
virtual bool clampProjectionMatrixImplementation(osg::Matrixf &projection, double &znear, double &zfar) const
virtual void apply(osg::ClipNode &node)
void addDrawable(osg::Drawable *drawable, osg::RefMatrix *matrix)
Definition CullVisitor:424
void setState(osg::State *state)
Definition CullVisitor:321
virtual void apply(osg::LightSource &node)
virtual void apply(osg::LOD &node)
unsigned int _numberOfEncloseOverrideRenderBinDetails
Definition CullVisitor:369
virtual void apply(osg::TexGenNode &node)
void setCalculatedNearPlane(value_type value)
Definition CullVisitor:234
static osg::ref_ptr< CullVisitor > & prototype()
const osg::RenderInfo & getRenderInfo() const
Definition CullVisitor:327
void handle_cull_callbacks_and_traverse(osg::Node &node)
Definition CullVisitor:336
void setRenderInfo(osg::RenderInfo &renderInfo)
Definition CullVisitor:325
osg::RenderInfo _renderInfo
Definition CullVisitor:371
const osg::State * getState() const
Definition CullVisitor:323
virtual void apply(osg::Transform &node)
void setIdentifier(Identifier *identifier)
Definition CullVisitor:98
const Identifier * getIdentifier() const
Definition CullVisitor:100
StateGraph * getCurrentStateGraph()
Definition CullVisitor:198
RenderLeafList _reuseRenderLeafList
Definition CullVisitor:364
void pushStateSet(const osg::StateSet *ss)
Definition CullVisitor:135
StateGraph * _currentStateGraph
Definition CullVisitor:351
virtual osg::CullStack * asCullStack()
Definition CullVisitor:72
value_type computeNearestPointInFrustum(const osg::Matrix &matrix, const osg::Polytope::PlaneList &planes, const osg::Drawable &drawable)
RenderStage * getRenderStage()
Definition CullVisitor:209
RenderBin * _currentRenderBin
Definition CullVisitor:354
StateGraph * getRootStateGraph()
Definition CullVisitor:193
void addDrawableAndDepth(osg::Drawable *drawable, osg::RefMatrix *matrix, float depth)
Definition CullVisitor:438
bool clampProjectionMatrix(osg::Matrixf &projection, value_type &znear, value_type &zfar) const
Definition CullVisitor:281
virtual osg::Vec3 getViewPoint() const
Definition CullVisitor:103
virtual void apply(osg::Drawable &drawable)
virtual void apply(osg::Billboard &node)
void setCurrentRenderBin(RenderBin *rb)
Definition CullVisitor:229
bool clampProjectionMatrix(osg::Matrixd &projection, value_type &znear, value_type &zfar) const
Definition CullVisitor:301
virtual void apply(osg::Group &node)
bool updateCalculatedNearFar(const osg::Matrix &matrix, const osg::BoundingBox &bb)
void updateCalculatedNearFar(const osg::Vec3 &pos)
virtual void apply(osg::OccluderNode &node)
virtual float getDistanceToEyePoint(const osg::Vec3 &pos, bool withLODScale) const
void setRenderStage(RenderStage *rg)
Definition CullVisitor:203
virtual bool clampProjectionMatrixImplementation(osg::Matrixd &projection, double &znear, double &zfar) const
virtual float getDistanceToViewPoint(const osg::Vec3 &pos, bool withLODScale) const
osg::State * getState()
Definition CullVisitor:322
virtual void apply(osg::OcclusionQueryNode &node)
virtual const osg::CullStack * asCullStack() const
Definition CullVisitor:76
osg::Matrix::value_type value_type
Definition CullVisitor:52
void popStateSet()
Definition CullVisitor:161
virtual osg::Vec3 getEyePoint() const
Definition CullVisitor:102
void addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix *matrix, const osg::StateAttribute *attr)
Definition CullVisitor:458
value_type computeFurthestPointInFrustum(const osg::Matrix &matrix, const osg::Polytope::PlaneList &planes, const osg::Drawable &drawable)
unsigned int _currentReuseRenderLeafIndex
Definition CullVisitor:365
RenderBin * getCurrentRenderBin()
Definition CullVisitor:224
void handle_cull_callbacks_and_accept(osg::Node &node, osg::Node *acceptNode)
Definition CullVisitor:343
void addPositionedAttribute(osg::RefMatrix *matrix, const osg::StateAttribute *attr)
Definition CullVisitor:452
virtual CullVisitor * clone() const
Definition CullVisitor:82
CullVisitor(const CullVisitor &)
Copy constructor that does a shallow copy.
std::vector< osg::ref_ptr< RenderLeaf > > RenderLeafList
Definition CullVisitor:363
osg::ref_ptr< RenderStage > _rootRenderStage
Definition CullVisitor:353
virtual void popProjectionMatrix()
value_type _computed_znear
Definition CullVisitor:357
std::vector< RenderBin * > _renderBinStack
Definition CullVisitor:355
void setCalculatedFarPlane(value_type value)
Definition CullVisitor:237
DistanceMatrixDrawableMap _farPlaneCandidateMap
Definition CullVisitor:419
osg::ref_ptr< Identifier > _identifier
Definition CullVisitor:421
std::multimap< value_type, MatrixPlanesDrawables > DistanceMatrixDrawableMap
Definition CullVisitor:417
virtual void apply(osg::Node &)
META_NodeVisitor(osgUtil, CullVisitor) virtual osgUtil
Definition CullVisitor:60
virtual float getDistanceFromEyePoint(const osg::Vec3 &pos, bool withLODScale) const
virtual void apply(osg::Switch &node)
osg::RenderInfo & getRenderInfo()
Definition CullVisitor:326
void set(osg::Drawable *drawable, osg::RefMatrix *projection, osg::RefMatrix *modelview, float depth=0.0f, unsigned int traversalOrderNumber=0)
Definition RenderLeaf:51
Definition RenderStage:38
virtual bool run(osg::Object *object, osg::Object *data)
Definition Callback:80
ref_ptr< ClampProjectionMatrixCallback > _clampProjectionMatrixCallback
Definition CullSettings:259
const osg::Vec3 & getViewPointLocal() const
Definition CullStack:163
MatrixStack _projectionStack
Definition CullStack:194
const osg::Vec3 & getEyeLocal() const
Definition CullStack:161
Definition LightSource:25
double value_type
Definition Matrixd:30
Definition NodeVisitor:82
void traverse(Node &node)
Definition NodeVisitor:274
Callback * getCullCallback()
Definition Node:293
virtual void accept(NodeVisitor &nv)
virtual Object * clone(const CopyOp &) const =0
Definition OccluderNode:27
Definition OcclusionQueryNode:110
ClippingMask getResultMask() const
Definition Polytope:178
PlaneList & getPlaneList()
Definition Polytope:150
unsigned int ClippingMask
Definition Polytope:30
std::vector< Plane > PlaneList
Definition Polytope:31
Definition StateAttribute:77
bool getNestRenderBins() const
Definition StateSet:442
const std::string & getBinName() const
Definition StateSet:430
@ PROTECTED_RENDERBIN_DETAILS
Definition StateSet:401
@ OVERRIDE_RENDERBIN_DETAILS
Definition StateSet:400
bool useRenderBinDetails() const
Definition StateSet:412
int getBinNumber() const
Definition StateSet:424
RenderBinMode getRenderBinMode() const
Definition StateSet:418
Definition NodeVisitor:25
@ INFO
Definition Notify:35
Vec3f Vec3
Definition Vec3:21
BoundingBoxd BoundingBox
Definition BoundingBox:257
Matrixd Matrix
Definition Matrix:27
std::ostream & notify(void)
Definition Notify:80
RefMatrixd RefMatrix
Definition Matrix:28
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40
Definition CullVisitor:93
virtual ~Identifier()
Definition CullVisitor:95
Identifier()
Definition CullVisitor:94
void set(const osg::Matrix &matrix, const osg::Drawable *drawable, const osg::Polytope &frustum)
Definition CullVisitor:381
osg::Polytope::PlaneList _planes
Definition CullVisitor:414
MatrixPlanesDrawables()
Definition CullVisitor:376
osg::Matrix _matrix
Definition CullVisitor:412
const osg::Drawable * _drawable
Definition CullVisitor:413
MatrixPlanesDrawables(const MatrixPlanesDrawables &mpd)
Definition CullVisitor:399