ANSYS::AVZ::GLTFWriter::Animation Class Reference
Last update: 16.07.2025#include <GLTFWriter.h>
Public Member Functions | |
| virtual bool | AppendChannel (AnimationSampler *sampler, Node *target, const char *path)=0 |
| virtual bool | AppendChannel (AnimationSampler *sampler, Material *target, const char *path)=0 |
Static Public Member Functions | |
| static Animation * | Create (GLTF *gltf, const char *name=0) |
Detailed Description
Currently, only the node matrix, node visibility, and all material values can be changed. The initial node matrix and node visibility are passed to the Node::CreateMesh method and must be specified if their values are to be changed in the Animation. Similarly, for a material value to be animated, it must first be added to the material with the Material::AppendValue method.
It is possible for a GLTF/AVZ file to have more than one animation. Currently, only a single animation is shown in the viewer. If multiple animations are created, they are all played as a single animation. So it might be wise to only create a single animation at present until this limitation is removed.
- Examples
- Test006.cpp, and Test008.cpp.
Definition at line 68 of file GLTFAnimation.h.
Constructor & Destructor Documentation
◆ ~Animation()
|
inlineprotectedvirtual |
Definition at line 71 of file GLTFAnimation.h.
Member Function Documentation
◆ AppendChannel() [1/2]
|
pure virtual |
Adds a channel to an animation. The channel changes the target/path using the sampler. Only some properties can be animated:
- node - matrix
- node - visible
- material - Any value
- Returns
- Status of AppendChannel.
- Parameters
-
[in] sampler AnimationSampler object. [in] target Node of which to animate a property, or Material of which to animate a value. [in] path Name of property or name of value to animate.
◆ AppendChannel() [2/2]
|
pure virtual |
Adds a channel to an animation. The channel changes the target/path using the sampler. Only some properties can be animated:
- node - matrix
- node - visible
- material - Any value
- Returns
- Status of AppendChannel.
- Parameters
-
[in] sampler AnimationSampler object. [in] target Node of which to animate a property, or Material of which to animate a value. [in] path Name of property or name of value to animate.
- Examples
- Test006.cpp, and Test008.cpp.
◆ Create()
The documentation for this class was generated from the following file:
- D:/ANSYSDev/Product-src/webgl_viewer/gltfwriterlib/include/GLTFAnimation.h