Skip to main content

Post-processing tools 2023 R2

GLTFAnimation.h

Last update: 17.04.2023
1 /*
2  * Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3  *
4  * Restricted Rights Legend
5  *
6  * Use, duplication, or disclosure of this
7  * software and its documentation by the
8  * Government is subject to restrictions as
9  * set forth in subdivision [(b)(3)(ii)] of
10  * the Rights in Technical Data and Computer
11  * Software clause at 52.227-7013.
12  */
13 #ifndef __INCLUDED_GLTF_GLTFANIMATION__
14 #define __INCLUDED_GLTF_GLTFANIMATION__
15 
16 #include "GLTFCommon.h"
17 #include "GLTFObject.h"
18 
19 namespace ANSYS { namespace Nexus { namespace GLTFWriter {
20  class GLTF;
21  class Attribute;
22  class Material;
23  class Node;
24 
34  class AnimationSampler : public Object
35  {
36  public:
39  {
40  AST_LINEAR
41  };
42 
43  protected:
44  virtual ~AnimationSampler() {}
45 
46  public:
50  static GLTFWRITERSPEC AnimationSampler *Create(GLTF *gltf,
51  Attribute *input,
52  Attribute *output,
54  );
55  };
56 
68  class Animation
69  {
70  protected:
71  virtual ~Animation() {}
72 
73  public:
76  static GLTFWRITERSPEC Animation *Create(GLTF *gltf,
77  const char *name = 0
78  );
79 
84  GLTFWRITERSPEC virtual bool AppendChannel(AnimationSampler *sampler,
85  Node *target,
86  const char *path
87  ) = 0;
92  GLTFWRITERSPEC virtual bool AppendChannel(AnimationSampler *sampler,
93  Material *target,
94  const char *path
95  ) = 0;
96  };
97 
98 } } }
99 
100 #endif
101 
Animation samplers define mechanisms for defining how animation channels change over time.
Definition: GLTFAnimation.h:35
static AnimationSampler * Create(GLTF *gltf, Attribute *input, Attribute *output, AnimationSamplerType type=AST_LINEAR)
Animations define mechanisms for changing over time, node properties and material values.
Definition: GLTFAnimation.h:69
virtual bool AppendChannel(AnimationSampler *sampler, Node *target, const char *path)=0
static Animation * Create(GLTF *gltf, const char *name=0)
virtual bool AppendChannel(AnimationSampler *sampler, Material *target, const char *path)=0
Attributes define the per element index values for elements defined by Index.
Definition: GLTFAttribute.h:32
This is the main class of the GLTFWriter.
Definition: GLTFGLTF.h:32
Materials describe how primitives are rendered.
Definition: GLTFMaterial.h:30
Nodes are the GLTFWriter class that contain the data that is defined in the GLTF file.
Definition: GLTFNode.h:31
GLTFWriter API Documentation.
Definition: GLTFAnimation.h:19