00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGMORPH_H
00016 #define EGGMORPH_H
00017
00018 #include "pandabase.h"
00019
00020 #include "namable.h"
00021 #include "luse.h"
00022 #include "pset.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 template<class Parameter>
00033 class EggMorph : public Namable {
00034 public:
00035 INLINE EggMorph(const string &name, const Parameter &offset);
00036 INLINE void set_offset(const Parameter &offset);
00037 INLINE const Parameter &get_offset() const;
00038
00039 INLINE bool operator < (const EggMorph<Parameter> &other) const;
00040 INLINE bool operator == (const EggMorph<Parameter> &other) const;
00041 INLINE bool operator != (const EggMorph<Parameter> &other) const;
00042
00043 INLINE int compare_to(const EggMorph<Parameter> &other, double threshold) const;
00044
00045 INLINE void output(ostream &out, const string &tag,
00046 int num_dimensions) const;
00047
00048 private:
00049 Parameter _offset;
00050 };
00051
00052 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph<LVector3d>);
00053 EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, EggMorph<LVector4>);
00054
00055 typedef EggMorph<LVector3d> EggMorphVertex;
00056 typedef EggMorph<LVector3d> EggMorphNormal;
00057 typedef EggMorph<LVector3d> EggMorphTexCoord;
00058 typedef EggMorph<LVector4> EggMorphColor;
00059
00060 #include "eggMorph.I"
00061
00062 #endif