Public Member Functions
FCurveKey Class Reference

## Detailed Description

This class represents a key on a function curve (FCurve).

See also:
  FCurve, FCurve::SetKeys, FCurve::GetKeys, dev_FCurves About FCurves

Example:

            using namespace XSI;
            Application app;
            Model root = app.GetActiveSceneRoot();

            Null myNull;
            root.AddNull( L"", myNull );
            Parameter posx( myNull.GetParameter( L"posx" ) );

            // create and connect an function curve to the position x
            FCurve fcrv;
            posx.AddFCurve( siUnknownFCurve, fcrv );

            // set the keys
            LONG i = 0;
            CTimeArray timeArray(3);
            CValueArray valueArray(3);

            timeArray[i] = 1;   valueArray[i] = (double)10; i++;
            timeArray[i] = 50;  valueArray[i] = (double)0; i++;
            timeArray[i] = 100; valueArray[i] = (double)10; i++;

            fcrv.SetKeys(timeArray,valueArray);

            // set the zero slopes on the key tangents
            CDoubleArray tangentsArray(12);
            i=0;
            tangentsArray[i++]=-10.5; tangentsArray[i++]=0; tangentsArray[i++]=10.5; tangentsArray[i++] = 0;
            tangentsArray[i++]=-10.5; tangentsArray[i++]=0; tangentsArray[i++]=10.5; tangentsArray[i++] = 0;
            tangentsArray[i++]=-10.5; tangentsArray[i++]=0; tangentsArray[i++]=10.5; tangentsArray[i++] = 0;

            fcrv.SetKeyTangents( tangentsArray );

`#include <xsi_fcurvekey.h>`

Inheritance diagram for FCurveKey:
[legend]

List of all members.

## Public Member Functions
| FCurveKey ()
| ~FCurveKey ()
| FCurveKey (const CRef &in_ref)
| FCurveKey (const FCurveKey &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
FCurveKey & | operator= (const FCurveKey &in_obj)
FCurveKey & | operator= (const CRef &in_ref)
CValue::DataType | GetValueType () const
CValue | GetValue (void) const
CStatus | PutValue (const CValue &in_value)
CTime | GetTime (void) const
CStatus | PutTime (const CTime &in_time)
bool | GetLocked (void) const
CStatus | PutLocked (bool in_bFlag)
bool | GetSelected (void) const
CValue | GetLeft () const
CStatus | PutLeft (const CValue &in_value)
CValue | GetRight (void) const
CStatus | PutRight (const CValue &in_value)
double | GetLeftTanY (void) const
CStatus | PutLeftTanY (double in_value)
double | GetRightTanY (void) const
CStatus | PutRightTanY (double in_value)
CTime | GetLeftTanX (void) const
CStatus | PutLeftTanX (const CTime &in_value)
CTime | GetRightTanX (void) const
CStatus | PutRightTanX (const CTime &in_value)
siFCurveKeyInterpolation | GetInterpolation (void) const
CStatus | PutInterpolation (siFCurveKeyInterpolation in_value)
bool | GetConstraint (siFCurveKeyConstraint in_eKC) const
CStatus | PutConstraint (siFCurveKeyConstraint in_eKC, bool in_bSet)
CStatus | Set (const CTime &in_frame, const CValue &in_value, bool in_overridekeylock=false)
LONG | GetIndex (void) const

## Constructor & Destructor Documentation

FCurveKey | ( |  | ) |

Default constructor.

~FCurveKey | ( |  | ) |

Default destructor.

FCurveKey | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

FCurveKey | ( | const FCurveKey & | in_obj | ) |

Copy constructor.

Parameters:

  in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const `[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  in_ClassID | class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from SIObject.

siClassID GetClassID | ( |  | ) | const `[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from SIObject.

FCurveKey& operator= | ( | const FCurveKey & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  in_obj | constant class object.

Returns:
  The new FCurveKey object.

FCurveKey& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  in_ref | constant class object.

Returns:
  The new FCurveKey object.

Reimplemented from SIObject.

CValue::DataType GetValueType | ( |  | ) | const

Returns the value type of the function curve key.

Returns:
  The type of the fcurve key's value.

CValue GetValue | ( | void |  | ) | const

Returns the value of the function curve key.

Returns:
  The fcurve key's value.

CStatus PutValue | ( | const CValue & | in_value | ) |

Sets the value of the function curve key.

Parameters:

  in_value | Function curve key value

Returns:
  CStatus::OK success
  CStatus::Fail failure

CTime GetTime | ( | void |  | ) | const

Returns the key frame for the function curve key.

Returns:
  The FCurveKey time.

CStatus PutTime | ( | const CTime & | in_time | ) |

Sets the frame for the function curve key.

Parameters:

  in_time | Function curve key frame

Returns:
  CStatus::OK success
  CStatus::Fail failure

bool GetLocked | ( | void |  | ) | const

Returns the locked state of the function curve key.

Returns:
  True if the FCurveKey is locked; false otherwise.

CStatus PutLocked | ( | bool | in_bFlag | ) |

Sets the locked state of the function curve key.

Parameters:

  in_bFlag | Function curve key locked state value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

bool GetSelected | ( | void |  | ) | const

Returns the selected state of the function curve key.

Returns:
  True if the FCurveKey is selected; false otherwise.

Since:
  6.0

CValue GetLeft | ( |  | ) | const

Returns the left value of the function curve key.

Returns:
  The FCurveKey left value.

CStatus PutLeft | ( | const CValue & | in_value | ) |

Sets the left value of the function curve key.

Parameters:

  in_value | New left value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CValue GetRight | ( | void |  | ) | const

Returns the right value of the function curve key.

Returns:
  The FCurveKey right value.

CStatus PutRight | ( | const CValue & | in_value | ) |

Sets the right value of the function curve key.

Parameters:

  in_value | New right value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

double GetLeftTanY | ( | void |  | ) | const

Returns the left tangent Y value of the function curve key.

Returns:
  The FCurveKey left tangent Y value.

CStatus PutLeftTanY | ( | double | in_value | ) |

Sets the left tangent Y value of the function curve key.

Parameters:

  in_value | New left tangent Y value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

double GetRightTanY | ( | void |  | ) | const

Returns the right tangent Y value of the function curve key.

Returns:
  The FCurveKey right tangent Y value.

CStatus PutRightTanY | ( | double | in_value | ) |

Sets the right tangent Y value of the function curve key.

Parameters:

  in_value | New right tangent Y value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CTime GetLeftTanX | ( | void |  | ) | const

Returns the left tangent key of the function curve key.

Returns:
  The FCurveKey left tangent X value.

CStatus PutLeftTanX | ( | const CTime & | in_value | ) |

Sets the left tangent X value of the function curve key.

Parameters:

  in_value | new left tangent X value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CTime GetRightTanX | ( | void |  | ) | const

Returns the right tangent key of the function curve key.

Returns:
  The FCurveKey right tangent X value.

CStatus PutRightTanX | ( | const CTime & | in_value | ) |

Sets the right tangent X value of the function curve key.

Parameters:

  in_value | new right tangent X value.

Returns:
  CStatus::OK success
  CStatus::Fail failure

siFCurveKeyInterpolation GetInterpolation | ( | void |  | ) | const

Returns the interpolation type of the function curve key.

Returns:
  The FCurveKey interpolation type.

See also:
  dev_animation_FCurveInterpolationAndExtrapolation FCurve Interpolation and Extrapolation

CStatus PutInterpolation | ( | siFCurveKeyInterpolation | in_value | ) |

Sets the interpolation for the function curve key.

Parameters:

  in_value | New interpolation

Returns:
  CStatus::OK success
  CStatus::Fail failure

See also:
  dev_animation_FCurveInterpolationAndExtrapolation FCurve Interpolation and Extrapolation

bool GetConstraint | ( | siFCurveKeyConstraint | in_eKC | ) | const

Returns true if the specified constraint is turned on.

Parameters:

  in_eKC | Type of constraint to query (one of the siFCurveKeyConstraint values).

Returns:
  true if the specified constraint is turned on.

CStatus PutConstraint | ( | siFCurveKeyConstraint | in_eKC,
|  | bool | in_bSet
| ) |  |

Sets the constraint for the function curve key.

Parameters:

  in_eKC | Type of constraint to set (one of the siFCurveKeyConstraint values).
  in_bSet | True to turn constraint on.

Returns:
  CStatus::OK success
  CStatus::Fail failure

CStatus Set | ( | const CTime & | in_frame,
|  | const CValue & | in_value,
|  | bool | in_overridekeylock = `false`
| ) |  |

Sets the function curve key's frame and value.

Parameters:

  in_frame | New key frame.
  in_value | New key value.
  in_overridekeylock | True to override key lock.

Returns:
  CStatus::OK success
  CStatus::Fail failure

LONG GetIndex | ( | void |  | ) | const

Returns the index of this key in the function curve.

Returns:
  The key index

Since:
  6.0

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

- xsi_fcurvekey.h