00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef COMPUTEDVERTICESMORPH_H
00020 #define COMPUTEDVERTICESMORPH_H
00021
00022 #include <pandabase.h>
00023 #include <vector_typedWritable.h>
00024
00025 #include <luse.h>
00026
00027 class CharacterSlider;
00028 class BamReader;
00029 class BamWriter;
00030 class Datagram;
00031 class DatagramIterator;
00032 class TypedWritable;
00033
00034
00035
00036
00037
00038
00039
00040 class EXPCL_PANDA ComputedVerticesMorphValue2 {
00041 public:
00042 typedef LVector2f VecType;
00043
00044 INLINE ComputedVerticesMorphValue2(int index, const VecType &mvector);
00045 INLINE ComputedVerticesMorphValue2(void);
00046
00047 ushort _index;
00048 VecType _vector;
00049
00050 public:
00051 void write_datagram(Datagram &dest);
00052 void read_datagram(DatagramIterator &source);
00053 };
00054
00055
00056
00057
00058
00059
00060
00061 class EXPCL_PANDA ComputedVerticesMorphValue3 {
00062 public:
00063 typedef LVector3f VecType;
00064
00065 INLINE ComputedVerticesMorphValue3(int index, const VecType &mvector);
00066 INLINE ComputedVerticesMorphValue3(void);
00067
00068 ushort _index;
00069 VecType _vector;
00070
00071 public:
00072 void write_datagram(Datagram &dest);
00073 void read_datagram(DatagramIterator &source);
00074 };
00075
00076
00077
00078
00079
00080
00081
00082 class EXPCL_PANDA ComputedVerticesMorphValue4 {
00083 public:
00084 typedef LVector4f VecType;
00085
00086 INLINE ComputedVerticesMorphValue4(int index, const VecType &mvector);
00087 INLINE ComputedVerticesMorphValue4(void);
00088
00089 ushort _index;
00090 VecType _vector;
00091
00092 public:
00093 void write_datagram(Datagram &dest);
00094 void read_datagram(DatagramIterator &source);
00095 };
00096
00097
00098
00099
00100
00101
00102
00103 template<class ValueType, class MorphValueType>
00104 class ComputedVerticesMorph {
00105 public:
00106 INLINE ComputedVerticesMorph();
00107 INLINE ComputedVerticesMorph(const ComputedVerticesMorph ©);
00108
00109 typedef MorphValueType MorphValue;
00110 typedef pvector<MorphValue> Morphs;
00111
00112 void output(ostream &out) const;
00113
00114 short _slider_index;
00115 Morphs _morphs;
00116
00117 public:
00118 void write_datagram(Datagram &dest);
00119 void read_datagram(DatagramIterator &source);
00120 };
00121
00122 template<class ValueType, class MorphValueType>
00123 inline ostream &operator << (ostream &out, const ComputedVerticesMorph<ValueType, MorphValueType> &morph) {
00124 morph.output(out);
00125 return out;
00126 }
00127
00128 typedef ComputedVerticesMorph<Vertexf, ComputedVerticesMorphValue3> ComputedVerticesMorphVertex;
00129 typedef ComputedVerticesMorph<Normalf, ComputedVerticesMorphValue3> ComputedVerticesMorphNormal;
00130 typedef ComputedVerticesMorph<TexCoordf, ComputedVerticesMorphValue2> ComputedVerticesMorphTexCoord;
00131 typedef ComputedVerticesMorph<Colorf, ComputedVerticesMorphValue4> ComputedVerticesMorphColor;
00132
00133 #include "computedVerticesMorph.I"
00134
00135 #endif
00136