00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 INLINE GeomVertexAnimationSpec::
00022 GeomVertexAnimationSpec() :
00023 _animation_type(AT_none),
00024 _num_transforms(0),
00025 _indexed_transforms(0)
00026 {
00027 }
00028
00029
00030
00031
00032
00033
00034 INLINE GeomVertexAnimationSpec::
00035 GeomVertexAnimationSpec(const GeomVertexAnimationSpec &other) :
00036 _animation_type(other._animation_type),
00037 _num_transforms(other._num_transforms),
00038 _indexed_transforms(other._indexed_transforms)
00039 {
00040 }
00041
00042
00043
00044
00045
00046
00047 INLINE void GeomVertexAnimationSpec::
00048 operator = (const GeomVertexAnimationSpec &other) {
00049 _animation_type = other._animation_type;
00050 _num_transforms = other._num_transforms;
00051 _indexed_transforms = other._indexed_transforms;
00052 }
00053
00054
00055
00056
00057
00058
00059
00060 INLINE GeomVertexAnimationSpec::AnimationType GeomVertexAnimationSpec::
00061 get_animation_type() const {
00062 return _animation_type;
00063 }
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 INLINE int GeomVertexAnimationSpec::
00074 get_num_transforms() const {
00075 return _num_transforms;
00076 }
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 INLINE bool GeomVertexAnimationSpec::
00088 get_indexed_transforms() const {
00089 return _indexed_transforms;
00090 }
00091
00092
00093
00094
00095
00096
00097
00098 INLINE void GeomVertexAnimationSpec::
00099 set_none() {
00100 _animation_type = AT_none;
00101 }
00102
00103
00104
00105
00106
00107
00108
00109
00110 INLINE void GeomVertexAnimationSpec::
00111 set_panda() {
00112 _animation_type = AT_panda;
00113 }
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 INLINE void GeomVertexAnimationSpec::
00129 set_hardware(int num_transforms, bool indexed_transforms) {
00130 _animation_type = AT_hardware;
00131 _num_transforms = num_transforms;
00132 _indexed_transforms = indexed_transforms;
00133 }
00134
00135
00136
00137
00138
00139
00140
00141 INLINE bool GeomVertexAnimationSpec::
00142 operator < (const GeomVertexAnimationSpec &other) const {
00143 return (compare_to(other) < 0);
00144 }
00145
00146
00147
00148
00149
00150
00151 INLINE bool GeomVertexAnimationSpec::
00152 operator == (const GeomVertexAnimationSpec &other) const {
00153 return (compare_to(other) == 0);
00154 }
00155
00156
00157
00158
00159
00160
00161 INLINE bool GeomVertexAnimationSpec::
00162 operator != (const GeomVertexAnimationSpec &other) const {
00163 return (compare_to(other) != 0);
00164 }
00165
00166
00167
00168
00169
00170
00171
00172 INLINE int GeomVertexAnimationSpec::
00173 compare_to(const GeomVertexAnimationSpec &other) const {
00174 if (_animation_type != other._animation_type) {
00175 return (int)_animation_type - (int)other._animation_type;
00176 }
00177
00178 if (_animation_type == AT_hardware) {
00179 if (_num_transforms != other._num_transforms) {
00180 return _num_transforms - other._num_transforms;
00181 }
00182 if (_indexed_transforms != other._indexed_transforms) {
00183 return (int)_indexed_transforms - (int)other._indexed_transforms;
00184 }
00185 }
00186
00187 return 0;
00188 }
00189
00190 INLINE ostream &
00191 operator << (ostream &out, const GeomVertexAnimationSpec &animation) {
00192 animation.output(out);
00193 return out;
00194 }