14#ifndef OSG_SHADOWVOLUMEOCCLUDER
15#define OSG_SHADOWVOLUMEOCCLUDER 1
36 _nodePath(svo._nodePath),
37 _projectionMatrix(svo._projectionMatrix),
38 _occluderVolume(svo._occluderVolume),
39 _holeList(svo._holeList) {}
51 inline void disableResultMasks();
53 inline void pushCurrentMask();
54 inline void popCurrentMask();
61 if (_projectionMatrix.valid())
return matrix==*_projectionMatrix;
92 bool contains(
const std::vector<Vec3>& vertices);
104 _occluderVolume.transformProvidingInverse(matrix);
105 for(HoleList::iterator itr=_holeList.begin();
106 itr!=_holeList.end();
109 itr->transformProvidingInverse(matrix);
132 for(HoleList::iterator itr=
_holeList.begin();
136 itr->setResultMask(0);
146 for(HoleList::iterator itr=
_holeList.begin();
150 itr->pushCurrentMask();
160 for(HoleList::iterator itr=
_holeList.begin();
164 itr->popCurrentMask();
Definition BoundingBox:34
Definition BoundingSphere:35
Definition ConvexPlanarOccluder:26
void pushCurrentMask()
Definition Polytope:185
void setResultMask(ClippingMask mask)
Definition Polytope:176
void popCurrentMask()
Definition Polytope:190
Definition ShadowVolumeOccluder:27
const Polytope & getOccluder() const
Definition ShadowVolumeOccluder:81
NodePath _nodePath
Definition ShadowVolumeOccluder:117
bool computeOccluder(const NodePath &nodePath, const ConvexPlanarOccluder &occluder, CullStack &cullStack, bool createDrawables=false)
void popCurrentMask()
Definition ShadowVolumeOccluder:155
float _volume
Definition ShadowVolumeOccluder:116
Polytope _occluderVolume
Definition ShadowVolumeOccluder:119
const HoleList & getHoleList() const
Definition ShadowVolumeOccluder:87
const NodePath & getNodePath() const
Definition ShadowVolumeOccluder:70
Polytope & getOccluder()
Definition ShadowVolumeOccluder:78
std::vector< Polytope > HoleList
Definition ShadowVolumeOccluder:32
void pushCurrentMask()
Definition ShadowVolumeOccluder:140
void setNodePath(NodePath &nodePath)
Definition ShadowVolumeOccluder:68
bool matchProjectionMatrix(const osg::Matrix &matrix) const
Definition ShadowVolumeOccluder:59
void disableResultMasks()
Definition ShadowVolumeOccluder:128
void transformProvidingInverse(const osg::Matrix &matrix)
Definition ShadowVolumeOccluder:102
ref_ptr< const RefMatrix > _projectionMatrix
Definition ShadowVolumeOccluder:118
HoleList & getHoleList()
Definition ShadowVolumeOccluder:84
ShadowVolumeOccluder()
Definition ShadowVolumeOccluder:41
HoleList _holeList
Definition ShadowVolumeOccluder:120
ShadowVolumeOccluder(const ShadowVolumeOccluder &svo)
Definition ShadowVolumeOccluder:34
bool contains(const std::vector< Vec3 > &vertices)
float getVolume() const
Definition ShadowVolumeOccluder:75
bool contains(const BoundingSphere &bound)
bool contains(const BoundingBox &bound)
NodePath & getNodePath()
Definition ShadowVolumeOccluder:69
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
std::vector< Node * > NodePath
Definition Node:47
std::vector< ShadowVolumeOccluder > ShadowVolumeOccluderList
Definition ShadowVolumeOccluder:125
#define OSG_EXPORT
Definition osg/Export:39