17 INLINE GeomVertexAnimationSpec::
18 GeomVertexAnimationSpec() :
19 _animation_type(AT_none),
21 _indexed_transforms(0)
28 INLINE GeomVertexAnimationSpec::
30 _animation_type(other._animation_type),
31 _num_transforms(other._num_transforms),
32 _indexed_transforms(other._indexed_transforms)
39 INLINE
void GeomVertexAnimationSpec::
41 _animation_type = other._animation_type;
42 _num_transforms = other._num_transforms;
43 _indexed_transforms = other._indexed_transforms;
49 INLINE GeomVertexAnimationSpec::AnimationType GeomVertexAnimationSpec::
50 get_animation_type()
const {
51 return _animation_type;
59 INLINE
int GeomVertexAnimationSpec::
60 get_num_transforms()
const {
61 return _num_transforms;
69 INLINE
bool GeomVertexAnimationSpec::
70 get_indexed_transforms()
const {
71 return _indexed_transforms;
79 _animation_type = AT_none;
89 _animation_type = AT_panda;
103 _animation_type = AT_hardware;
104 _num_transforms = num_transforms;
105 _indexed_transforms = indexed_transforms;
119 INLINE
bool GeomVertexAnimationSpec::
127 INLINE
bool GeomVertexAnimationSpec::
137 if (_animation_type != other._animation_type) {
138 return (
int)_animation_type - (int)other._animation_type;
141 if (_animation_type == AT_hardware) {
142 if (_num_transforms != other._num_transforms) {
143 return _num_transforms - other._num_transforms;
145 if (_indexed_transforms != other._indexed_transforms) {
146 return (
int)_indexed_transforms - (int)other._indexed_transforms;
153 INLINE std::ostream &
155 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.
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...
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.