Channel

class HPS::Channel : public HPS::Sprocket

The Channel class describes part of an Animation through the use of a Sampler. A Channel is associated to an Animation, and as such needs to be created through one of the Animation::AddChannel functions. Each Channel is specific to a type of animation and targets a specific object in the scene graph.

Public Types

enum ChannelType

The type of Animation described by this Channel.

Values:

enumerator Translation

The target of this Channel will be translated in space.

enumerator Rotation

The target of this Channel will be rotated.

enumerator Scale

The target of this Channel will be scaled.

enumerator Color

The color of the target of this Channel will be changed.

enumerator Opacity

The opacity of the target of this Channel will be changed.

enumerator CameraPosition

The position of the camera present at the target segment will be changed.

enumerator CameraTarget

The target of the camera present at the target segment will be changed.

enumerator CameraUp

The up vector of the camera present at the target segment will be changed.

Public Functions

void Assign(Channel const &in_that)

Share the underlying smart-pointer of the Channel source.

Parameters

in_that – The Channel source of the assignment.

Returns

A reference to this Channel.

Channel()
Channel(Channel const &in_that)
bool Equals(Channel const &in_that) const

Check if the source Channel points to the same underlying impl as this Channel.

Parameters

in_that – The source Channel to compare to this Animation.

Returns

true if the objects reference the same impl, false otherwise.

ChannelType GetChannelType() const

Returns the type of Animation which will be performed by this Channel

Returns

The Channel Type

UTF8 &GetName() const

Returns the name given to this Channel when it was added to an Animation

Returns

The name of this Channel

Sampler &GetSampler()

Returns the Sampler associated with this Channel

Returns

The Sampler associated with this Channel

Sampler const &GetSampler() const

Returns the Sampler associated with this Channel

Returns

The Sampler associated with this Channel

KeyPath const &GetTarget() const

Returns the target of this Channel. If this Channel is being used to animate a camera property this key path will be empty.

Returns

The SegmentKey targeted by this Channel

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!=(Channel const &in_that) const

Check if the source Channel points to a different impl than this Channel.

Parameters

in_that – The source Channel to compare to this Animation.

Returns

true if the objects reference different impls, false otherwise.

Channel &operator=(Channel &&in_that)
Channel &operator=(Channel const &in_that)
bool operator==(Channel const &in_that) const

Check if the source Channel points to the same underlying impl as this Channel.

Parameters

in_that – The source Channel to compare to this Channel.

Returns

true if the objects reference the same impl, false otherwise.

void SetSampler(Sampler const &sampler)

Sets the Sampler associated with this Channel

Parameters

in_that – The source Sampler to use.

~Channel()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::Channel