Changeset 13041 for OpenSceneGraph/trunk/include/osg/ShadowVolumeOccluder
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/ShadowVolumeOccluder
r7648 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 28 28 29 29 public: 30 31 30 31 32 32 typedef std::vector<Polytope> HoleList; 33 33 … … 43 43 44 44 45 bool operator < (const ShadowVolumeOccluder& svo) const { return getVolume()>svo.getVolume(); } // not greater volume first. 45 bool operator < (const ShadowVolumeOccluder& svo) const { return getVolume()>svo.getVolume(); } // not greater volume first. 46 46 47 47 /** compute the shadow volume occluder. */ 48 48 bool computeOccluder(const NodePath& nodePath,const ConvexPlanarOccluder& occluder,CullStack& cullStack,bool createDrawables=false); 49 49 50 50 51 51 inline void disableResultMasks(); 52 52 53 53 inline void pushCurrentMask(); 54 54 inline void popCurrentMask(); 55 56 55 56 57 57 /** return true if the matrix passed in matches the projection matrix that this ShadowVolumeOccluder is 58 58 * associated with.*/ … … 62 62 else return false; 63 63 } 64 64 65 65 66 66 /** Set the NodePath which describes which node in the scene graph … … 71 71 72 72 73 /** get the volume of the occluder minus its holes, in eye coords, the volume is normalized by dividing by 73 /** get the volume of the occluder minus its holes, in eye coords, the volume is normalized by dividing by 74 74 * the volume of the view frustum in eye coords.*/ 75 75 float getVolume() const { return _volume; } 76 76 77 77 /** return the occluder polytope.*/ 78 78 Polytope& getOccluder() { return _occluderVolume; } 79 79 80 80 /** return the const occluder polytope.*/ 81 81 const Polytope& getOccluder() const { return _occluderVolume; } 82 82 83 83 /** return the list of holes.*/ 84 84 HoleList& getHoleList() { return _holeList; } 85 85 86 86 /** return the const list of holes.*/ 87 87 const HoleList& getHoleList() const { return _holeList; } 88 88 89 89 90 90 /** return true if the specified vertex list is contained entirely … … 95 95 * within this shadow occluder volume.*/ 96 96 bool contains(const BoundingSphere& bound); 97 97 98 98 /** return true if the specified bounding box is contained entirely 99 99 * within this shadow occluder volume.*/ … … 110 110 } 111 111 } 112 112 113 113 114 114 protected: … … 170 170 } // end of namespace 171 171 172 #endif 172 #endif
