00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef COMPUTEDVERTICESMAKERENTITY_H
00020 #define COMPUTEDVERTICESMAKERENTITY_H
00021
00022 #include "pandabase.h"
00023
00024 #include "luse.h"
00025 #include "eggMorphList.h"
00026 #include "typedef.h"
00027 #include "pointerToArray.h"
00028
00029 #include "pmap.h"
00030 #include <math.h>
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 template<class ValueType, class MorphType>
00042 class ComputedVerticesMakerEntity {
00043 public:
00044 INLINE ComputedVerticesMakerEntity(const ValueType &value,
00045 const MorphType &morphs);
00046 bool
00047 operator < (const ComputedVerticesMakerEntity<ValueType, MorphType> &other) const;
00048
00049 ValueType _value;
00050 const MorphType &_morphs;
00051 };
00052
00053
00054
00055
00056
00057
00058
00059
00060 template<class ValueType, class MorphType>
00061 class ComputedVerticesMakerEntityMap {
00062 public:
00063 int add_value(const ValueType &value, const MorphType &morphs,
00064 PTA(ValueType) &table);
00065
00066 typedef pmap<ComputedVerticesMakerEntity<ValueType, MorphType>, int> MapType;
00067 MapType _map;
00068 };
00069
00070 typedef ComputedVerticesMakerEntityMap<Vertexf, EggMorphVertexList> ComputedVerticesMakerVertexMap;
00071 typedef ComputedVerticesMakerEntityMap<Normalf, EggMorphNormalList> ComputedVerticesMakerNormalMap;
00072 typedef ComputedVerticesMakerEntityMap<TexCoordf, EggMorphTexCoordList> ComputedVerticesMakerTexCoordMap;
00073 typedef ComputedVerticesMakerEntityMap<Colorf, EggMorphColorList> ComputedVerticesMakerColorMap;
00074
00075 #include "computedVerticesMakerEntity.I"
00076
00077 #endif