# 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: | The Channel that was just added to this Animation.

  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: | The Channel that was just added to this Animation.

  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: | The Channel that was just added to this Animation.

  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: | 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 over time.
    Returns: | The Channel that was just added to this Animation.

  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: | The Channel that was just added to this Animation.

  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: | 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 float keyframes, describing the changes to be applied to in_target over time.
    Returns: | The Channel that was just added to this Animation.

  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: | 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 Point keyframes, describing the changes to be applied to in_target over time.
    Returns: | The Channel that was just added to this Animation.

  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: | 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 Vector keyframes, describing the changes to be applied to in_target over time.
    Returns: | The Channel that was just added to this Animation.

  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: | 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 Point keyframes, describing the changes to be applied to in_target over time.
    Returns: | The Channel that was just added to this Animation.

  `Animation`()
  `Animation`(Animation const &in_that)
  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.

  void `Delete`()

    Deletes 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.

  Animation &`operator=`(Animation &&in_that)
  Animation &`operator=`(Animation const &in_that)
  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`()

  Public Static Attributes

  static const HPS::Type `staticType` = HPS::Type::Animation

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Visualize Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Visualize Desktop?
What are the latest release notes for HOOPS Visualize Desktop?
How do I start evaluating HOOPS Visualize Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...