Renamed ProceduralGeometry to ShapeDrawable to better reflect its current
purpose.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <osg/Geode>
|
||||
#include <osg/ProceduralGeometry>
|
||||
#include <osg/ShapeDrawable>
|
||||
#include <osg/Material>
|
||||
#include <osg/Texture2D>
|
||||
|
||||
@@ -37,10 +37,10 @@ osg::Geode* createShapes()
|
||||
float radius = 0.8f;
|
||||
float height = 1.0f;
|
||||
|
||||
geode->addDrawable(new osg::ProceduralGeometry(osgNew osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),radius)));
|
||||
geode->addDrawable(new osg::ProceduralGeometry(osgNew osg::Box(osg::Vec3(2.0f,0.0f,0.0f),2*radius)));
|
||||
geode->addDrawable(new osg::ProceduralGeometry(osgNew osg::Cone(osg::Vec3(4.0f,0.0f,0.0f),radius,height)));
|
||||
geode->addDrawable(new osg::ProceduralGeometry(osgNew osg::Cylinder(osg::Vec3(6.0f,0.0f,0.0f),radius,height)));
|
||||
geode->addDrawable(new osg::ShapeDrawable(osgNew osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),radius)));
|
||||
geode->addDrawable(new osg::ShapeDrawable(osgNew osg::Box(osg::Vec3(2.0f,0.0f,0.0f),2*radius)));
|
||||
geode->addDrawable(new osg::ShapeDrawable(osgNew osg::Cone(osg::Vec3(4.0f,0.0f,0.0f),radius,height)));
|
||||
geode->addDrawable(new osg::ShapeDrawable(osgNew osg::Cylinder(osg::Vec3(6.0f,0.0f,0.0f),radius,height)));
|
||||
|
||||
osg::Grid* grid = new osg::Grid;
|
||||
grid->allocateGrid(38,39);
|
||||
@@ -54,7 +54,7 @@ osg::Geode* createShapes()
|
||||
grid->setHeight(c,r,vertex[r+c*39][2]);
|
||||
}
|
||||
}
|
||||
geode->addDrawable(new osg::ProceduralGeometry(grid));
|
||||
geode->addDrawable(new osg::ShapeDrawable(grid));
|
||||
|
||||
osg::ConvexHull* mesh = new osg::ConvexHull;
|
||||
osg::Vec3Array* vertices = new osg::Vec3Array(4);
|
||||
@@ -77,7 +77,7 @@ osg::Geode* createShapes()
|
||||
(*indices)[11]=3;
|
||||
mesh->setVertices(vertices);
|
||||
mesh->setIndices(indices);
|
||||
geode->addDrawable(new osg::ProceduralGeometry(mesh));
|
||||
geode->addDrawable(new osg::ShapeDrawable(mesh));
|
||||
|
||||
return geode;
|
||||
}
|
||||
|
||||
@@ -62,13 +62,13 @@ CXXFILES =\
|
||||
PolygonStipple.cpp\
|
||||
PositionAttitudeTransform.cpp\
|
||||
PrimitiveSet.cpp\
|
||||
ProceduralGeometry.cpp\
|
||||
Projection.cpp\
|
||||
Quat.cpp\
|
||||
Sequence.cpp\
|
||||
ShadeModel.cpp\
|
||||
ShadowVolumeOccluder.cpp\
|
||||
Shape.cpp\
|
||||
ShapeDrawable.cpp\
|
||||
State.cpp\
|
||||
StateSet.cpp\
|
||||
Stencil.cpp\
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <osg/ProceduralGeometry>
|
||||
#include <osg/ShapeDrawable>
|
||||
#include <osg/GL>
|
||||
|
||||
using namespace osg;
|
||||
@@ -1229,29 +1229,29 @@ void PrimitiveShapeVisitor::apply(const CompositeShape& group)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ProceduralGeometry itself..
|
||||
// ShapeDrawable itself..
|
||||
//
|
||||
|
||||
|
||||
ProceduralGeometry::ProceduralGeometry()
|
||||
ShapeDrawable::ShapeDrawable()
|
||||
{
|
||||
}
|
||||
|
||||
ProceduralGeometry::ProceduralGeometry(Shape* shape)
|
||||
ShapeDrawable::ShapeDrawable(Shape* shape)
|
||||
{
|
||||
setShape(shape);
|
||||
}
|
||||
|
||||
ProceduralGeometry::ProceduralGeometry(const ProceduralGeometry& pg,const CopyOp& copyop):
|
||||
ShapeDrawable::ShapeDrawable(const ShapeDrawable& pg,const CopyOp& copyop):
|
||||
Drawable(pg,copyop)
|
||||
{
|
||||
}
|
||||
|
||||
ProceduralGeometry::~ProceduralGeometry()
|
||||
ShapeDrawable::~ShapeDrawable()
|
||||
{
|
||||
}
|
||||
|
||||
void ProceduralGeometry::drawImmediateMode(State& state)
|
||||
void ShapeDrawable::drawImmediateMode(State& state)
|
||||
{
|
||||
if (_shape.valid())
|
||||
{
|
||||
@@ -1260,11 +1260,11 @@ void ProceduralGeometry::drawImmediateMode(State& state)
|
||||
}
|
||||
}
|
||||
|
||||
void ProceduralGeometry::accept(ConstAttributeFunctor&) const
|
||||
void ShapeDrawable::accept(ConstAttributeFunctor&) const
|
||||
{
|
||||
}
|
||||
|
||||
void ProceduralGeometry::accept(PrimitiveFunctor& pf) const
|
||||
void ShapeDrawable::accept(PrimitiveFunctor& pf) const
|
||||
{
|
||||
if (_shape.valid())
|
||||
{
|
||||
@@ -1274,7 +1274,7 @@ void ProceduralGeometry::accept(PrimitiveFunctor& pf) const
|
||||
}
|
||||
|
||||
|
||||
bool ProceduralGeometry::computeBound() const
|
||||
bool ShapeDrawable::computeBound() const
|
||||
{
|
||||
|
||||
if (_shape.valid())
|
||||
Reference in New Issue
Block a user