Ported various demos and support classes over to use the new osg::Geometry class
thus removing dependancy on osg::Geoset from most of the OSG, only loaders left to port now.
This commit is contained in:
@@ -28,7 +28,7 @@ enum ArrayType
|
||||
Vec4ArrayType = 11
|
||||
};
|
||||
|
||||
class AttributeArray : public Object
|
||||
class SG_EXPORT AttributeArray : public Object
|
||||
{
|
||||
|
||||
public:
|
||||
@@ -117,7 +117,7 @@ enum PrimitiveType
|
||||
UIntDrawElementsPrimitiveType = 4,
|
||||
};
|
||||
|
||||
class Primitive : public Object
|
||||
class SG_EXPORT Primitive : public Object
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace osgUtil {
|
||||
|
||||
/** Visitor for traversing scene graph and setting each osg::GeoSet's _useDisplayList flag,
|
||||
/** Visitor for traversing scene graph and setting each osg::Drawable's _useDisplayList flag,
|
||||
* with option to immediately compile osg::Drawable OpenGL Display lists and
|
||||
* osg::StateAttribute's.
|
||||
*/
|
||||
@@ -32,13 +32,13 @@ class OSGUTIL_EXPORT DisplayListVisitor : public osg::NodeVisitor
|
||||
|
||||
typedef unsigned int Mode;
|
||||
|
||||
/** Construct a CompileGeoSetsVisior to traverse all child,
|
||||
/** Construct a DisplayListVisior to traverse all child,
|
||||
* with set specified display list mode. Default mode is to
|
||||
* gset->setUseDisplayList(true).
|
||||
*/
|
||||
DisplayListVisitor(Mode mode=COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES);
|
||||
|
||||
/** Set the operational mode of how the visitor should set up osg::GeoSet's.*/
|
||||
/** Set the operational mode of how the visitor should set up osg::Drawable's.*/
|
||||
void setMode(Mode mode) { _mode = mode; }
|
||||
|
||||
/** Get the operational mode.*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Geode>
|
||||
#include <osg/GeoSet>
|
||||
#include <osg/Geometry>
|
||||
|
||||
#include <osgUtil/Export>
|
||||
|
||||
@@ -27,7 +27,7 @@ class OSGUTIL_EXPORT SmoothingVisitor : public osg::NodeVisitor
|
||||
}
|
||||
|
||||
/// smooth geoset by creating per vertex normals.
|
||||
static void smooth(osg::GeoSet& geoset);
|
||||
static void smooth(osg::Geometry& geoset);
|
||||
|
||||
/// apply smoothing method to all geode geosets.
|
||||
virtual void apply(osg::Geode& geode);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace osgUtil {
|
||||
|
||||
/** A tri stripping visitor for converting GeoSet primitives into tri strips.
|
||||
/** A tri stripping visitor for converting Geometry surface primitives into tri strips.
|
||||
* The current implemention is based up NVidia's NvTriStrip.
|
||||
*/
|
||||
class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
|
||||
@@ -26,13 +26,13 @@ class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
|
||||
setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
|
||||
}
|
||||
|
||||
/** convert mesh primitives in geoset into Tri Strips using
|
||||
/** convert mesh primitives in Geometry into Tri Strips using
|
||||
* NvTriStrip. Converts all primitive types except points
|
||||
* and lines, linestrips which it leaves unchanged.
|
||||
*/
|
||||
static void stripify(osg::Geometry& drawable);
|
||||
|
||||
/// apply stripify method to all geode geosets.
|
||||
/// apply stripify method to all geode geometry.
|
||||
virtual void apply(osg::Geode& geode);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user