Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::Geometry Class Reference

Inheritance diagram for osg::Geometry:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< ref_ptr<
Array > > 
TexCoordArrayList
typedef std::vector< ref_ptr<
Primitive > > 
PrimitiveList
enum  AttributeBinding { BIND_OFF = 0, BIND_OVERALL, BIND_PER_PRIMITIVE, BIND_PER_VERTEX }

Public Methods

 Geometry ()
 Geometry (const Geometry &geometry, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.

virtual Object * cloneType () const
 Clone the type of an object, with Object* return type.

virtual Object * clone (const CopyOp &copyop) const
 Clone the an object, with Object* return type.

virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
 return the name of the object's library.

virtual const char * className () const
 return the name of the object's class type.

void setVertexArray (Vec3Array *array)
Vec3Array * getVertexArray ()
const Vec3Array * getVertexArray () const
void setNormalBinding (AttributeBinding ab)
AttributeBinding getNormalBinding () const
void setNormalArray (Vec3Array *array)
Vec3Array * getNormalArray ()
const Vec3Array * getNormalArray () const
void setColorBinding (AttributeBinding ab)
AttributeBinding getColorBinding () const
void setColorArray (Array *array)
Array * getColorArray ()
const Array * getColorArray () const
void setSecondaryColorBinding (AttributeBinding ab)
AttributeBinding getSecondaryColorBinding () const
void setSecondaryColorArray (Array *array)
Array * getSecondaryColorArray ()
const Array * getSecondaryColorArray () const
void setFogCoordBinding (AttributeBinding ab)
AttributeBinding getFogCoordBinding () const
void setFogCoordArray (FloatArray *array)
FloatArray * getFogCoordArray ()
const FloatArray * getFogCoordArray () const
void setTexCoordArray (unsigned int unit, Array *)
Array * getTexCoordArray (unsigned int unit)
const Array * getTexCoordArray (unsigned int unit) const
unsigned int getNumTexCoordArrays () const
TexCoordArrayList & getTexCoordArrayList ()
const TexCoordArrayList & getTexCoordArrayList () const
void setPrimitiveList (const PrimitiveList &primitives)
PrimitiveList & getPrimitiveList ()
const PrimitiveList & getPrimitiveList () const
unsigned int getNumPrimitives () const
Primitive * getPrimitive (unsigned int pos)
const Primitive * getPrimitive (unsigned int pos) const
void addPrimitive (Primitive *primitive)
bool verifyBindings () const
void computeCorrectBindingsAndArraySizes ()
virtual void drawImmediateMode (State &state)
 draw Geometry directly ignoring an OpenGL display list which could be attached.

virtual void accept (AttributeFunctor &af)
 accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.

virtual void accept (PrimitiveFunctor &pf)
 accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.


Protected Methods

Geometry & operator= (const Geometry &)
virtual ~Geometry ()

Protected Attributes

PrimitiveList _primitives
ref_ptr< Vec3Array > _vertexArray
AttributeBinding _normalBinding
ref_ptr< Vec3Array > _normalArray
AttributeBinding _colorBinding
ref_ptr< Array > _colorArray
AttributeBinding _secondaryColorBinding
ref_ptr< Array > _secondaryColorArray
AttributeBinding _fogCoordBinding
ref_ptr< FloatArray > _fogCoordArray
TexCoordArrayList _texCoordList

Member Typedef Documentation

typedef std::vector< ref_ptr<Primitive> > osg::Geometry::PrimitiveList
 

typedef std::vector< ref_ptr<Array> > osg::Geometry::TexCoordArrayList
 


Member Enumeration Documentation

enum osg::Geometry::AttributeBinding
 

Enumeration values:
BIND_OFF 
BIND_OVERALL 
BIND_PER_PRIMITIVE 
BIND_PER_VERTEX 


Constructor & Destructor Documentation

osg::Geometry::Geometry (    ) 
 

osg::Geometry::Geometry (  const Geometry &    geometry,
const CopyOp &    copyop = CopyOp::SHALLOW_COPY
) 
 

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::Geometry::~Geometry (    )  [protected, virtual]
 


Member Function Documentation

virtual void osg::Geometry::accept (  PrimitiveFunctor &    pf )  [virtual]
 

accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.

Reimplemented from osg::Drawable.

virtual void osg::Geometry::accept (  AttributeFunctor &    af )  [virtual]
 

accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.

Reimplemented from osg::Drawable.

void osg::Geometry::addPrimitive (  Primitive *    primitive )  [inline]
 

virtual const char* osg::Geometry::className (    )  const [inline, virtual]
 

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osg::Drawable.

virtual Object* osg::Geometry::clone (  const CopyOp &    copyop )  const [inline, virtual]
 

Clone the an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

virtual Object* osg::Geometry::cloneType (    )  const [inline, virtual]
 

Clone the type of an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

void osg::Geometry::computeCorrectBindingsAndArraySizes (    ) 
 

virtual void osg::Geometry::drawImmediateMode (  State &    state )  [virtual]
 

draw Geometry directly ignoring an OpenGL display list which could be attached.

This is the internal draw method which does the drawing itself, and is the method to override when deriving from Geometry for user-drawn objects.

Implements osg::Drawable.

const Array* osg::Geometry::getColorArray (    )  const [inline]
 

Array* osg::Geometry::getColorArray (    )  [inline]
 

AttributeBinding osg::Geometry::getColorBinding (    )  const [inline]
 

const FloatArray* osg::Geometry::getFogCoordArray (    )  const [inline]
 

FloatArray* osg::Geometry::getFogCoordArray (    )  [inline]
 

AttributeBinding osg::Geometry::getFogCoordBinding (    )  const [inline]
 

const Vec3Array* osg::Geometry::getNormalArray (    )  const [inline]
 

Vec3Array* osg::Geometry::getNormalArray (    )  [inline]
 

AttributeBinding osg::Geometry::getNormalBinding (    )  const [inline]
 

unsigned int osg::Geometry::getNumPrimitives (    )  const [inline]
 

unsigned int osg::Geometry::getNumTexCoordArrays (    )  const [inline]
 

const Primitive* osg::Geometry::getPrimitive (  unsigned int    pos )  const [inline]
 

Primitive* osg::Geometry::getPrimitive (  unsigned int    pos )  [inline]
 

const PrimitiveList& osg::Geometry::getPrimitiveList (    )  const [inline]
 

PrimitiveList& osg::Geometry::getPrimitiveList (    )  [inline]
 

const Array* osg::Geometry::getSecondaryColorArray (    )  const [inline]
 

Array* osg::Geometry::getSecondaryColorArray (    )  [inline]
 

AttributeBinding osg::Geometry::getSecondaryColorBinding (    )  const [inline]
 

const Array* osg::Geometry::getTexCoordArray (  unsigned int    unit )  const
 

Array* osg::Geometry::getTexCoordArray (  unsigned int    unit ) 
 

const TexCoordArrayList& osg::Geometry::getTexCoordArrayList (    )  const [inline]
 

TexCoordArrayList& osg::Geometry::getTexCoordArrayList (    )  [inline]
 

const Vec3Array* osg::Geometry::getVertexArray (    )  const [inline]
 

Vec3Array* osg::Geometry::getVertexArray (    )  [inline]
 

virtual bool osg::Geometry::isSameKindAs (  const Object *    obj )  const [inline, virtual]
 

Reimplemented from osg::Drawable.

virtual const char* osg::Geometry::libraryName (    )  const [inline, virtual]
 

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention the is that the namspace of a library is the same as the library name.

Reimplemented from osg::Drawable.

Geometry& osg::Geometry::operator= (  const Geometry &    )  [inline, protected]
 

void osg::Geometry::setColorArray (  Array *    array )  [inline]
 

void osg::Geometry::setColorBinding (  AttributeBinding    ab )  [inline]
 

void osg::Geometry::setFogCoordArray (  FloatArray *    array )  [inline]
 

void osg::Geometry::setFogCoordBinding (  AttributeBinding    ab )  [inline]
 

void osg::Geometry::setNormalArray (  Vec3Array *    array )  [inline]
 

void osg::Geometry::setNormalBinding (  AttributeBinding    ab )  [inline]
 

void osg::Geometry::setPrimitiveList (  const PrimitiveList &    primitives )  [inline]
 

void osg::Geometry::setSecondaryColorArray (  Array *    array )  [inline]
 

void osg::Geometry::setSecondaryColorBinding (  AttributeBinding    ab )  [inline]
 

void osg::Geometry::setTexCoordArray (  unsigned int    unit,
Array *   
) 
 

void osg::Geometry::setVertexArray (  Vec3Array *    array )  [inline]
 

bool osg::Geometry::verifyBindings (    )  const
 


Member Data Documentation

ref_ptr<Array> osg::Geometry::_colorArray [protected]
 

AttributeBinding osg::Geometry::_colorBinding [protected]
 

ref_ptr<FloatArray> osg::Geometry::_fogCoordArray [protected]
 

AttributeBinding osg::Geometry::_fogCoordBinding [protected]
 

ref_ptr<Vec3Array> osg::Geometry::_normalArray [protected]
 

AttributeBinding osg::Geometry::_normalBinding [protected]
 

PrimitiveList osg::Geometry::_primitives [protected]
 

ref_ptr<Array> osg::Geometry::_secondaryColorArray [protected]
 

AttributeBinding osg::Geometry::_secondaryColorBinding [protected]
 

TexCoordArrayList osg::Geometry::_texCoordList [protected]
 

ref_ptr<Vec3Array> osg::Geometry::_vertexArray [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:31 2002 for the Open Scene Graph by doxygen 1.2.16.