GeometryNode Class Reference

#include <Ample.h>

Inheritance diagram for GeometryNode:
Inheritance graph
[legend]
Collaboration diagram for GeometryNode:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Observer< NodeObserverObserverType
typedef std::vector
< NodeObserver * > 
ObserverList

Public Member Functions

void createLayer (const std::string &name, VNGLayerType type, uint32 defaultInt=0, real64 defaultReal=0.0)
bool getBaseMesh (BaseMesh &mesh)
GeometryLayergetLayerByID (VLayerID ID)
const GeometryLayergetLayerByID (VLayerID ID) const
GeometryLayergetLayerByIndex (unsigned int index)
const GeometryLayergetLayerByIndex (unsigned int index) const
GeometryLayergetLayerByName (const std::string &name)
const GeometryLayergetLayerByName (const std::string &name) const
bool isVertex (uint32 vertexID) const
bool isPolygon (uint32 polygonID) const
bool getBaseVertex (uint32 vertexID, BaseVertex &vertex) const
bool getBasePolygon (uint32 polygonID, BasePolygon &polygon) const
void setBaseVertex (uint32 vertexID, const BaseVertex &vertex)
void setBasePolygon (uint32 polygonID, const BasePolygon &polygon)
void deleteVertex (uint32 vertexID)
void deletePolygon (uint32 polygonID)
size_t getVertexSize (void) const
size_t getPolygonSize (void) const
GeometryLayergetVertexCreaseLayer (void)
const std::string & getVertexCreaseLayerName (void) const
uint32 getVertexDefaultCrease (void) const
void setVertexDefaultCrease (uint32 crease)
GeometryLayergetEdgeCreaseLayer (void)
const std::string & getEdgeCreaseLayerName (void) const
uint32 getEdgeDefaultCrease (void) const
void setEdgeDefaultCrease (uint32 crease)
uint32 getHighestVertexID (void) const
uint32 getFirstFreeVertexID (void) const
uint32 getHighestPolygonID (void) const
uint32 getFirstFreePolygonID (void) const
uint32 getVertexCount (void) const
uint32 getPolygonCount (void) const
void destroy (void)
void createTagGroup (const std::string &name)
TagGroupgetTagGroupByID (uint16 ID)
const TagGroupgetTagGroupByID (uint16 ID) const
TagGroupgetTagGroupByIndex (unsigned int index)
const TagGroupgetTagGroupByIndex (unsigned int index) const
TagGroupgetTagGroupByName (const std::string &name)
const TagGroupgetTagGroupByName (const std::string &name) const
unsigned int getTagGroupCount (void) const
TaggetTagByNames (const std::string &groupName, const std::string &tagName)
const TaggetTagByNames (const std::string &groupName, const std::string &tagName) const
bool isMine (void) const
VNodeID getID (void) const
VNodeType getType (void) const
const std::string & getName (void) const
void setName (const std::string &name)
SessiongetSession (void) const
unsigned int getDataVersion (void) const
unsigned int getStructureVersion (void) const
void addObserver (NodeObserver &observer)
void removeObserver (NodeObserver &observer)
void removeObserver (Observer< NodeObserver > &observer)
const ObserverListgetObservers (void) const

Friends

class GeometryLayer
class Session

Detailed Description

Geometry node class. Represents a single geometry node.


Member Typedef Documentation

typedef std::vector<NodeObserver *> ObserverList [inherited]
typedef Observer<NodeObserver > ObserverType [inherited]

Member Function Documentation

void addObserver ( NodeObserver observer  )  [inline, inherited]

Adds the specified observer to this object.

Parameters:
observer The observer to add.
Remarks:
An observer can only be added once. Additional additions are ignored.
void createLayer ( const std::string &  name,
VNGLayerType  type,
uint32  defaultInt = 0,
real64  defaultReal = 0.0 
)

Creates a geometry layer in this node.

Parameters:
name The desired name of the geometry layer.
type The desired slot type of the geometry layer.
defaultInt The desired default value for integer slots.
defaultReal The desired default value for real slots.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void createTagGroup ( const std::string &  name  )  [inherited]

Creates a new tag group in this node.

Parameters:
name The desired name of the tag group.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void deletePolygon ( uint32  polygonID  ) 

Deletes the polygon with the specified ID.

Parameters:
polygonID The ID of the polygon to delete.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void deleteVertex ( uint32  vertexID  ) 

Deletes the vertex with the specified ID.

Parameters:
vertexID The ID of the vertex to delete.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void destroy ( void   )  [inherited]

Destroys this node.

Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
bool getBaseMesh ( BaseMesh mesh  ) 

Builds a base mesh of all the valid polygons and vertices in this geometry node.

Parameters:
mesh The mesh to receive the constructed geometry.
Returns:
true if successful, or false if no valid geometry was available.
Remarks:
This method is intended to make geometry extraction easier.
bool getBasePolygon ( uint32  polygonID,
BasePolygon polygon 
) const

Retrieves the base layer data of the specified polygon.

Parameters:
polygonID The ID of the desired polygon.
polygon The base layer data of the desired vertex.
Returns:
true if the polygon was valid, otherwise false.
bool getBaseVertex ( uint32  vertexID,
BaseVertex vertex 
) const

Retrieves the base layer data of the specified vertex.

Parameters:
vertexID The ID of the desired vertex.
vertex The base layer data of the desired vertex.
Returns:
true if the vertex was valid, otherwise false.
unsigned int getDataVersion ( void   )  const [inherited]
Returns:
The current version of the internal state.
Remarks:
This value is updated for any kind of change.
GeometryLayer* getEdgeCreaseLayer ( void   ) 
Returns:
The geometry layer containing edge crease data, or NULL if no such layer exists.
const std::string& getEdgeCreaseLayerName ( void   )  const
Returns:
The name of the geometry layer containing edge crease data, or the empty string if no name is set.
uint32 getEdgeDefaultCrease ( void   )  const
Returns:
The default edge crease value.
uint32 getFirstFreePolygonID ( void   )  const
Returns:
The lowest available polygon ID.
Remarks:
This isn't updated by local polygon creation requests.
uint32 getFirstFreeVertexID ( void   )  const
Returns:
The lowest available vertex ID.
Remarks:
This isn't updated by local vertex creation requests.
uint32 getHighestPolygonID ( void   )  const
Returns:
The highest currently valid polygon ID.
uint32 getHighestVertexID ( void   )  const
Returns:
The highest currently valid vertex ID.
VNodeID getID ( void   )  const [inherited]
Returns:
The ID of this node.
const GeometryLayer* getLayerByID ( VLayerID  ID  )  const
Parameters:
ID The ID of the desired geometry layer.
Returns:
The geometry layer with the specified ID, or NULL if no such geometry layer exists.
GeometryLayer* getLayerByID ( VLayerID  ID  ) 
Parameters:
ID The ID of the desired geometry layer.
Returns:
The geometry layer with the specified ID, or NULL if no such geometry layer exists.
const GeometryLayer* getLayerByIndex ( unsigned int  index  )  const
Parameters:
index The index of the desired geometry layer.
Returns:
The geometry layer at the specified index, or NULL if no such geometry layer exists.
GeometryLayer* getLayerByIndex ( unsigned int  index  ) 
Parameters:
index The index of the desired geometry layer.
Returns:
The geometry layer at the specified index, or NULL if no such geometry layer exists.
const GeometryLayer* getLayerByName ( const std::string &  name  )  const
Parameters:
name The name of the desired geometry layer
Returns:
The geometry layer with the specified name, or NULL if no such geometry layer exists.
GeometryLayer* getLayerByName ( const std::string &  name  ) 
Parameters:
name The name of the desired geometry layer
Returns:
The geometry layer with the specified name, or NULL if no such geometry layer exists.
const std::string& getName ( void   )  const [inherited]
Returns:
The name of this node.
const ObserverList& getObservers ( void   )  const [inline, inherited]
Returns:
The list of observers attached to this object.
uint32 getPolygonCount ( void   )  const
Returns:
The number of valid polygons.
size_t getPolygonSize ( void   )  const
Returns:
The size, in bytes, of all the geometry layer slots that make up a single polygon.
Session& getSession ( void   )  const [inherited]
Returns:
The session containing this node.
unsigned int getStructureVersion ( void   )  const [inherited]
Returns:
The current version of the internal structure.
Remarks:
This value is only updated when the internal structure changes.
const Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
) const [inherited]
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
) [inherited]
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
const TagGroup* getTagGroupByID ( uint16  ID  )  const [inherited]
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
TagGroup* getTagGroupByID ( uint16  ID  )  [inherited]
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
const TagGroup* getTagGroupByIndex ( unsigned int  index  )  const [inherited]
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
TagGroup* getTagGroupByIndex ( unsigned int  index  )  [inherited]
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
const TagGroup* getTagGroupByName ( const std::string &  name  )  const [inherited]
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
TagGroup* getTagGroupByName ( const std::string &  name  )  [inherited]
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
unsigned int getTagGroupCount ( void   )  const [inherited]
Returns:
The number of tag groups in this node.
VNodeType getType ( void   )  const [inherited]
Returns:
The type of this node.
uint32 getVertexCount ( void   )  const
Returns:
The number of valid vertices.
GeometryLayer* getVertexCreaseLayer ( void   ) 
Returns:
The geometry layer containing vertex crease data, or NULL if no such layer exists.
const std::string& getVertexCreaseLayerName ( void   )  const
Returns:
The name of the geometry layer containing vertex crease data, or the empty string if no name is set.
uint32 getVertexDefaultCrease ( void   )  const
Returns:
The default vertex crease value.
size_t getVertexSize ( void   )  const
Returns:
The size, in bytes, of all the geometry layer slots that make up a single vertex.
bool isMine ( void   )  const [inherited]
Returns:
true if this node was created from this client, otherwise false.
bool isPolygon ( uint32  polygonID  )  const
Returns:
true if the polygon with the specified ID is valid.
bool isVertex ( uint32  vertexID  )  const
Returns:
true if the vertex with the specified ID is valid.
void removeObserver ( Observer< NodeObserver > &  observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void removeObserver ( NodeObserver observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void setBasePolygon ( uint32  polygonID,
const BasePolygon polygon 
)

Sets the base layer data for the specified polygon.

Parameters:
polygonID The ID of the polygon to create or change.
polygon The data for the base polygon layer.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setBaseVertex ( uint32  vertexID,
const BaseVertex vertex 
)

Sets the base layer data for the specified vertex.

Parameters:
vertexID The ID of the vertex to create or change.
vertex The data for the base vertex layer.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setEdgeDefaultCrease ( uint32  crease  ) 

Sets the default edge crease value.

Parameters:
crease The default edge crease value.
void setName ( const std::string &  name  )  [inherited]

Changes the name of this node.

Parameters:
name The desired name.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setVertexDefaultCrease ( uint32  crease  ) 

Sets the default vertex crease value.

Parameters:
crease The default vertex crease value.

Friends And Related Function Documentation

friend class GeometryLayer [friend]

Reimplemented from Versioned.

friend class Session [friend]

Reimplemented from Node.


Generated on Thu Nov 19 20:19:28 2009 for Ample by  doxygen 1.6.1