21 INLINE GeomVertexAnimationSpec::
22 GeomVertexAnimationSpec() :
23 _animation_type(AT_none),
25 _indexed_transforms(0)
34 INLINE GeomVertexAnimationSpec::
36 _animation_type(other._animation_type),
37 _num_transforms(other._num_transforms),
38 _indexed_transforms(other._indexed_transforms)
47 INLINE
void GeomVertexAnimationSpec::
49 _animation_type = other._animation_type;
50 _num_transforms = other._num_transforms;
51 _indexed_transforms = other._indexed_transforms;
62 return _animation_type;
75 return _num_transforms;
89 return _indexed_transforms;
100 _animation_type = AT_none;
112 _animation_type = AT_panda;
130 _animation_type = AT_hardware;
131 _num_transforms = num_transforms;
132 _indexed_transforms = indexed_transforms;
151 INLINE
bool GeomVertexAnimationSpec::
161 INLINE
bool GeomVertexAnimationSpec::
174 if (_animation_type != other._animation_type) {
175 return (
int)_animation_type - (int)other._animation_type;
178 if (_animation_type == AT_hardware) {
179 if (_num_transforms != other._num_transforms) {
180 return _num_transforms - other._num_transforms;
182 if (_indexed_transforms != other._indexed_transforms) {
183 return (
int)_indexed_transforms - (int)other._indexed_transforms;
192 animation.output(out);
int compare_to(const GeomVertexAnimationSpec &other) const
Provides an arbitrary ordering between different animation specs.
This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded...
int get_num_transforms() const
This is only meaningful for animation_type AT_hardware.
void set_hardware(int num_transforms, bool indexed_transforms)
Specifies that vertex animation is to be performed by the graphics hardware (or at least by the graph...
bool get_indexed_transforms() const
This is only meaningful for animation_type AT_hardware.
void set_none()
Specifies that no vertex animation is represented by this spec.
void set_panda()
Specifies that vertex animation is to be performed by Panda.
bool operator<(const GeomVertexAnimationSpec &other) const
Provides an arbitrary ordering between different animation specs.
AnimationType get_animation_type() const
Returns the type of animation represented by this spec.