Animation
-
class
Animation
: public HPS::Sprocket The Animation class is used to animate objects in the scene through the creation of one or more Channels. An Animation is owned by a Model, and as such needs to be created through the Model::CreateAnimation function. Animation objects are only valid for playback if they contain one or more Channel objects.
Public Functions
-
Channel
AddCameraPositionChannel
(char const *in_name, PointSampler const &in_sampler) Creates a Channel suitable for animating the camera’s position and adds it to this Animation.
Parameters: - in_name – A name used to identify this Channel.
- in_sampler – A sampler containing Point keyframes, describing the changes to be applied to in_target over time.
Returns:
-
Channel
AddCameraTargetChannel
(char const *in_name, PointSampler const &in_sampler) Creates a Channel suitable for animating the camera’s target and adds it to this Animation.
Parameters: - in_name – A name used to identify this Channel.
- in_sampler – A sampler containing Point keyframes, describing the changes to be applied to in_target over time.
Returns:
-
Channel
AddCameraUpChannel
(char const *in_name, VectorSampler const &in_sampler) Creates a Channel suitable for animating the camera’s up vector and adds it to this Animation.
Parameters: - in_name – A name used to identify this Channel.
- in_sampler – A sampler containing Vector keyframes, describing the changes to be applied to in_target over time.
Returns:
-
Channel
AddColorChannel
(char const *in_name, KeyPath const &in_target, RGBColorSampler const &in_sampler) Creates a Channel suitable for animating the target’s faces color and adds it to this Animation.
Parameters: Returns:
-
Channel
AddColorChannel
(char const *in_name, KeyPath const &in_target, RGBColorSampler const &in_sampler, HPS::ChannelColorUsageArray in_channel_usages) Creates a Channel suitable for animating the target’s color and adds it to this Animation.
Parameters: - in_name – A name used to identify this Channel.
- in_target – The segment on which the changes described by this Channel will be applied during the Animation playback.
- in_sampler – A sampler containing RGBColor keyframes, describing the changes to be applied to in_target
- in_channel_usages – The types of the target of this Channel that will be changed during the Animation. over time.
Returns:
-
Channel
AddOpacityChannel
(char const *in_name, KeyPath const &in_target, FloatSampler const &in_sampler) Creates a Channel suitable for animating the target’s opacity and adds it to this Animation.
Parameters: Returns:
-
Channel
AddRotationChannel
(char const *in_name, KeyPath const &in_target, QuaternionSampler const &in_sampler) Creates a Channel suitable for animating the target’s rotation and adds it to this Animation.
Parameters: Returns:
-
Channel
AddScaleChannel
(char const *in_name, KeyPath const &in_target, VectorSampler const &in_sampler) Creates a Channel suitable for animating the target’s scale and adds it to this Animation.
Parameters: Returns:
-
Channel
AddTranslationChannel
(char const *in_name, KeyPath const &in_target, VectorSampler const &in_sampler) Creates a Channel suitable for animating the target’s position and adds it to this Animation.
Parameters: Returns:
-
Animation
()
-
void
Assign
(Animation const &in_that) Share the underlying smart-pointer of the Animation source.
Parameters: in_that – The Animation source of the assignment. Returns: A reference to this Animation.
-
bool
Equals
(Animation const &in_that) const Check if the source Animation points to the same underlying impl as this Animation.
Parameters: in_that – The source Animation to compare to this Animation. Returns: true if the objects reference the same impl, false otherwise.
-
ChannelArray const &
GetChannels
() const Returns a list of Channels currently associated with this Animation.
Returns: a list of Channels currently associated with this Animation.
-
UTF8 const &
GetName
() const Returns the name given to this Animation when it was created.
Returns: The name of this Animation.
-
inline virtual HPS::Type
ObjectType
() const This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
bool
operator!=
(Animation const &in_that) const Check if the source Animation points to a different impl than this Animation.
Parameters: in_that – The source Animation to compare to this Animation. Returns: true if the objects reference different impls, false otherwise.
-
bool
operator==
(Animation const &in_that) const Check if the source Animation points to the same underlying impl as this Animation.
Parameters: in_that – The source Animation to compare to this Animation. Returns: true if the objects reference the same impl, false otherwise.
-
void
RemoveChannel
(Channel &in_channel) Removes a Channel from this Animation and deletes it.
Parameters: in_channel – The channel to remove from this Animation.
-
~Animation
()
-
Channel