OpenSceneGraph
Classes | Namespaces | Macros | Typedefs | Functions
Shape File Reference
#include <osg/Object>
#include <osg/Vec3>
#include <osg/Quat>
#include <osg/Plane>
#include <osg/Array>

Classes

class  osg::Shape
 Base class for all shape types. More...
 
class  osg::ShapeVisitor
 
class  osg::ConstShapeVisitor
 
class  osg::Sphere
 
class  osg::Box
 
class  osg::Cone
 
class  osg::Cylinder
 
class  osg::Capsule
 
class  osg::InfinitePlane
 Deprecated. More...
 
class  osg::TriangleMesh
 Deprecated. More...
 
class  osg::ConvexHull
 Deprecated. More...
 
class  osg::HeightField
 
class  osg::CompositeShape
 Deprecated. More...
 
class  osg::TessellationHints
 Describe several hints that can be passed to a Tessellator (like the one used by ShapeDrawable) as a mean to try to influence the way it works. More...
 
class  osg::BuildShapeGeometryVisitor
 Convenience class for populating an Geometry with vertex, normals, texture coords and primitives that can render a Shape. More...
 

Namespaces

 osg
 The core osg library provides the basic scene graph classes such as Nodes, State and Drawables, and maths and general helper classes.
 

Macros

#define OSG_SHAPE   1
 
#define META_Shape(library, name)
 META_StateAttribute macro define the standard clone, isSameKindAs, className and getType methods. More...
 

Typedefs

typedef HeightField osg::Grid
 

Functions

OSG_EXPORT Geometry * osg::convertShapeToGeometry (const Shape &shape, const TessellationHints *hints)
 
OSG_EXPORT Geometry * osg::convertShapeToGeometry (const Shape &shape, const TessellationHints *hints, const Vec4 &color, Array::Binding colorBinding=Array::BIND_OVERALL)
 

Macro Definition Documentation

◆ META_Shape

#define META_Shape (   library,
  name 
)
Value:
virtual Object* cloneType() const { return new name(); } \
virtual Object* clone(const CopyOp& copyop) const { return new name (*this,copyop); } \
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
virtual const char* libraryName() const { return #library; } \
virtual const char* className() const { return #name; } \
virtual void accept(ShapeVisitor& sv) { sv.apply(*this); } \
virtual void accept(ConstShapeVisitor& csv) const { csv.apply(*this); }
#define NULL
Definition: Export:55
T * clone(const T *t, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition: Object:323
T * cloneType(const T *t)
Definition: Object:365

META_StateAttribute macro define the standard clone, isSameKindAs, className and getType methods.

Use when subclassing from Object to make it more convenient to define the standard pure virtual methods which are required for all Object subclasses.

Referenced by osg::Box::Box(), osg::Capsule::Capsule(), osg::CompositeShape::CompositeShape(), osg::Cone::Cone(), osg::ConvexHull::ConvexHull(), osg::Cylinder::Cylinder(), osg::InfinitePlane::InfinitePlane(), osg::Sphere::Sphere(), and osg::TriangleMesh::TriangleMesh().

◆ OSG_SHAPE

#define OSG_SHAPE   1