Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Specialization of FCurve to display an animation on a specified OfAttr. More...
Public Types | |
typedef void(* | OnAnimUpdate )(OfAttr &, AnimFCurve &fcurve) |
![]() | |
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 } |
![]() | |
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 | |
AnimFCurve (const AnimFCurve &curve, OfAttr &attr, OnAnimUpdate callback) | |
AnimFCurve (OfAttr &attr, OnAnimUpdate callback) | |
virtual void | on_curve_modified () override |
![]() | |
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 FCurveKey * | get_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 FCurveKeyId & | get_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) |
FCurveKey & | get_key (const FCurveKeyId &id) const |
Get key with given id. | |
FCurveKey * | get_first_key () const |
Get first key or 0 if no key exists. | |
FCurveKey * | get_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 ParserEntry * | serialize () 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. | |
FCurve & | operator= (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 |
![]() | |
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. | |
![]() | |
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 |
![]() | |
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 CoreClassInfo & | get_class_info () const |
template<class T > | |
T * | cast () |
template<class T > | |
const T * | cast () const |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Protected Member Functions | |
const OfAttr * | get_attr () const |
![]() | |
void | _set_key_type (const FCurveKeyId &id, const FCurveKey::KeyType &type) |
Sets key type. | |
const FCurveKey * | get_next_key (const double &time) const |
Gets the first key found after given time. | |
const FCurveKey * | get_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 | |
Additional Inherited Members | |
![]() | |
static const CoreString & | prop_key_free_tangents_length () |
static const CoreString & | prop_key_linked_tangents_length () |
static const CoreString & | prop_key_linked_tangents_angle () |
static const CoreString & | prop_key_auto_tangents () |
static const CoreString & | prop_key_flat_tangents () |
static const CoreString & | prop_key_value () |
static const CoreString & | prop_key_time () |
static const CoreString & | prop_key_tangent1 () |
static const CoreString & | prop_key_tangent2 () |
static const CoreString & | prop_key_type () |
static const CoreString & | prop_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. | |