00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "geomVertexAnimationSpec.h"
00016 #include "datagram.h"
00017 #include "datagramIterator.h"
00018
00019
00020
00021
00022
00023
00024 void GeomVertexAnimationSpec::
00025 output(ostream &out) const {
00026 switch (_animation_type) {
00027 case AT_none:
00028 out << "none";
00029 break;
00030
00031 case AT_panda:
00032 out << "panda";
00033 break;
00034
00035 case AT_hardware:
00036 out << "hardware(" << _num_transforms << ", "
00037 << _indexed_transforms << ")";
00038 break;
00039 }
00040 }
00041
00042
00043
00044
00045
00046
00047
00048 void GeomVertexAnimationSpec::
00049 write_datagram(BamWriter *, Datagram &dg) {
00050 dg.add_uint8(_animation_type);
00051 dg.add_uint16(_num_transforms);
00052 dg.add_bool(_indexed_transforms);
00053 }
00054
00055
00056
00057
00058
00059
00060
00061
00062 void GeomVertexAnimationSpec::
00063 fillin(DatagramIterator &scan, BamReader *) {
00064 _animation_type = (AnimationType)scan.get_uint8();
00065 _num_transforms = scan.get_uint16();
00066 _indexed_transforms = scan.get_bool();
00067 }