H3D API
2.4.1
|
The EaseInEaseOut node supports controlled gradual transitions by specifying modifications for TimeSensor node fractions. More...
#include <H3D/EaseInEaseOut.h>
Classes | |
class | SFFraction |
Class for modified fraction_changed field type. More... | |
class | UnequalFieldValues |
Thrown when number of field values in key and easeInEaseOut are not equal. More... | |
Public Member Functions | |
EaseInEaseOut (Inst< SFFloat > _set_fraction=0, Inst< MFVec2f > _easeInEaseOut=0, Inst< MFFloat > _key=0, Inst< SFNode > _metadata=0, Inst< SFFraction > _modifiedFraction_changed=0) | |
Constructor. | |
![]() | |
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 void | render () |
the render() function is used for the depth-first rendering traversal of the scene-graph. More... | |
virtual void | traverseSG (TraverseInfo &ti) |
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the 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... | |
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... | |
Public Attributes | |
H3DUniquePtr< SFFloat > | set_fraction |
Incoming fraction field values routed from TimeSensor node. More... | |
H3DUniquePtr< MFVec2f > | easeInEaseOut |
The proportion of time at which ease-in and -out effect should take place for the corresponding key value. More... | |
H3DUniquePtr< MFFloat > | key |
The keypoints for interpolation. More... | |
H3DUniquePtr< SFFloat > | modifiedFraction_changed |
Output fraction as modified from specified key and easeInEaseOut values. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Protected Member Functions | |
int | lookupKey (H3DFloat f, H3DFloat &p) |
Utility function to find the index for the key pair for a given fraction value f. More... | |
void | checkKeyEaseInEaseOut () |
Check that easeInEaseOut and key have the same number of field values, and print error message if they are not equal. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
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 EaseInEaseOut node supports controlled gradual transitions by specifying modifications for TimeSensor node fractions.
The EaseInEaseOut node receives set_fraction field event. It uses the values of the key field and the easeIneaseOut field to modify that fraction which is then issued as a modifiedFraction_changed event.
The easeInEaseOut field shall have the same size as the key field, and each Vec2f value of the easeInEaseOut field corresponds to the key value with the same index. The first component of each easeInEaseOut field Vec2f value corresponds to the easeIn feature as the interpolator approaches the key, and the second component of each easeInEaseOut field Vec2f value corresponds to the easeOut feature as the interpolator progresses away from the key.
The values of the easeInEaseOut field range from zero to one. At zero, there is no modification of the fraction.
The scope of the easeOut effect on the local fraction is equal to the easeOut value.
Examples:
Utility function to find the index for the key pair for a given fraction value f.
The proportion of distance between the key pair at f is set in p.
References key.
Referenced by H3D::EaseInEaseOut::SFFraction::update().
H3DUniquePtr< MFVec2f > H3D::EaseInEaseOut::easeInEaseOut |
The proportion of time at which ease-in and -out effect should take place for the corresponding key value.
The first component of this Vec2f field value corresponds to the easeIn feature as the interpolator approaches the key. The second component of corresponds to the easeOut feature as the interpolator progresses away from the key. The range of value is 0.0 to 1.0. The number of field values must be same as that of the key field.
Access type: inputOutput Default value: []
Referenced by checkKeyEaseInEaseOut(), and EaseInEaseOut().
H3DUniquePtr< MFFloat > H3D::EaseInEaseOut::key |
The keypoints for interpolation.
Access type: inputOutput Default value: []
Referenced by checkKeyEaseInEaseOut(), EaseInEaseOut(), and lookupKey().
H3DUniquePtr< SFFloat > H3D::EaseInEaseOut::modifiedFraction_changed |
Output fraction as modified from specified key and easeInEaseOut values.
Access type: outputOnly
Referenced by EaseInEaseOut().
H3DUniquePtr< SFFloat > H3D::EaseInEaseOut::set_fraction |
Incoming fraction field values routed from TimeSensor node.
Access type: inputOnly
Referenced by EaseInEaseOut().