ANSYS::AVZ::GLTFWriter::AnimationSampler Class Reference
Last update: 16.07.2025#include <GLTFWriter.h>

Public Types | |
| enum | AnimationSamplerType { AST_LINEAR } |
Static Public Member Functions | |
| static AnimationSampler * | Create (GLTF *gltf, Attribute *input, Attribute *output, AnimationSamplerType type=AST_LINEAR) |
Detailed Description
The sampler defines a time sequence, a value sequence, and an interpolation type. The time sequence must be an increasing sequence that starts at or greater than 0. The time sequence is linearly interpolated between values.
The value sequence is interpolated between values based on the interpolation type. There is no restriction on the value, other than it must be appropriate for the channel.
- Examples
- Test006.cpp, and Test008.cpp.
Definition at line 34 of file GLTFAnimation.h.
Member Enumeration Documentation
◆ AnimationSamplerType
Type of interpolation to apply when changing output values.
| Enumerator | |
|---|---|
| AST_LINEAR | Linear interploation. |
Definition at line 38 of file GLTFAnimation.h.
Constructor & Destructor Documentation
◆ ~AnimationSampler()
|
inlineprotectedvirtual |
Definition at line 44 of file GLTFAnimation.h.
Member Function Documentation
◆ Create()
|
static |
Creates an animation sampler. The number of values in the input attribute must match the number of values in the output attribute.
- Returns
- AnimationSampler object. Do not delete this pointer.
- Parameters
-
[in] gltf GLTF object. [in] input Attribute defining the time codes for the sampler. The time values are given in seconds. Must be a float. [in] output Attribute defining the channel values at the given time codes. [in] type Optional, AnimationSampler::AnimationSamplerType defining type of interpolation.
The documentation for this class was generated from the following file:
- D:/ANSYSDev/Product-src/webgl_viewer/gltfwriterlib/include/GLTFAnimation.h