#include <c4d_ccurve.h>
Public Types | |
typedef BaseList2D | SUPER |
![]() | |
typedef GeListNode | SUPER |
![]() | |
typedef PrivateChunk | SUPER |
Protected Member Functions | |
void | CalcRemoveOvershoot (Int32 kidx, Float *vl, Float *vr, BaseTime *tl, BaseTime *tr) const |
void | AdjustTangentAutoWeight (Int32 keyIndex) |
void | CalcAutoWeight (Int32 kidx, Float *vl, Float *vr, BaseTime *tl, BaseTime *tr) const |
![]() | |
void | SetID (Int32 id) |
virtual Bool | GetDParameter (const DescID &id, GeData &data) |
virtual Bool | SetDParameter (const DescID &id, const GeData &data) |
virtual Int32 | GetInstanceType () const |
Private Member Functions | |
CCurve () | |
~CCurve () | |
const CCurve & | operator= (const CCurve &seq) |
Bool | _LoadKeysHack () |
Float64 | GetPercent (Float64 prevValue, Float64 nextValue) const |
CKey * | InsertKeyI (CKey *ckey, Int32 *idx) |
virtual void | InsertBefore (GeListNode *op) |
virtual void | InsertAfter (GeListNode *op) |
virtual void | Remove () |
virtual void | InsertUnder (GeListNode *op) |
virtual void | InsertUnderLast (GeListNode *op) |
virtual void | FlushChilds () |
Private Attributes | |
GeTempDynArray< CKey > | m_keys |
RootCKey | m_root_key |
CTrack * | _parentTrack |
Friends | |
class | CKey |
class | CTrack |
Key | |
Int32 | GetKeyCount () const |
const CKey * | GetKey (Int32 index) const |
CKey * | GetKey (Int32 index) |
const CKey * | FindKey (const BaseTime &time, Int32 *idx=nullptr, FINDANIM match=FINDANIM_EXACT) const |
CKey * | FindKey (const BaseTime &time, Int32 *idx=nullptr, FINDANIM match=FINDANIM_EXACT) |
CKey * | AddKey (const BaseTime &time, Int32 *nidx=nullptr, Bool synchronizeKeys=false) |
CKey * | AddKeyAdaptTangent (const BaseTime &time, Int32 *nidx=nullptr, Bool synchronizeKeys=false) |
Bool | InsertKey (const CKey *ckey, Bool synchronizeKeys=false) |
Bool | DelKey (Int32 index, Bool synchronizeKeys=false) |
Int32 | MoveKey (const BaseTime &time, Int32 idx, CCurve *dseq=nullptr, Bool synchronizeKeys=false) |
void | FlushKeys (Bool synchronizeKeys=false) |
Calculation | |
Float64 | CalcHermite (Float64 time, Float64 t1, Float64 t2, Float64 val1, Float64 val2, Float64 tan1_val, Float64 tan2_val, Float64 tan1_t, Float64 tan2_t, Bool deriv) const |
void | CalcSoftTangents (Int32 kidx, Float *vl, Float *vr, BaseTime *tl, BaseTime *tr) const |
void | GetTangents (Int32 kidx, Float64 *vl, Float64 *vr, Float64 *tl, Float64 *tr) const |
Float | GetValue (const BaseTime &time) const |
Miscellaneous | |
CTrack * | GetTrack () |
void | SetKeyDefault (BaseDocument *doc, Int32 kidx) |
Start/End Time | |
BaseTime | GetStartTime () const |
BaseTime | GetEndTime () const |
Unmuted | |
const CKey * | FindNextUnmuted (Int32 idx, Int32 *ret_idx=nullptr) const |
CKey * | FindNextUnmuted (Int32 idx, Int32 *ret_idx=nullptr) |
const CKey * | FindPrevUnmuted (Int32 idx, Int32 *ret_idx=nullptr) const |
CKey * | FindPrevUnmuted (Int32 idx, Int32 *ret_idx=nullptr) |
Private | |
virtual Bool | CopyToX (PrivateChunk *dst, COPYFLAGS flags, AliasTrans *trans) |
virtual Bool | HandleSubChunk (HyperFile *hf, Int32 id, Int32 level) |
virtual Bool | Write (HyperFile *hf) |
Float | GetValueCached (const BaseTime &time, Float64 _time, GetValueCache *cache) const |
void | FlushKeysI () |
Additional Inherited Members | |
![]() | |
Int32 | m_id |
RootShader | mp_rootshader |
RootShader | mp_rootshader_hidden |
RootShader | root_shader_repository |
Int32 | l_bitfeld |
RootCTrack | mp_rootctrack |
RootPluginNode | root_override |
NotifyList * | notify_events |
DescIdStore * | keyframestore |
DescIdStore * | propstore |
BaseContainer | m_bc |
NodeData * | m_data |
![]() | |
GeAliasGoal | m_xgoal |
UInt32 | m_bits [4] |
RootList2D * | t_rootlist_parent |
RootList2D * | m_children |
BaseDocument * | parent_doc |
void * | unknownData |
Int | unknownDataSize |
Int32 | unknownDataLevel |
Int32 | pluginID |
typedef BaseList2D SUPER |
|
private |
|
private |
|
virtual |
Reimplemented from BaseList2D.
Int32 GetKeyCount | ( | ) | const |
Gets the number of keys in the curve.
Gets the const key at index in the curve.
[in] | index | The key index: 0 <= index < GetKeyCount() |
Gets the key at index in the curve.
[in] | index | The key index: 0 <= index < GetKeyCount() |
const CKey* FindKey | ( | const BaseTime & | time, |
Int32 * | idx = nullptr , |
||
FINDANIM | match = FINDANIM_EXACT |
||
) | const |
Finds the const key at the given time.
[in] | time | The time to find the key at. |
[out] | idx | Assigned the index of the found key. |
[in] | match | The search method: FINDANIM |
CKey* FindKey | ( | const BaseTime & | time, |
Int32 * | idx = nullptr , |
||
FINDANIM | match = FINDANIM_EXACT |
||
) |
Finds the key at the given time.
[in] | time | The time to find the key at. |
[out] | idx | Assigned the index of the found key. |
[in] | match | The search method: FINDANIM |
Adds a key to the curve.
[in] | time | The time to add the key at. |
[out] | nidx | Assigned the index of the added key. |
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
CKey* AddKeyAdaptTangent | ( | const BaseTime & | time, |
Int32 * | nidx = nullptr , |
||
Bool | synchronizeKeys = false |
||
) |
Adds a key to the curve but retains the curve's current curvature.
[in] | time | The time to add the key at. |
[out] | nidx | Assigned the new key index. |
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
Inserts a key into the curve.
[in] | ckey | The key to insert. The curve takes over the ownership of the pointed key. |
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
Deletes a key from the curve.
[in] | index | The index of the key to delete: 0 <= index < GetKeyCount() |
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
Int32 MoveKey | ( | const BaseTime & | time, |
Int32 | idx, | ||
CCurve * | dseq = nullptr , |
||
Bool | synchronizeKeys = false |
||
) |
Moves a key in the curve.
[in] | time | The time to move the key to. |
[in] | idx | The index of the key to move: 0 <= index < GetKeyCount() |
[in] | dseq | An optional destination curve to move the key to. |
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
void FlushKeys | ( | Bool | synchronizeKeys = false | ) |
Removes all keys from the curve.
[in] | synchronizeKeys | If true the routine is called on other components of the vector (if valid). Curve must be part of a Track. Since 18.002 |
Float64 CalcHermite | ( | Float64 | time, |
Float64 | t1, | ||
Float64 | t2, | ||
Float64 | val1, | ||
Float64 | val2, | ||
Float64 | tan1_val, | ||
Float64 | tan2_val, | ||
Float64 | tan1_t, | ||
Float64 | tan2_t, | ||
Bool | deriv | ||
) | const |
Calculates the Hermite spline between two sets of key values.
[in] | time | The time to evaluate. |
[in] | t1 | The first time. |
[in] | t2 | The second time. |
[in] | val1 | The first value. |
[in] | val2 | The second value. |
[in] | tan1_val | The first tangent value. |
[in] | tan2_val | The second tangent value. |
[in] | tan1_t | The first tangent time. |
[in] | tan2_t | The second tangent time. |
[in] | deriv | If true the derivative is calculated instead of the value. |
Calculates the soft tangents (i.e. auto interpolation) around a key.
[in] | kidx | The key index: 0 <= kidx < GetKeyCount() |
[out] | vl | Assigned the left value. |
[out] | vr | Assigned the right value. |
[out] | tl | Assigned the left time. |
[out] | tr | Assigned the right time. |
Computes the tangents of a key, taking into account all options like zero slope, link slope etc.
[in] | kidx | The key index: 0 <= kidx < GetKeyCount() |
[out] | vl | Assigned the left value. |
[out] | vr | Assigned the right value. |
[out] | tl | Assigned the left time. |
[out] | tr | Assigned the right time. |
Gets the value calculated at time, taking into account things like time curves.
[in] | time | The time to calculate the value at. |
CTrack* GetTrack | ( | ) |
Gets the track of the curve.
void SetKeyDefault | ( | BaseDocument * | doc, |
Int32 | kidx | ||
) |
Sets the defaults for key kidx of the curve.
This includes lock, mute, clamp, break, auto properties, interpolation and tangents.
This setup a value and complete the missing properties with the defaults.
[in] | doc | The curve's document. |
[in] | kidx | The key index. |
BaseTime GetStartTime | ( | ) | const |
Gets the start time of the curve.
BaseTime GetEndTime | ( | ) | const |
Gets the end time of the curve.
Finds the next unmuted key (read-only).
[in] | idx | The key index to start the search from: 0 <= idx < GetKeyCount() |
[out] | ret_idx | Assigned the found key index. |
Finds the next unmuted key (writable).
[in] | idx | The key index to start the search from: 0 <= idx < GetKeyCount() |
[out] | ret_idx | Assigned the found key index. |
Finds the previous unmuted key (read-only).
[in] | idx | The key index to start the search from: 0 <= idx < GetKeyCount() |
[out] | ret_idx | Assigned the found key index. |
Finds the previous unmuted key (writable).
[in] | idx | The key index to start the search from: 0 <= idx < GetKeyCount() |
[out] | ret_idx | Assigned the found key index. |
|
virtual |
Private.
Reimplemented from BaseList2D.
Private.
Reimplemented from BaseList2D.
Private.
Reimplemented from BaseList2D.
Float GetValueCached | ( | const BaseTime & | time, |
Float64 | _time, | ||
GetValueCache * | cache | ||
) | const |
Private.
void FlushKeysI | ( | ) |
Private.
|
protected |
|
protected |
|
protected |
|
private |
|
privatevirtual |
|
privatevirtual |
|
privatevirtual |
Removes the node from its list.
Reimplemented from BaseList2D.
|
privatevirtual |
|
privatevirtual |
|
privatevirtual |
|
friend |
|
friend |
|
private |
|
private |
|
private |