Skip to main content

Post-processing tools 2025 R1

ANSYS::AVZ::GLTFWriter::AnimationSampler Class Reference

Last update: 16.07.2025

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::AVZ::GLTFWriter::AnimationSampler:

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()

virtual ANSYS::AVZ::GLTFWriter::AnimationSampler::~AnimationSampler ( )
inlineprotectedvirtual

Definition at line 44 of file GLTFAnimation.h.

Member Function Documentation

◆ Create()

static AnimationSampler * ANSYS::AVZ::GLTFWriter::AnimationSampler::Create ( GLTF * gltf,
Attribute * input,
Attribute * output,
AnimationSamplerType type = AST_LINEAR )
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]gltfGLTF object.
[in]inputAttribute defining the time codes for the sampler. The time values are given in seconds. Must be a float.
[in]outputAttribute defining the channel values at the given time codes.
[in]typeOptional, 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

Connect with Ansys