Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
FCurve Class Reference

Defines supported types of fcurves, their behavior and how they get evaluated. Not thread safe class due to the use of CoreList. More...

Inheritance diagram for FCurve:
EventObject CoreCustomData CoreBaseObject CoreBaseType AnimFCurve

Public Types

enum  VirtualKeyType {
  VIRTUAL_KEY_TYPE_DEFAULT,
  VIRTUAL_KEY_TYPE_NEXT_KEY,
  VIRTUAL_KEY_TYPE_PREVIOUS_KEY,
  VIRTUAL_KEY_TYPE_COUNT
}
 
enum  Behavior {
  BEHAVIOR_CONSTANT,
  BEHAVIOR_REPEAT,
  BEHAVIOR_OSCILLATE,
  BEHAVIOR_OFFSET_REPEAT,
  BEHAVIOR_LINEAR,
  BEHAVIOR_COUNT
}
 
- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 event callback signature for free functions / static methods.
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 event callback signature for methods.
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Public Member Functions

 FCurve ()
 Constructor.
 
 FCurve (const FCurve &fcurve)
 Copy Constructor.
 
virtual ~FCurve ()
 Destructor.
 
void clear ()
 Clear the curve and reset all its parameters.
 
void set_pre_behavior (Behavior pre)
 
void set_post_behavior (Behavior post)
 
Behavior get_pre_behavior () const
 
Behavior get_post_behavior () const
 
const unsigned int & get_key_count () const
 Returns the number of keyframes in the F-curve.
 
FCurveKeyId set_key (const double &time, const FCurveKey::KeyType &type, const double &value)
 Set the type and value of the keyframe at the given time. If the keyframe does not exist at the given time, it creates it.
 
FCurveKeyId set_key (const FCurveKey &key)
 Add the given key. If a key already exists at this time, modify it. If the keyframe does not exist at the given time, creates it from the param key.
 
void set_keys (const CoreVector< FCurveKey > &keys)
 
FCurveKeyId add_key (const double &time, const double &value, const FCurveKey::KeyType &type)
 Add a keyframe to the F-curve. If a keyframe already exists, returns the existing keyframe.
 
bool add_keys (const ParserEntry &entry, CoreVector< unsigned int > &added_or_modified_ids)
 
void remove_key (const FCurveKeyId &id)
 Remove the specified keyframe from the F-curve.
 
void remove_keys (const CoreSet< FCurveKeyId > &key_ids)
 Remove the specified keyframes from the F-curve.
 
void remove_all_keys ()
 Remove all keyframes from the F-curve.
 
void bake (double time_step)
 Replace all existing keys by linear keys regularly spaced in time.
 
void set_virtual_key (const double &time, const double &value, const FCurveKey::KeyType &type)
 Defines virtual key at given time with value and type.
 
void remove_virtual_key ()
 Removes existing virtual key.
 
FCurveKeyId get_virtual_key_id () const
 
void set_key_value (const FCurveKeyId &id, const double &value)
 Set the value of the specified keyframe.
 
void set_key_time (const FCurveKeyId &id, const double &time)
 Set the time of the specified keyframe.
 
void set_key_type (const FCurveKeyId &id, const FCurveKey::KeyType &type)
 Sets the type of the specified keyframe.
 
void set_key_tangent1 (const FCurveKeyId &id, const double &x, const double &y)
 Set the tangent 1 of the specified keyframe.
 
void set_key_tangent2 (const FCurveKeyId &id, const double &x, const double &y)
 Set the tangent 2 of the specified keyframe.
 
void set_keys_types (const CoreVector< FCurveKeyId > &ids, const CoreVector< int > &type)
 Set the type of the specified keyframe.
 
void set_keys_times (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< double > &key_times)
 Set the time of the specified keyframes.
 
void set_keys_values (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< double > &key_values)
 Set the values of the specified keyframes.
 
void set_keys_times_and_values (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< double > &key_times, const CoreVector< double > &key_values)
 Sets the time and value of the specified keyframes.
 
void set_key_tcb_values (FCurveKeyId &key_id, const double &t, const double &c, const double &b)
 Sets the tcb values of the specified keyframe.
 
void set_keys_tcb_values (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< double > &values)
 Sets the tcb values of the specified keyframes.
 
void set_keys_free_tangents_length (const CoreVector< FCurveKeyId > &ids, const CoreVector< bool > &values)
 Set the 'linked' tangents length state for the specified keyframes.
 
void set_keys_linked_tangents_length (const CoreVector< FCurveKeyId > &ids, const CoreVector< bool > &values)
 Set the 'linked' tangents state for the specified keyframes.
 
void set_keys_linked_tangents_angle (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< bool > &values)
 Set the 'linked' tangents angle state for the specified keyframes.
 
void set_keys_auto_tangents (const CoreVector< FCurveKeyId > &ids, const CoreVector< bool > &values)
 Set the 'auto' tangents state for the specified keyframes.
 
void set_keys_flat_tangents (const CoreVector< FCurveKeyId > &key_ids, const CoreVector< bool > &values)
 Set the 'flat' tangents state for the specified keyframes.
 
void set_key_auto_tangents (const FCurveKeyId &key_id, const bool &value)
 Set the 'auto' tangents state for the specified keyframe.
 
void set_key_flat_tangents (const FCurveKeyId &key_id, const bool &value)
 Set the 'flat' tangent state for the specified keyframe.
 
bool get_tcb_control_points (const FCurveKeyId &id, GMathVec2d &q0, GMathVec2d &q1, GMathVec2d &q2, GMathVec2d &q3) const
 
void update_auto_tangents ()
 
void get_key_property_value (const FCurveKeyId &id, const CoreString &property_name, CoreString &property_value)
 Gets key property value.
 
void set_keys_property_values (const CoreVector< FCurveKeyId > &ids, const CoreString &property_name, const CoreVector< CoreString > &property_values)
 Sets keys property value.
 
const FCurveKeyget_key_at (const double &time) const
 Return the value of the specified keyframe.
 
double get_key_value (const FCurveKeyId &id) const
 Return the value of the specified keyframe.
 
double get_key_time (const FCurveKeyId &id) const
 Return the time of the specified keyframe.
 
FCurveKey::KeyType get_key_type (const FCurveKeyId &id) const
 Return the type of the specified keyframe.
 
int get_key_index (const FCurveKeyId &key_id) const
 Get the position in the curve for the key with given id.
 
const FCurveKeyIdget_key_id (const unsigned int &key_index) const
 Gets id of key at specified index.
 
double get_key_tcb_tension (const FCurveKeyId &id) const
 Gets tcb tension of key with given id.
 
double get_key_tcb_continuity (const FCurveKeyId &id) const
 Gets tcb continuity of key with given id.
 
double get_key_tcb_bias (const FCurveKeyId &id) const
 Gets tcb bias of key with given id.
 
const GMathVec2d & get_key_tangent1 (const FCurveKeyId &key_id) const
 Gets tangent1 relative coordinates of key with given id.
 
const GMathVec2d & get_key_tangent2 (const FCurveKeyId &key_id) const
 Gets tangent2 relative coordinates of key with given id.
 
bool get_key_linked_tangents_angle (const FCurveKeyId &key_id) const
 
bool get_key_linked_tangents_length (const FCurveKeyId &key_id) const
 
bool get_key_free_tangents_length (const FCurveKeyId &key_id) const
 
bool get_key_flat_tangents (const FCurveKeyId &key_id) const
 
bool get_key_auto_tangents (const FCurveKeyId &key_id) const
 
FCurveKeyId get_first_key_after (const double &time)
 
FCurveKeyId get_first_key_before (const double &time)
 
FCurveKeyget_key (const FCurveKeyId &id) const
 Get key with given id.
 
FCurveKeyget_first_key () const
 Get first key or 0 if no key exists.
 
FCurveKeyget_last_key () const
 Get last key or 0 if no key exists.
 
double eval (const double &time) const
 Evaluate the F-curve at the given time.
 
double lut_eval (const double &time) const
 Evaluate the F-curve at the given time using the internal LUT to improve computation speed.
 
virtual ParserEntryserialize () const
 
virtual bool deserialize (const ParserEntry &entry)
 
FCurveKey::KeyType get_next_key_type (const double &time) const
 Looks for the key type of the first key found after given time.
 
FCurveKey::KeyType get_previous_key_type (const double &time) const
 Looks for the key type of the first key found before given time.
 
void _on_curve_modified ()
 Callback to be implemented by subclasses to react -if needed- when curve gets modified.
 
virtual void on_curve_modified ()
 
FCurveoperator= (const FCurve &fcurve)
 
bool operator== (const FCurve &curve) const
 
bool operator!= (const FCurve &curve) const
 
double operator() (const double &time) const
 
virtual size_t get_memory_size () const override
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject () override
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
CoreArray< EventObject * > get_senders () const
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
const unsigned long & get_class_info_id () const
 
virtual bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 

Static Public Member Functions

static const CoreStringprop_key_free_tangents_length ()
 
static const CoreStringprop_key_linked_tangents_length ()
 
static const CoreStringprop_key_linked_tangents_angle ()
 
static const CoreStringprop_key_auto_tangents ()
 
static const CoreStringprop_key_flat_tangents ()
 
static const CoreStringprop_key_value ()
 
static const CoreStringprop_key_time ()
 
static const CoreStringprop_key_tangent1 ()
 
static const CoreStringprop_key_tangent2 ()
 
static const CoreStringprop_key_type ()
 
static const CoreStringprop_key_tcb ()
 
static const double & get_time_offset ()
 
static const double & get_min_rotation_angle ()
 
static CoreString get_virtual_key_type (const VirtualKeyType &value)
 
static const CoreString get_behavior_label (Behavior b)
 
static double compute_bezier (const GMathVec2d &p1, const GMathVec2d &t1, const GMathVec2d &p2, const GMathVec2d &t2, const double &time)
 Interpolate the value of a BEZ2 curve.
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.
 

Protected Member Functions

void _set_key_type (const FCurveKeyId &id, const FCurveKey::KeyType &type)
 Sets key type.
 
const FCurveKeyget_next_key (const double &time) const
 Gets the first key found after given time.
 
const FCurveKeyget_previous_key (const double &time) const
 Gets the first key found before given time.
 
void reset_virtual_key ()
 
unsigned int sort_key_asc (const unsigned int &key_index)
 Moves key to the right until its right neighbor has a superior time.
 
double get_ending_slope () const
 
double get_starting_slope () const
 
void update_key_tangents (const FCurveKeyId &id)
 Updates given key tangents.
 
void init_key_tangent1 (const FCurveKeyId &id)
 Initialize tangent1 of the key identified by id, with default tangent values.
 
void init_key_tangent2 (const FCurveKeyId &id)
 Initialize tangent2 of the key identified by id, with default tangent values.
 
bool update_key_tangent (FCurveKey &origin_key, FCurveKey &target_key, double &tx, double &ty)
 updates the position of the given tangent
 
void compute_key_auto_tangents (FCurveKey &key)
 computes tangents for incoming key, depending on its type and next and previous keys
 

Friends

class FCurveEvaluator
 
FCURVE_EXPORT friend
CoreLogStream
operator<< (CoreLogStream &os, const FCurve &curve)
 

Detailed Description

Defines supported types of fcurves, their behavior and how they get evaluated. Not thread safe class due to the use of CoreList.

Member Function Documentation

void FCurve::_set_key_type ( const FCurveKeyId id,
const FCurveKey::KeyType &  type 
)
protected

Sets key type.

Parameters
[in]idkey id
[in]typekey type
FCurveKeyId FCurve::add_key ( const double &  time,
const double &  value,
const FCurveKey::KeyType &  type 
)

Add a keyframe to the F-curve. If a keyframe already exists, returns the existing keyframe.

Parameters
timein seconds
value
keyframetype (linear, bezier, step...)
Returns
the new keyframe id
void FCurve::bake ( double  time_step)

Replace all existing keys by linear keys regularly spaced in time.

Parameters
time_step
double FCurve::eval ( const double &  time) const

Evaluate the F-curve at the given time.

Parameters
timein seconds
const FCurveKey * FCurve::get_key_at ( const double &  time) const

Return the value of the specified keyframe.

Parameters
keyframeid
void FCurve::get_key_property_value ( const FCurveKeyId id,
const CoreString property_name,
CoreString property_value 
)

Gets key property value.

Parameters
[in]idkey id
[in]property_nameproperty name to look for
[out]property_valuefound value
double FCurve::get_key_time ( const FCurveKeyId key_id) const

Return the time of the specified keyframe.

Parameters
keyframeid
FCurveKey::KeyType FCurve::get_key_type ( const FCurveKeyId key_id) const

Return the type of the specified keyframe.

Parameters
keyframeid
double FCurve::get_key_value ( const FCurveKeyId key_id) const

Return the value of the specified keyframe.

Parameters
keyframeid
const FCurveKey * FCurve::get_next_key ( const double &  time) const
inlineprotected

Gets the first key found after given time.

Returns
first key found after given time, or 0 if no key is found.
FCurveKey::KeyType FCurve::get_next_key_type ( const double &  time) const

Looks for the key type of the first key found after given time.

Parameters
[in]timestart looking for next key from this time.
Returns
Next key type. If no next key is found, returns the previous key type. If no key at all is found, returns TCB.
const FCurveKey * FCurve::get_previous_key ( const double &  time) const
inlineprotected

Gets the first key found before given time.

Returns
first key found before given time, or 0 if no key is found.
FCurveKey::KeyType FCurve::get_previous_key_type ( const double &  time) const

Looks for the key type of the first key found before given time.

Parameters
[in]timestart looking for previous key from this time.
Returns
Previous key type. If no previous key is found, returns the next key type. If no key at all is found, returns TCB.
double FCurve::lut_eval ( const double &  time) const

Evaluate the F-curve at the given time using the internal LUT to improve computation speed.

Parameters
timein seconds
Note
depending on the LUT resolution, the result is approcimated when compared to result of the eval() method
void FCurve::remove_key ( const FCurveKeyId id)

Remove the specified keyframe from the F-curve.

Parameters
keyframeid
void FCurve::remove_keys ( const CoreSet< FCurveKeyId > &  key_ids)

Remove the specified keyframes from the F-curve.

Parameters
Keyframesids
FCurveKeyId FCurve::set_key ( const double &  time,
const FCurveKey::KeyType &  type,
const double &  value 
)

Set the type and value of the keyframe at the given time. If the keyframe does not exist at the given time, it creates it.

Parameters
newtime in seconds
newkeyframe type (linear, bezier, step...)
newvalue of the keyframe
Returns
the keyframe id
FCurveKeyId FCurve::set_key ( const FCurveKey key)

Add the given key. If a key already exists at this time, modify it. If the keyframe does not exist at the given time, creates it from the param key.

Parameters
keyto take values from
Returns
the keyframe id
void FCurve::set_key_auto_tangents ( const FCurveKeyId key_id,
const bool &  value 
)

Set the 'auto' tangents state for the specified keyframe.

Parameters
keyframesid
valueauto tangents state
void FCurve::set_key_flat_tangents ( const FCurveKeyId key_id,
const bool &  value 
)

Set the 'flat' tangent state for the specified keyframe.

Parameters
keyframeid
valueflat tangent state
void FCurve::set_key_tangent1 ( const FCurveKeyId id,
const double &  x,
const double &  y 
)

Set the tangent 1 of the specified keyframe.

Parameters
idkeyframe id
xx position
yy position
void FCurve::set_key_tangent2 ( const FCurveKeyId id,
const double &  x,
const double &  y 
)

Set the tangent 2 of the specified keyframe.

Parameters
keyframeid
xx position
yy position
void FCurve::set_key_tcb_values ( FCurveKeyId key_id,
const double &  t,
const double &  c,
const double &  b 
)

Sets the tcb values of the specified keyframe.

Parameters
keyframeid
ttension value
ccontinuity value
bbias value
void FCurve::set_key_time ( const FCurveKeyId id,
const double &  time 
)

Set the time of the specified keyframe.

Parameters
idof the keyframe
thenew time of the keyframe in seconds
void FCurve::set_key_type ( const FCurveKeyId id,
const FCurveKey::KeyType &  type 
)

Sets the type of the specified keyframe.

Parameters
idkeyframe id
typethe new type of the keyframe
void FCurve::set_key_value ( const FCurveKeyId id,
const double &  value 
)

Set the value of the specified keyframe.

Parameters
idof the keyframe
thenew value of the keyframe
void FCurve::set_keys ( const CoreVector< FCurveKey > &  keys)

Add the given keys. If a key already exists at any specified time, modify it, otherwise create it from the param key. Send a single notification and update tangents globally as deserialization would

Parameters
keysto take values from
void FCurve::set_keys_auto_tangents ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< bool > &  values 
)

Set the 'auto' tangents state for the specified keyframes.

Parameters
keyframesids
valuesauto tangents states
void FCurve::set_keys_flat_tangents ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< bool > &  values 
)

Set the 'flat' tangents state for the specified keyframes.

Parameters
keyframesids
valuesflat tangents states
void FCurve::set_keys_free_tangents_length ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< bool > &  values 
)

Set the 'linked' tangents length state for the specified keyframes.

Parameters
keyframesids
valueslinked tangents lengths
void FCurve::set_keys_linked_tangents_angle ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< bool > &  linked_tangents_angle 
)

Set the 'linked' tangents angle state for the specified keyframes.

Parameters
keyframesids
linked_tangents_anglelinked tangents angles
void FCurve::set_keys_linked_tangents_length ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< bool > &  linked_tangents_length 
)

Set the 'linked' tangents state for the specified keyframes.

Parameters
keyframesids
linkedtangents states
void FCurve::set_keys_property_values ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreString property_name,
const CoreVector< CoreString > &  property_values 
)

Sets keys property value.

Parameters
[in]key_idskeys id
[in]property_nameproperty name to look for
[out]property_valuesvalues to set for each key contained in key_ids
void FCurve::set_keys_tcb_values ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< double > &  tcb_values 
)

Sets the tcb values of the specified keyframes.

Parameters
keyframesids
newtcb values of the keyframes, in order. [t1, c1, b1, t2, c2, b2]...
void FCurve::set_keys_times ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< double > &  key_times 
)

Set the time of the specified keyframes.

Parameters
key_idskeyframes ids
key_timesnew keyframes times in seconds, in key_ids order.
void FCurve::set_keys_times_and_values ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< double > &  key_times,
const CoreVector< double > &  key_values 
)

Sets the time and value of the specified keyframes.

Parameters
key_idsids of the keyframe
key_timesthe new time of the keyframes in seconds, in order.
key_valuesnew values of the keyframes, in order.
void FCurve::set_keys_types ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< int > &  type 
)

Set the type of the specified keyframe.

Parameters
keyframesids
thenew types of the keyframes
void FCurve::set_keys_values ( const CoreVector< FCurveKeyId > &  key_ids,
const CoreVector< double > &  key_values 
)

Set the values of the specified keyframes.

Parameters
idsof the keyframes
newvalues of the keyframes, in order.
void FCurve::set_virtual_key ( const double &  time,
const double &  value,
const FCurveKey::KeyType &  type 
)

Defines virtual key at given time with value and type.

Parameters
[in]timevirtual key time
[in]valuevirtual key value
[in]typevirtual key type
unsigned int FCurve::sort_key_asc ( const unsigned int &  key_index)
protected

Moves key to the right until its right neighbor has a superior time.

Parameters
key_indexindexes of the key
Returns
the final index of key.
bool FCurve::update_key_tangent ( FCurveKey key,
FCurveKey target_key,
double &  tx,
double &  ty 
)
protected

updates the position of the given tangent

Returns
true if tangent position has changed, false otherwise
void FCurve::update_key_tangents ( const FCurveKeyId id)
protected

Updates given key tangents.

Parameters
[in]idkey id