Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <coordinatedeformer.h>
Inherits Node.
Inheritance diagram for CoordinateDeformer:
Public Member Functions | |
CoordinateDeformer (const char *name="") | |
virtual | ~CoordinateDeformer () |
virtual unsigned int | nbFields () const |
virtual FieldHandle | field (const std::string &n) |
virtual FieldHandle | field (const unsigned int i) |
virtual bool | isSetToDefaultValue (const unsigned int i) const |
virtual unsigned int | nbEventsIn () const |
virtual EventInHandle | eventIn (const std::string &n) |
virtual EventInHandle | eventIn (const unsigned int i) |
virtual unsigned int | nbEventsOut () const |
virtual EventOutHandle | eventOut (const std::string &n) |
virtual EventOutHandle | eventOut (const unsigned int i) |
const char * | typeName () const |
virtual Node * | duplicate () const |
virtual Node * | duplicate (std::map< const Node *, Node * > &) const |
Public Attributes | |
Exposed Fields | |
A field that is capable of receiving events via an eventIn to change its value(s), and generating events via an eventOut when its value(s) change. | |
MFNode | children |
MFVec3f | controlPoint |
MFNode | inputCoord |
MFNode | inputTransform |
MFNode | outputCoord |
MFFloat | weight |
Fields | |
A property or attribute of a node. Each node type has a fixed set of fields. Fields may contain various kinds of data and one or many values. Each field has a default value. | |
SFVec3f | bboxCenter |
SFVec3f | bboxSize |
SFInt32 | uDimension |
MFFloat | uKnot |
SFInt32 | uOrder |
SFInt32 | vDimension |
MFFloat | vKnot |
SFInt32 | vOrder |
SFInt32 | wDimension |
MFFloat | wKnot |
SFInt32 | wOrder |
Events In | |
EventIn< MFNode > | addChildren |
EventIn< MFNode > | removeChildren |
EventIn< MFNode > | set_children |
EventIn< MFVec3f > | set_controlPoint |
EventIn< MFNode > | set_inputCoord |
EventIn< MFNode > | set_inputTransform |
EventIn< MFNode > | set_outputCoord |
EventIn< MFFloat > | set_weight |
Events Out | |
EventOut< MFNode > | children_changed |
EventOut< MFVec3f > | controlPoint_changed |
EventOut< MFNode > | inputCoord_changed |
EventOut< MFNode > | inputTransform_changed |
EventOut< MFNode > | outputCoord_changed |
EventOut< MFFloat > | weight_changed |
CoordinateDeformer allows a free form deformation on a set of MFVec3f Coordinate nodes by using a NURBS volume. Conceptually, a set of input Coordinate nodes is placed into a non-uniform grid volume. If the grid control points are animated or deformed the output Coordinate nodes are updated accordingly.
The input to the deformer is a list of Coordinate nodes, where each Coordinate node defines a 3D parameter (u,v,w) for evaluation. The corresponding Cartesian output value is computed from the NURBS control grid. The children node contains a scene graph that typically consists of IndexedFaceSet nodes referring to a deformed Coordinate node in outputCoords.
The uDimension, vDimension, wDimension, controlPoint, weight, uKnot, vKnot, wKnot, uOrder, vOrder, and wOrder fields define the NURBS in three dimensions. The definition is similar to the NurbsSurface node.
The inputCoord field, if specified, shall contain a set of Coordinate nodes.
The outputCoord field, shall contain a set of Coordinate nodes. The number of nodes shall be equal to the number of nodes in inputCoord. The nodes themselves should be distinct from nodes in inputCoords.
The inputTransform field, if specified, shall contain a set of Transform nodes, the number of nodes shall be equal to the number of nodes in inputCoord.
By animating the controlPoint field, IndexedFaceSet nodes using a Coordinate node from outputCoords are deformed over time. Similarly, the point field in an input Coordinate node can be animated. By changing a Transform node in the inputTransform parameter, geometry can be moved through the deformation space (space warp).
CoordinateDeformer is a group node and shall be part of the transform hierarchy if evaluation is required. Points in the Coordinate node contained in outputCoord are recomputed and updated whenever the points of the inputCoord Coordinate are changed, any exposedField of the CoordinateDeformer itself is changed, or if any of the supplied inputTransform nodes are changed. Implementations may defer or even skip evaluation until the CoordinateDeformer node is displayed; i.e., if the node is not currently part of the traversed scene graph, or the node is not being rendered because the bounding box of the node (or the bounding box computed from the controlPoint list) falls outside the view frustum.
In some respects, CoordinateDeformer is a special version of a CoordinateInterpolator. The CoordinateDeformer is a group node in order to make the animation locatable in the scene graph at a certain 3D position. Normally, VRML interpolators do not define a bounding box and so are not culled from the scene. This behaviour may be achieved explicitly by routing the output of a VisibilitySensor to the controlling TimeSensor node.
Example: DEF FFD CoordinateDeformer { controlPoint [ ... ] inputCoord DEF inputCoord Coordinate { point [ ... ] } outputCoord DEF outputCoord Coordinate { point [ ... ] } children Shape { geometry IndexedFaceSet { coord USE outputCoord coordIndex [ ... ] } } }
The following is additional code to animate the FFD node:
DEF Timer TimeSensor {} DEF FFDGridInterpolator CoordinateInterpolator { ... } ROUTE FFDGridInterpolator.value_changed TO FFD.set_controlPoint ROUTE Timer.fraction_changed TO FFDGridInterpolator.set_fraction
If a given input coordinate value (optionally transformed by the corresponding Transform node) exceeds the parametric range of one of the knot vectors, the corresponding output coordinate value will be left unchanged. This is useful to deform only a subset of the coordinates or to animate different parts of the coordinate node using different CoordinateDeformer nodes.
|
Construct a node with all its fields set to default value, which is equivalent to the code below: bboxCenter.setXYZ(0,0,0); bboxSize.setXYZ(-1,-1,-1); uDimension = 0; uOrder = 2; vDimension = 0; vOrder = 2; wDimension = 0; wOrder = 2; |
|
Virtual destructor, does nothing |
|
Implements Node. |
|
Returns a deep copy of this node, that is a fully independant node with all children (if any) also copied. This is mainly useful for instanciating protos. Implements Node. |
|
Return a handle on the
This function is useful, with nbEventsIn() if you want to traverse all events in of a Node. Implements Node. |
|
Return a handle on the event in named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the event out named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the field named
Implements Node. |
|
Implements Node. |
|
Returns the number of events in for this node type. Implements Node. |
|
Returns the number of events out for this node type. Implements Node. |
|
Returns the number of fields (exposed or not) for this node type. Implements Node. |
|
Returns Implements Node. |
|
See Detailed Description for meaning of this event. |
|
See Detailed Description for meaning of this field. Default value is set to bboxCenter.setXYZ(0,0,0); |
|
See Detailed Description for meaning of this field. Default value is set to bboxSize.setXYZ(-1,-1,-1); |
|
See Detailed Description for meaning of this field. Default value is set to MFNode default value |
|
Changed event associated to exposedField children |
|
See Detailed Description for meaning of this field. Default value is set to MFVec3f default value |
|
Changed event associated to exposedField controlPoint |
|
See Detailed Description for meaning of this field. Default value is set to MFNode default value |
|
Changed event associated to exposedField inputCoord |
|
See Detailed Description for meaning of this field. Default value is set to MFNode default value |
|
Changed event associated to exposedField inputTransform |
|
See Detailed Description for meaning of this field. Default value is set to MFNode default value |
|
Changed event associated to exposedField outputCoord |
|
See Detailed Description for meaning of this event. |
|
Set event associated to exposedField children |
|
Set event associated to exposedField controlPoint |
|
Set event associated to exposedField inputCoord |
|
Set event associated to exposedField inputTransform |
|
Set event associated to exposedField outputCoord |
|
Set event associated to exposedField weight |
|
See Detailed Description for meaning of this field. Default value is set to uDimension = 0; |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
See Detailed Description for meaning of this field. Default value is set to uOrder = 2; |
|
See Detailed Description for meaning of this field. Default value is set to vDimension = 0; |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
See Detailed Description for meaning of this field. Default value is set to vOrder = 2; |
|
See Detailed Description for meaning of this field. Default value is set to wDimension = 0; |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
Changed event associated to exposedField weight |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
See Detailed Description for meaning of this field. Default value is set to wOrder = 2; |
Generated on 24 Feb 2005 with version 1.3.9.1. |