H3D API
2.4.1
|
The HAnimSegment object is a container for information about a segment of the body. More...
#include <H3D/HAnimSegment.h>
Public Member Functions | |
HAnimSegment (Inst< AddChildren > _addChildren=0, Inst< RemoveChildren > _removeChildren=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0, Inst< SFVec3f > _centerOfMass=0, Inst< SFCoordinateNode > _coord=0, Inst< MFDisplacer > _displacers=0, Inst< SFFloat > _mass=0, Inst< MFFloat > _momentsOfInertia=0, Inst< SFString > _name=0) | |
Constructor. | |
virtual void | traverseSG (TraverseInfo &ti) |
Traverse the scenegraph. traverseSG() is called in all children nodes. | |
![]() | |
X3DGroupingNode (Inst< AddChildren > _addChildren=0, Inst< RemoveChildren > _removeChildren=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0) | |
Constructor. | |
virtual | ~X3DGroupingNode () |
Destructor. | |
virtual void | initialize () |
Sets up the bound field using the bboxCenter and bboxSize fields. More... | |
virtual void | render () |
Render the children. | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and a Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
![]() | |
X3DChildNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
![]() | |
H3DBoundedObject (Inst< SFBound > _bound=0) | |
Constructor. | |
![]() | |
H3DDisplayListObject (Inst< DisplayList > _displayList=0) | |
Constructor. | |
Public Attributes | |
H3DUniquePtr< SFVec3f > | centerOfMass |
The X3D specification does not describe this field at all. More... | |
H3DUniquePtr< SFCoordinateNode > | coord |
Contains the coordinate node for the segment. More... | |
H3DUniquePtr< MFDisplacer > | displacers |
The displacers field contains a list of HAnimDisplacer objects that are used to morph the deformable mesh using the morph targets defined in the Displacer objects. More... | |
H3DUniquePtr< SFFloat > | mass |
The X3D specification does not describe this field at all. More... | |
H3DUniquePtr< MFFloat > | momentsOfInertia |
The X3D specification does not describe this field at all. More... | |
H3DUniquePtr< SFString > | name |
The name field contains a name that is used for identifying the object. More... | |
![]() | |
bool | use_union_bound |
if true a route will be set up between the bound field of the nodes in children and the bound field of the grouping node. More... | |
H3DUniquePtr< AddChildren > | addChildren |
The addChildren event appends nodes to the children field of a grouping node. More... | |
H3DUniquePtr< RemoveChildren > | removeChildren |
The removeChildren event removes nodes from the children field of the grouping node . More... | |
H3DUniquePtr< MFChild > | children |
The nodes that are grouped together by this node. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
![]() | |
H3DUniquePtr< SFVec3f > | bboxCenter |
Specifies a the center of an axis-aligned bounding box enclosing the node. More... | |
H3DUniquePtr< SFVec3f > | bboxSize |
Specifies a the size of an axis-aligned bounding box enclosing the node. More... | |
![]() | |
H3DUniquePtr< SFBound > | bound |
The field containing the bound object. More... | |
![]() | |
H3DUniquePtr< DisplayList > | displayList |
The DisplayList instance handling the OpenGL caching of this object. | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Protected Member Functions | |
template<class VectorType > | |
void | updateCoordinates (VectorType &points) |
Template function to apply the displacements to segment coordinates. More... | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
Protected Attributes | |
vector< Vec3d > | points_double |
vector for storing the original points before joint and displacer modification if the original coord data is double precision. | |
vector< Vec3f > | points_single |
vector for storing the original points before joint and displacer modification if the original coord data is single precision. | |
AutoRef< X3DCoordinateNode > | current_coordinate |
The coordinate node that was used as base coordinate in last traverseSG. | |
![]() | |
bool | children_multi_pass_transparency |
Will be set in traverseSG to indicate if any of the children enables multi-pass transparency. More... | |
vector< H3DRenderStateObject * > | render_states |
A vector of all the H3DRenderStatesObject within this X3DGroupingNode. | |
vector< ClipPlane * > | clip_planes |
A vector of only ClipPlane children of this X3DGroupingNode. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
The HAnimSegment object is a container for information about a segment of the body.
The name field contains a name that is used for identifying the object.
The displacers field contains a list of HAnimDisplacer objects that are used to morph the deformable mesh using the morph targets defined in the Displacer objects.
Examples:
|
inlineprotected |
Template function to apply the displacements to segment coordinates.
Since the points can be both floats or doubles a template is used.
points | The original points before any deformation. The displacemet will be added. |
References H3D::HAnimDisplacer::displaceCoordinates(), displacers, and H3DUtil::AutoRefVector< class >::size().
Referenced by traverseSG().
H3DUniquePtr< SFVec3f > H3D::HAnimSegment::centerOfMass |
H3DUniquePtr< SFCoordinateNode > H3D::HAnimSegment::coord |
Contains the coordinate node for the segment.
The HAnimDisplacer nodes in the displacer field will morph the coordinates contained in the point field of the coordinate node.
Access type: inputOutput
Default value: 0 0 0
Referenced by traverseSG().
H3DUniquePtr< MFDisplacer > H3D::HAnimSegment::displacers |
The displacers field contains a list of HAnimDisplacer objects that are used to morph the deformable mesh using the morph targets defined in the Displacer objects.
Access type: inputOutput
Default value: []
Referenced by updateCoordinates().
H3DUniquePtr< SFFloat > H3D::HAnimSegment::mass |
H3DUniquePtr< MFFloat > H3D::HAnimSegment::momentsOfInertia |
H3DUniquePtr< SFString > H3D::HAnimSegment::name |
The name field contains a name that is used for identifying the object.
Access type: inputOutput
Default value: ""