|
Revision 13041, 1.4 kB
(checked in by robert, 15 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | #include <osg/OccluderNode> |
|---|
| 14 | |
|---|
| 15 | using namespace osg; |
|---|
| 16 | |
|---|
| 17 | OccluderNode::OccluderNode() |
|---|
| 18 | { |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | OccluderNode::OccluderNode(const OccluderNode& node,const CopyOp& copyop): |
|---|
| 22 | Group(node,copyop), |
|---|
| 23 | _occluder(dynamic_cast<ConvexPlanarOccluder*>(copyop(node._occluder.get()))) |
|---|
| 24 | { |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | BoundingSphere OccluderNode::computeBound() const |
|---|
| 28 | { |
|---|
| 29 | BoundingSphere bsphere(Group::computeBound()); |
|---|
| 30 | |
|---|
| 31 | if (getOccluder()) |
|---|
| 32 | { |
|---|
| 33 | BoundingBox bb; |
|---|
| 34 | const ConvexPlanarPolygon::VertexList& vertexList = getOccluder()->getOccluder().getVertexList(); |
|---|
| 35 | for(ConvexPlanarPolygon::VertexList::const_iterator itr=vertexList.begin(); |
|---|
| 36 | itr!=vertexList.end(); |
|---|
| 37 | ++itr) |
|---|
| 38 | { |
|---|
| 39 | bb.expandBy(*itr); |
|---|
| 40 | } |
|---|
| 41 | if (bb.valid()) |
|---|
| 42 | { |
|---|
| 43 | bsphere.expandBy(bb); |
|---|
| 44 | } |
|---|
| 45 | } |
|---|
| 46 | return bsphere; |
|---|
| 47 | } |
|---|