Renamed the ConvexPlaner* classes to ConvexPlanar* and changed all the various
classes that reference it. Added MUST_READ_ME.txt to the VisualStudio directory.
This commit is contained in:
parent
4e45c82067
commit
79aaac4e0c
18
VisualStudio/MUST_READ_ME.txt
Normal file
18
VisualStudio/MUST_READ_ME.txt
Normal file
@ -0,0 +1,18 @@
|
||||
IMPORTANT NOTE: Whilst the OSG will compile cleanly with the basic VC++6.0
|
||||
and its own STL implementation, the OSG will crash regularily due to bugs
|
||||
in VC++6.0's STL. VC++6.0's STL is horribly broken and therefore is *NOT*
|
||||
supported. Do not attempt to use the OSG in conjunction with native VC++6.0
|
||||
STL implemention.
|
||||
|
||||
The supported combinations are:
|
||||
|
||||
1.Visual Studio7.0 .NET
|
||||
2.Visual Studio6.0 + Dinkumware's STL bug fix patches
|
||||
3.Visual Studio6.0 + STLport
|
||||
|
||||
For details on how to patch VisualStudio6.0 read the doc/install.html
|
||||
documentation.
|
||||
|
||||
Several of the plugins and demoes, and two of the core libraries - osgText
|
||||
and osgGLUT require external dependancies. Full details on where to obtain
|
||||
these can be found in doc/dependancies.html.
|
@ -141,11 +141,11 @@ SOURCE=..\..\src\osg\CollectOccludersVisitor.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osg\ConvexPlanerOccluder.cpp
|
||||
SOURCE=..\..\src\osg\ConvexPlanarOccluder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\osg\ConvexPlanerPolygon.cpp
|
||||
SOURCE=..\..\src\osg\ConvexPlanarPolygon.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@ -469,11 +469,11 @@ SOURCE=..\..\Include\Osg\ClipPlane
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\Osg\ConvexPlanerOccluder
|
||||
SOURCE=..\..\Include\Osg\ConvexPlanarOccluder
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Include\Osg\ConvexPlanerPolygon
|
||||
SOURCE=..\..\Include\Osg\ConvexPlanarPolygon
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -114,7 +114,7 @@ SOURCE=..\..\..\src\osgPlugins\osg\ColorMatrix.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\src\osgPlugins\osg\ConvexPlanerOccluder.cpp
|
||||
SOURCE=..\..\..\src\osgPlugins\osg\ConvexPlanarOccluder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
//Distributed under the terms of the GNU Library General Public License (LGPL)
|
||||
//as published by the Free Software Foundation.
|
||||
|
||||
#ifndef OSG_CONVEXPLANEROCCLUDER
|
||||
#define OSG_CONVEXPLANEROCCLUDER 1
|
||||
#ifndef OSG_CONVEXPLANAROCCLUDER
|
||||
#define OSG_CONVEXPLANAROCCLUDER 1
|
||||
|
||||
#include <osg/ConvexPlanerPolygon>
|
||||
#include <osg/ConvexPlanarPolygon>
|
||||
#include <osg/Object>
|
||||
|
||||
namespace osg {
|
||||
@ -14,30 +14,30 @@ class OccluderVolume;
|
||||
|
||||
/** A class for representing convex clipping volumes made up.
|
||||
* When adding planes, their normals should point inwards (into the volume) */
|
||||
class SG_EXPORT ConvexPlanerOccluder : public Object
|
||||
class SG_EXPORT ConvexPlanarOccluder : public Object
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
ConvexPlanerOccluder():Object() {}
|
||||
ConvexPlanerOccluder(const ConvexPlanerOccluder& cpo,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
ConvexPlanarOccluder():Object() {}
|
||||
ConvexPlanarOccluder(const ConvexPlanarOccluder& cpo,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
|
||||
Object(cpo,copyop),
|
||||
_occluder(cpo._occluder),
|
||||
_holeList(cpo._holeList) {}
|
||||
|
||||
META_Object(osg,ConvexPlanerOccluder)
|
||||
META_Object(osg,ConvexPlanarOccluder)
|
||||
|
||||
void setOccluder(const ConvexPlanerPolygon& cpp) { _occluder = cpp; }
|
||||
void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; }
|
||||
|
||||
ConvexPlanerPolygon& getOccluder() { return _occluder; }
|
||||
ConvexPlanarPolygon& getOccluder() { return _occluder; }
|
||||
|
||||
const ConvexPlanerPolygon& getOccluder() const { return _occluder; }
|
||||
const ConvexPlanarPolygon& getOccluder() const { return _occluder; }
|
||||
|
||||
|
||||
|
||||
typedef std::vector<ConvexPlanerPolygon> HoleList;
|
||||
typedef std::vector<ConvexPlanarPolygon> HoleList;
|
||||
|
||||
void addHole(const ConvexPlanerPolygon& cpp) { _holeList.push_back(cpp); }
|
||||
void addHole(const ConvexPlanarPolygon& cpp) { _holeList.push_back(cpp); }
|
||||
|
||||
HoleList& getHoleList() { return _holeList; }
|
||||
|
||||
@ -51,9 +51,9 @@ class SG_EXPORT ConvexPlanerOccluder : public Object
|
||||
|
||||
protected:
|
||||
|
||||
~ConvexPlanerOccluder() {}
|
||||
~ConvexPlanarOccluder() {}
|
||||
|
||||
ConvexPlanerPolygon _occluder;
|
||||
ConvexPlanarPolygon _occluder;
|
||||
HoleList _holeList;
|
||||
|
||||
};
|
@ -2,8 +2,8 @@
|
||||
//Distributed under the terms of the GNU Library General Public License (LGPL)
|
||||
//as published by the Free Software Foundation.
|
||||
|
||||
#ifndef OSG_CONVEXPLANERPOLYGON
|
||||
#define OSG_CONVEXPLANERPOLYGON 1
|
||||
#ifndef OSG_CONVEXPLANARPOLYGON
|
||||
#define OSG_CONVEXPLANARPOLYGON 1
|
||||
|
||||
#include <osg/Plane>
|
||||
|
||||
@ -16,12 +16,12 @@ class BoundingSphere;
|
||||
|
||||
/** A class for representing convex clipping volumes made up.
|
||||
* When adding planes, their normals should point inwards (into the volume) */
|
||||
class SG_EXPORT ConvexPlanerPolygon
|
||||
class SG_EXPORT ConvexPlanarPolygon
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
ConvexPlanerPolygon();
|
||||
ConvexPlanarPolygon();
|
||||
|
||||
typedef std::vector<osg::Vec3> VertexList;
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define OSG_OCCLUDERNODE 1
|
||||
|
||||
#include <osg/Group>
|
||||
#include <osg/ConvexPlanerOccluder>
|
||||
#include <osg/ConvexPlanarOccluder>
|
||||
|
||||
namespace osg {
|
||||
|
||||
@ -27,14 +27,14 @@ class SG_EXPORT OccluderNode : public Group
|
||||
META_Node(osg, OccluderNode);
|
||||
|
||||
|
||||
/** Attach a ConvexPlanerOccluder to an OccluderNode.*/
|
||||
void setOccluder(ConvexPlanerOccluder* occluder) { _occluder = occluder; }
|
||||
/** Attach a ConvexPlanarOccluder to an OccluderNode.*/
|
||||
void setOccluder(ConvexPlanarOccluder* occluder) { _occluder = occluder; }
|
||||
|
||||
/** Get the ConvexPlanerOccluder* attached to a OccluderNode. */
|
||||
ConvexPlanerOccluder* getOccluder() { return _occluder.get(); }
|
||||
/** Get the ConvexPlanarOccluder* attached to a OccluderNode. */
|
||||
ConvexPlanarOccluder* getOccluder() { return _occluder.get(); }
|
||||
|
||||
/** Get the const ConvexPlanerOccluder* attached to a OccluderNode.*/
|
||||
const ConvexPlanerOccluder* getOccluder() const { return _occluder.get(); }
|
||||
/** Get the const ConvexPlanarOccluder* attached to a OccluderNode.*/
|
||||
const ConvexPlanarOccluder* getOccluder() const { return _occluder.get(); }
|
||||
|
||||
|
||||
protected :
|
||||
@ -44,7 +44,7 @@ class SG_EXPORT OccluderNode : public Group
|
||||
/** Override's Group's computeBound.*/
|
||||
virtual const bool computeBound() const;
|
||||
|
||||
ref_ptr<ConvexPlanerOccluder> _occluder;
|
||||
ref_ptr<ConvexPlanarOccluder> _occluder;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define OSG_SHADOWVOLUMEOCCLUDER 1
|
||||
|
||||
#include <osg/Polytope>
|
||||
#include <osg/ConvexPlanerOccluder>
|
||||
#include <osg/ConvexPlanarOccluder>
|
||||
#include <osg/Node>
|
||||
|
||||
namespace osg {
|
||||
@ -36,7 +36,7 @@ class SG_EXPORT ShadowVolumeOccluder
|
||||
bool operator < (const ShadowVolumeOccluder& svo) const { return getVolume()>svo.getVolume(); } // not greater volume first.
|
||||
|
||||
/** compute the shadow volume occluder. */
|
||||
bool computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,CullStack& cullStack,bool createDrawables=false);
|
||||
bool computeOccluder(const NodePath& nodePath,const ConvexPlanarOccluder& occluder,CullStack& cullStack,bool createDrawables=false);
|
||||
|
||||
|
||||
inline void disableResultMasks();
|
||||
|
@ -84,7 +84,7 @@ class OccluderEventHandler : public osgGA::GUIEventHandler
|
||||
osg::ref_ptr<osgUtil::SceneView> _sceneview;
|
||||
osg::ref_ptr<osg::Group> _rootnode;
|
||||
osg::ref_ptr<osg::Group> _occluders;
|
||||
osg::ref_ptr<osg::ConvexPlanerOccluder> _convexPlanerOccluder;
|
||||
osg::ref_ptr<osg::ConvexPlanarOccluder> _convexPlanarOccluder;
|
||||
};
|
||||
|
||||
bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&)
|
||||
@ -158,21 +158,21 @@ void OccluderEventHandler::addPoint(const osg::Vec3& pos)
|
||||
{
|
||||
std::cout<<"add point "<<pos<<std::endl;
|
||||
|
||||
if (!_convexPlanerOccluder.valid()) _convexPlanerOccluder = new osg::ConvexPlanerOccluder;
|
||||
if (!_convexPlanarOccluder.valid()) _convexPlanarOccluder = new osg::ConvexPlanarOccluder;
|
||||
|
||||
osg::ConvexPlanerPolygon& occluder = _convexPlanerOccluder->getOccluder();
|
||||
osg::ConvexPlanarPolygon& occluder = _convexPlanarOccluder->getOccluder();
|
||||
occluder.add(pos);
|
||||
|
||||
}
|
||||
|
||||
void OccluderEventHandler::endOccluder()
|
||||
{
|
||||
if (_convexPlanerOccluder.valid())
|
||||
if (_convexPlanarOccluder.valid())
|
||||
{
|
||||
if (_convexPlanerOccluder->getOccluder().getVertexList().size()>=3)
|
||||
if (_convexPlanarOccluder->getOccluder().getVertexList().size()>=3)
|
||||
{
|
||||
osg::OccluderNode* occluderNode = osgNew osg::OccluderNode;
|
||||
occluderNode->setOccluder(_convexPlanerOccluder.get());
|
||||
occluderNode->setOccluder(_convexPlanarOccluder.get());
|
||||
|
||||
if (!_occluders.valid())
|
||||
{
|
||||
@ -194,7 +194,7 @@ void OccluderEventHandler::endOccluder()
|
||||
}
|
||||
|
||||
// reset current occluder.
|
||||
_convexPlanerOccluder = NULL;
|
||||
_convexPlanarOccluder = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -204,14 +204,14 @@ osg::Node* createOccluder(const osg::Vec3& v1,const osg::Vec3& v2,const osg::Vec
|
||||
osg::OccluderNode* occluderNode = osgNew osg::OccluderNode;
|
||||
|
||||
// create the convex planer occluder
|
||||
osg::ConvexPlanerOccluder* cpo = osgNew osg::ConvexPlanerOccluder;
|
||||
osg::ConvexPlanarOccluder* cpo = osgNew osg::ConvexPlanarOccluder;
|
||||
|
||||
// attach it to the occluder node.
|
||||
occluderNode->setOccluder(cpo);
|
||||
occluderNode->setName("occluder");
|
||||
|
||||
// set the occluder up for the front face of the bounding box.
|
||||
osg::ConvexPlanerPolygon& occluder = cpo->getOccluder();
|
||||
osg::ConvexPlanarPolygon& occluder = cpo->getOccluder();
|
||||
occluder.add(v1);
|
||||
occluder.add(v2);
|
||||
occluder.add(v3);
|
||||
@ -229,7 +229,7 @@ osg::Node* createOccluder(const osg::Vec3& v1,const osg::Vec3& v2,const osg::Vec
|
||||
osg::Vec3 v3dash = v3*ratio + center*one_minus_ratio;
|
||||
osg::Vec3 v4dash = v4*ratio + center*one_minus_ratio;
|
||||
|
||||
osg::ConvexPlanerPolygon hole;
|
||||
osg::ConvexPlanarPolygon hole;
|
||||
hole.add(v1dash);
|
||||
hole.add(v2dash);
|
||||
hole.add(v3dash);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
//
|
||||
// A simple demo demonstrating planer reflections using multiple renderings
|
||||
// A simple demo demonstrating planar reflections using multiple renderings
|
||||
// of a subgraph, overriding of state attribures and use of the stencil buffer.
|
||||
//
|
||||
// The multipass system implemented here is a variation if Mark Kilgard's
|
||||
|
3
src/osg/ConvexPlanarOccluder.cpp
Normal file
3
src/osg/ConvexPlanarOccluder.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include <osg/ConvexPlanarOccluder>
|
||||
|
||||
using namespace osg;
|
7
src/osg/ConvexPlanarPolygon.cpp
Normal file
7
src/osg/ConvexPlanarPolygon.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include <osg/ConvexPlanarPolygon>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
ConvexPlanarPolygon::ConvexPlanarPolygon()
|
||||
{
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
#include <osg/ConvexPlanerOccluder>
|
||||
|
||||
using namespace osg;
|
@ -1,7 +0,0 @@
|
||||
#include <osg/ConvexPlanerPolygon>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
ConvexPlanerPolygon::ConvexPlanerPolygon()
|
||||
{
|
||||
}
|
@ -15,8 +15,8 @@ CXXFILES =\
|
||||
ColorMask.cpp\
|
||||
ColorMatrix.cpp\
|
||||
CollectOccludersVisitor.cpp\
|
||||
ConvexPlanerPolygon.cpp\
|
||||
ConvexPlanerOccluder.cpp\
|
||||
ConvexPlanarPolygon.cpp\
|
||||
ConvexPlanarOccluder.cpp\
|
||||
CopyOp.cpp\
|
||||
CullFace.cpp\
|
||||
CullingSet.cpp\
|
||||
|
@ -8,7 +8,7 @@ OccluderNode::OccluderNode()
|
||||
|
||||
OccluderNode::OccluderNode(const OccluderNode& node,const CopyOp& copyop):
|
||||
Group(node,copyop),
|
||||
_occluder(dynamic_cast<ConvexPlanerOccluder*>(copyop(node._occluder.get())))
|
||||
_occluder(dynamic_cast<ConvexPlanarOccluder*>(copyop(node._occluder.get())))
|
||||
{
|
||||
}
|
||||
|
||||
@ -19,8 +19,8 @@ const bool OccluderNode::computeBound() const
|
||||
if (getOccluder())
|
||||
{
|
||||
BoundingBox bb;
|
||||
const ConvexPlanerPolygon::VertexList& vertexList = getOccluder()->getOccluder().getVertexList();
|
||||
for(ConvexPlanerPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
const ConvexPlanarPolygon::VertexList& vertexList = getOccluder()->getOccluder().getVertexList();
|
||||
for(ConvexPlanarPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
itr!=vertexList.end();
|
||||
++itr)
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ float computePolytopeVolume(const PointList& front, const PointList& back)
|
||||
return volume;
|
||||
}
|
||||
|
||||
bool ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,CullStack& cullStack,bool /*createDrawables*/)
|
||||
bool ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const ConvexPlanarOccluder& occluder,CullStack& cullStack,bool /*createDrawables*/)
|
||||
{
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ bool ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const Convex
|
||||
_volume = computePolytopeVolume(points,farPoints)/volumeview;
|
||||
|
||||
|
||||
for(ConvexPlanerOccluder::HoleList::const_iterator hitr=occluder.getHoleList().begin();
|
||||
for(ConvexPlanarOccluder::HoleList::const_iterator hitr=occluder.getHoleList().begin();
|
||||
hitr!=occluder.getHoleList().end();
|
||||
++hitr)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
#pragma warning( disable : 4786 )
|
||||
#endif
|
||||
|
||||
#include "osg/ConvexPlanerOccluder"
|
||||
#include "osg/ConvexPlanarOccluder"
|
||||
#include "osg/Types"
|
||||
#include "osg/Notify"
|
||||
|
||||
@ -14,33 +14,33 @@ using namespace osg;
|
||||
using namespace osgDB;
|
||||
|
||||
// forward declare functions to use later.
|
||||
bool ConvexPlanerOccluder_readLocalData(Object& obj, Input& fr);
|
||||
bool ConvexPlanerOccluder_writeLocalData(const Object& obj, Output& fw);
|
||||
bool ConvexPlanarOccluder_readLocalData(Object& obj, Input& fr);
|
||||
bool ConvexPlanarOccluder_writeLocalData(const Object& obj, Output& fw);
|
||||
|
||||
// register the read and write functions with the osgDB::Registry.
|
||||
RegisterDotOsgWrapperProxy g_ConvexPlanerOccluderFuncProxy
|
||||
RegisterDotOsgWrapperProxy g_ConvexPlanarOccluderFuncProxy
|
||||
(
|
||||
osgNew osg::ConvexPlanerOccluder,
|
||||
"ConvexPlanerOccluder",
|
||||
"Object ConvexPlanerOccluder",
|
||||
&ConvexPlanerOccluder_readLocalData,
|
||||
&ConvexPlanerOccluder_writeLocalData,
|
||||
osgNew osg::ConvexPlanarOccluder,
|
||||
"ConvexPlanarOccluder",
|
||||
"Object ConvexPlanarOccluder",
|
||||
&ConvexPlanarOccluder_readLocalData,
|
||||
&ConvexPlanarOccluder_writeLocalData,
|
||||
DotOsgWrapper::READ_AND_WRITE
|
||||
);
|
||||
|
||||
bool ConvexPlanerOccluder_readLocalData(Object& obj, Input& fr)
|
||||
bool ConvexPlanarOccluder_readLocalData(Object& obj, Input& fr)
|
||||
{
|
||||
bool iteratorAdvanced = false;
|
||||
|
||||
ConvexPlanerOccluder& cpo = static_cast<ConvexPlanerOccluder&>(obj);
|
||||
ConvexPlanarOccluder& cpo = static_cast<ConvexPlanarOccluder&>(obj);
|
||||
|
||||
|
||||
bool matchFirst;
|
||||
if ((matchFirst=fr.matchSequence("Occluder {")) || fr.matchSequence("Occluder %i {"))
|
||||
{
|
||||
|
||||
ConvexPlanerPolygon& cpp = cpo.getOccluder();
|
||||
ConvexPlanerPolygon::VertexList& vertexList = cpp.getVertexList();
|
||||
ConvexPlanarPolygon& cpp = cpo.getOccluder();
|
||||
ConvexPlanarPolygon::VertexList& vertexList = cpp.getVertexList();
|
||||
|
||||
// set up coordinates.
|
||||
int entry = fr[0].getNoNestedBrackets();
|
||||
@ -77,14 +77,14 @@ bool ConvexPlanerOccluder_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
}
|
||||
|
||||
ConvexPlanerOccluder::HoleList& holeList = cpo.getHoleList();
|
||||
ConvexPlanarOccluder::HoleList& holeList = cpo.getHoleList();
|
||||
|
||||
while ((matchFirst=fr.matchSequence("Hole {")) || fr.matchSequence("Hole %i {"))
|
||||
{
|
||||
holeList.push_back(ConvexPlanerPolygon());
|
||||
holeList.push_back(ConvexPlanarPolygon());
|
||||
|
||||
ConvexPlanerPolygon& cpp = holeList.back();
|
||||
ConvexPlanerPolygon::VertexList& vertexList = cpp.getVertexList();
|
||||
ConvexPlanarPolygon& cpp = holeList.back();
|
||||
ConvexPlanarPolygon::VertexList& vertexList = cpp.getVertexList();
|
||||
|
||||
// set up coordinates.
|
||||
int entry = fr[0].getNoNestedBrackets();
|
||||
@ -125,18 +125,18 @@ bool ConvexPlanerOccluder_readLocalData(Object& obj, Input& fr)
|
||||
}
|
||||
|
||||
|
||||
bool ConvexPlanerOccluder_writeLocalData(const Object& obj, Output& fw)
|
||||
bool ConvexPlanarOccluder_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const ConvexPlanerOccluder& cpo = static_cast<const ConvexPlanerOccluder&>(obj);
|
||||
const ConvexPlanarOccluder& cpo = static_cast<const ConvexPlanarOccluder&>(obj);
|
||||
|
||||
// write out the occluder polygon.
|
||||
{
|
||||
const ConvexPlanerPolygon::VertexList& vertexList = cpo.getOccluder().getVertexList();
|
||||
const ConvexPlanarPolygon::VertexList& vertexList = cpo.getOccluder().getVertexList();
|
||||
|
||||
fw.indent() << "Occluder " << vertexList.size()<< "{"<< std::endl;
|
||||
fw.moveIn();
|
||||
|
||||
for(ConvexPlanerPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
for(ConvexPlanarPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
itr!=vertexList.end();
|
||||
++itr)
|
||||
{
|
||||
@ -148,17 +148,17 @@ bool ConvexPlanerOccluder_writeLocalData(const Object& obj, Output& fw)
|
||||
}
|
||||
|
||||
// write out any holes.
|
||||
const ConvexPlanerOccluder::HoleList& holeList = cpo.getHoleList();
|
||||
for(ConvexPlanerOccluder::HoleList::const_iterator holeItr=holeList.begin();
|
||||
const ConvexPlanarOccluder::HoleList& holeList = cpo.getHoleList();
|
||||
for(ConvexPlanarOccluder::HoleList::const_iterator holeItr=holeList.begin();
|
||||
holeItr!=holeList.end();
|
||||
++holeItr)
|
||||
{
|
||||
const ConvexPlanerPolygon::VertexList& vertexList = holeItr->getVertexList();
|
||||
const ConvexPlanarPolygon::VertexList& vertexList = holeItr->getVertexList();
|
||||
|
||||
fw.indent() << "Hole " << vertexList.size() << "{"<< std::endl;
|
||||
fw.moveIn();
|
||||
|
||||
for(ConvexPlanerPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
for(ConvexPlanarPolygon::VertexList::const_iterator itr=vertexList.begin();
|
||||
itr!=vertexList.end();
|
||||
++itr)
|
||||
{
|
@ -7,7 +7,7 @@ CXXFILES =\
|
||||
BlendFunc.cpp\
|
||||
ClipPlane.cpp\
|
||||
ColorMask.cpp\
|
||||
ConvexPlanerOccluder.cpp\
|
||||
ConvexPlanarOccluder.cpp\
|
||||
CullFace.cpp\
|
||||
Depth.cpp\
|
||||
DOFTransform.cpp\
|
||||
|
@ -27,9 +27,9 @@ bool OccluderNode_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
OccluderNode& occludernode = static_cast<OccluderNode&>(obj);
|
||||
|
||||
static ref_ptr<ConvexPlanerOccluder> s_occluder = osgNew ConvexPlanerOccluder;
|
||||
static ref_ptr<ConvexPlanarOccluder> s_occluder = osgNew ConvexPlanarOccluder;
|
||||
|
||||
ConvexPlanerOccluder* tmpOccluder = static_cast<ConvexPlanerOccluder*>(fr.readObjectOfType(*s_occluder));
|
||||
ConvexPlanarOccluder* tmpOccluder = static_cast<ConvexPlanarOccluder*>(fr.readObjectOfType(*s_occluder));
|
||||
|
||||
if (tmpOccluder)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user