H3D API  2.4.1
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
H3D::EaseInEaseOut Class Reference

The EaseInEaseOut node supports controlled gradual transitions by specifying modifications for TimeSensor node fractions. More...

#include <H3D/EaseInEaseOut.h>

Inheritance diagram for H3D::EaseInEaseOut:
Inheritance graph

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.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (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.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 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 FieldgetField (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< SFFloatset_fraction
 Incoming fraction field values routed from TimeSensor node. More...
 
H3DUniquePtr< MFVec2feaseInEaseOut
 The proportion of time at which ease-in and -out effect should take place for the corresponding key value. More...
 
H3DUniquePtr< MFFloatkey
 The keypoints for interpolation. More...
 
H3DUniquePtr< SFFloatmodifiedFraction_changed
 Output fraction as modified from specified key and easeInEaseOut values. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
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.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
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 Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

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.

Internal routes:

Examples:

Member Function Documentation

◆ lookupKey()

int EaseInEaseOut::lookupKey ( H3DFloat  f,
H3DFloat p 
)
protected

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().

Member Data Documentation

◆ easeInEaseOut

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().

◆ key

H3DUniquePtr< MFFloat > H3D::EaseInEaseOut::key

The keypoints for interpolation.

Access type: inputOutput Default value: []

Referenced by checkKeyEaseInEaseOut(), EaseInEaseOut(), and lookupKey().

◆ modifiedFraction_changed

H3DUniquePtr< SFFloat > H3D::EaseInEaseOut::modifiedFraction_changed

Output fraction as modified from specified key and easeInEaseOut values.

Access type: outputOnly

Referenced by EaseInEaseOut().

◆ set_fraction

H3DUniquePtr< SFFloat > H3D::EaseInEaseOut::set_fraction

Incoming fraction field values routed from TimeSensor node.

Access type: inputOnly

Referenced by EaseInEaseOut().


The documentation for this class was generated from the following files: