From e03613d6cde217f31860feb63ef51568b1ce8047 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 25 Jun 2004 11:31:49 +0000 Subject: [PATCH] define of abstract class of mofier operator for decimation --- .../tetramesh/decimation/operationsdef.h | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 vcg/complex/tetramesh/decimation/operationsdef.h diff --git a/vcg/complex/tetramesh/decimation/operationsdef.h b/vcg/complex/tetramesh/decimation/operationsdef.h new file mode 100644 index 00000000..f15fb7d2 --- /dev/null +++ b/vcg/complex/tetramesh/decimation/operationsdef.h @@ -0,0 +1,55 @@ +#ifndef __VCG_TETRA_DECIMATION_OPERATION_DEFS +# define __VCG_TETRA_DECIMATION_OPERATION_DEFS + +namespace vcg{ + namespace tetra{ + + +enum ModifiersType{MTEdgeCollapse,MTEdgeSplit}; + + /** \addtogroup tetramesh */ +/*@{*/ +/// This Class is used to generalize a modifier + +template +class LocalModification +{ + + public: + /// The tetrahedral mesh type + typedef typename TETRA_MESH_TYPE TetraMeshType; + /// The tetrahedron type + typedef typename TetraMeshType::TetraType TetraType; + /// The vertex type + typedef typename TetraType::VertexType VertexType; + /// The coordinate type + typedef typename TetraType::VertexType::CoordType CoordType; + /// The scalar type + typedef typename TetraMeshType::VertexType::ScalarType ScalarType; + ///the pos type + typedef typename Pos PosType; + typedef typename std::pair HeapRetElem; + //the return type of heap updating + typedef typename std::vector HeapRetType; + /// Default Constructor + LocalModification() + { + }; + + ~LocalModification() + { + }; + + + virtual ScalarType ComputePriority()=0; + virtual ScalarType ComputeError()=0; + virtual void Execute()=0; + virtual bool PreserveTopology()=0; + virtual HeapRetType UpdateHeap()=0; + +};//end class local modification + + + } +} +#endif \ No newline at end of file