# QuaternionSampler

class `QuaternionSampler` : public HPS::Sampler

  A QuaternionSampler is a type of Sampler which holds Keyframe which specify values as Quaternions. For example, if a Channel is setup to animate the value of the camera’s target, the values assumed by the camera target will have to be specified as Quaternions, and therefore be held in QuaternionKeyframes, which will be collected in a QuaternionSampler.

  Public Functions

  void `AddKeyframe`(QuaternionKeyframe const &in_keyframe)

    Adds the provided keyframe to this Sampler. The provided keyframe will be automatically sorted into the Sampler. If the sampler already contains a keyframe targeting the same timer tick as in_keyframe, it will be replaced

    Parameters: | in_keyframe – the keyframe to add to this Sampler

  void `AddKeyframes`(QuaternionKeyframeArray const &in_keyframes)

    Adds the provided keyframes to this Sampler. The provided keyframes will be automatically sorted and validated. Adding a key frame will replace already existing keyframes that target the same timer tick. Each element in in_keyframe should target a different timer tick. Not complying will result in an exception of type HPS::InvalidSpecificationException being thrown.

    Parameters: | in_keyframes – the array of keyframes to add to this Sampler

  void `AddKeyframes`(size_t in_count, QuaternionKeyframe const in_keyframes[])

    Adds the provided keyframes to this Sampler. The provided keyframes will be automatically sorted and validated. Adding a key frame will replace already existing keyframes that target the same timer tick. Each element in in_keyframe should target a different timer tick. Not complying will result in an exception of type HPS::InvalidSpecificationException being thrown.

    Parameters: | in_count – the number of keyframes in the in_keyframes array in_keyframes – the array of keyframes to add to this Sampler

  QuaternionSplineControlValuesArray const &`GetControlValues`() const

    Returns the control values this Sampler is set to use during Spline interpolation of keyframe values.

    Returns: | An array of control point values previously specified to SetControlValues.

  QuaternionKeyframeArray const &`GetKeyframes`() const

    Returns the keyframes contained in this Sampler. Because keyframes are sorted as they are added to the Sampler, the order of keyframes returned might not match the order in which they were inserted in this Sampler.

    Returns: | An array of keyframes contained in this Sampler.

  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.

  `QuaternionSampler`()
  `QuaternionSampler`(QuaternionSampler const &in_that)
  explicit `QuaternionSampler`(Sampler const &in_that)
  void `SetControlValues`(QuaternionSplineControlValuesArray const &in_control_points)

    Sets control values used during Spline interpolation of keyframe values. If this Sampler is not set to use Spline interpolation these values will be ignored during playback.

    Parameters: | in_control_points – The control points to use for interpolation. When executing playback this array must be equal in size to the keyframe array associated with this Sampler.

  void `SetKeyframes`(QuaternionKeyframeArray const &in_keyframes)

    Replaces the keyframes on this Sampler with those provided The provided keyframes will be automatically sorted and validated. Each element in in_keyframe should target a different timer tick. Not complying will result in an exception of type HPS::InvalidSpecificationException being thrown.

    Parameters: | in_keyframes – the array of keyframes to add to this Sampler

  void `SetKeyframes`(size_t in_count, QuaternionKeyframe const in_keyframes[])

    Replaces the keyframes on this Sampler with those provided The provided keyframes will be automatically sorted and validated. Each element in in_keyframe should target a different timer tick. Not complying will result in an exception of type HPS::InvalidSpecificationException being thrown.

    Parameters: | in_count – the number of keyframes in the in_keyframes array in_keyframes – the array of keyframes to add to this Sampler

  virtual `~QuaternionSampler`()

  Public Static Attributes

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

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