.. role:: clio-readonly
   :class: clio-flag clio-flag-readonly


#######
Sampler
#######

.. js:class:: wv.Animation.Sampler

   Describes how the keyframes in a buffer are sampled.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Animation.Sampler.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.Animation.Sampler.buffer`
   * :js:data:`~wv.Animation.Sampler.interpolationType`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Animation.Sampler.interpolateQuat`
   * :js:meth:`~wv.Animation.Sampler.interpolateScalar`
   * :js:meth:`~wv.Animation.Sampler.interpolateVec3`
   * :js:meth:`~wv.Animation.Sampler.interpolateVec3CubicSpline`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.Animation.Sampler.constructor

      .. rst-class:: sig-pretty-signature
      
         | Sampler(**buffer**\ : :js:class:`KeyframeBuffer <wv.Animation.KeyframeBuffer>`\ , **interpolationType**\ : :js:data:`InterpolationType <wv.Animation.InterpolationType>`\ ): :js:class:`Sampler <wv.Animation.Sampler>`
      
      Creates a new sampler for a [[KeyframeBuffer]]
      
      **Parameters**
      
      
         **buffer**\ : :js:class:`KeyframeBuffer <wv.Animation.KeyframeBuffer>`
      
      
            The buffer that will be sampled.
      
      
         **interpolationType**\ : :js:data:`InterpolationType <wv.Animation.InterpolationType>`
      
      
            The Type of interpolation that will be used
      
      
      
      **Returns**\ : :js:class:`Sampler <wv.Animation.Sampler>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wv.Animation.Sampler.buffer

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | buffer: :js:class:`KeyframeBuffer <wv.Animation.KeyframeBuffer>`
      
      The buffer that will be sampled.
      



.. js:data:: wv.Animation.Sampler.interpolationType

      .. rst-class:: sig-pretty-signature
      
         | interpolationType: :js:data:`InterpolationType <wv.Animation.InterpolationType>`
      
      The Type of interpolation that will be used
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.Animation.Sampler.interpolateQuat

      .. rst-class:: sig-pretty-signature
      
         | interpolateQuat(**t**\ : *number*\ , **out**\ : *Quaternion*\ ): *void*
      
      Computes an interpolated quaternion for the given frame.
      
      **Parameters**
      
      
         **t**\ : *number*
      
         **out**\ : *Quaternion*
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Animation.Sampler.interpolateScalar

      .. rst-class:: sig-pretty-signature
      
         | interpolateScalar(**t**\ : *number*\ ): *number*
      
      Computes an interpolated scalar value for the given frame.
      
      **Parameters**
      
      
         **t**\ : *number*
      
      
      **Returns**\ : *number*
      



.. js:method:: wv.Animation.Sampler.interpolateVec3

      .. rst-class:: sig-pretty-signature
      
         | interpolateVec3(**t**\ : *number*\ , **out**\ : :js:class:`Point3 <wv.Point3>`\ ): *void*
      
      Computes an interpolated Vector 3 value for the given frame.
      
      **Parameters**
      
      
         **t**\ : *number*
      
         **out**\ : :js:class:`Point3 <wv.Point3>`
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Animation.Sampler.interpolateVec3CubicSpline

      .. rst-class:: sig-pretty-signature
      
         | interpolateVec3CubicSpline(**k0**\ : *number*\ , **k1**\ : *number*\ , **t**\ : *number*\ , **out**\ : :js:class:`Point3 <wv.Point3>`\ ): *void*
      
      Performs Cubic Spline Interpolation on the Vector3 values at keyframes beginning at indices k0 and k1
      
      **Parameters**
      
      
         **k0**\ : *number*
      
         **k1**\ : *number*
      
         **t**\ : *number*
      
         **out**\ : :js:class:`Point3 <wv.Point3>`
      
      
      **Returns**\ : *void*
      




