00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGMESHEREDGE_H
00016 #define EGGMESHEREDGE_H
00017
00018 #include "pandabase.h"
00019 #include "eggVertexPool.h"
00020 #include "eggVertex.h"
00021 #include "plist.h"
00022
00023 class EggMesherStrip;
00024
00025
00026
00027
00028
00029
00030
00031
00032 class EggMesherEdge {
00033 public:
00034 INLINE EggMesherEdge(int vi_a, int vi_b);
00035 INLINE EggMesherEdge(const EggMesherEdge ©);
00036
00037 void remove(EggMesherStrip *strip);
00038 void change_strip(EggMesherStrip *from, EggMesherStrip *to);
00039
00040 INLINE bool contains_vertex(int vi) const;
00041
00042 INLINE bool matches(const EggMesherEdge &other) const;
00043
00044 INLINE EggMesherEdge *common_ptr();
00045
00046 INLINE bool operator == (const EggMesherEdge &other) const;
00047 INLINE bool operator != (const EggMesherEdge &other) const;
00048 INLINE bool operator < (const EggMesherEdge &other) const;
00049
00050 INLINE double compute_length(const EggVertexPool *vertex_pool) const;
00051 INLINE LVecBase3d compute_box(const EggVertexPool *vertex_pool) const;
00052
00053 void output(ostream &out) const;
00054
00055 int _vi_a, _vi_b;
00056
00057 typedef plist<EggMesherStrip *> Strips;
00058 Strips _strips;
00059 EggMesherEdge *_opposite;
00060 };
00061
00062 INLINE ostream &
00063 operator << (ostream &out, const EggMesherEdge &edge) {
00064 edge.output(out);
00065 return out;
00066 }
00067
00068 #include "eggMesherEdge.I"
00069
00070 #endif