BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: mesh.h,v 1.9.16.1 2007-03-25 21:26:09 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_VIEW_PRIMITIV_MESH_H 00008 #define BALL_VIEW_PRIMITIV_MESH_H 00009 00010 #ifndef BALL_MATHS_SURFACE_H 00011 # include <BALL/MATHS/surface.h> 00012 #endif 00013 00014 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H 00015 # include <BALL/VIEW/KERNEL/geometricObject.h> 00016 #endif 00017 00018 #ifndef BALL_VIEW_DATATYPE_COLOREXTENSIONS_H 00019 # include <BALL/VIEW/DATATYPE/colorExtensions.h> 00020 #endif 00021 00022 namespace BALL 00023 { 00024 namespace VIEW 00025 { 00038 class BALL_VIEW_EXPORT Mesh 00039 : public GeometricObject, 00040 public Surface, 00041 public MultiColorExtension 00042 { 00043 public: 00044 00045 BALL_CREATE(Mesh) 00046 00047 00050 00053 Mesh(); 00054 00057 Mesh(const Mesh& mesh); 00058 00060 00062 00065 virtual ~Mesh(); 00066 00070 virtual void clear(); 00071 00073 00076 00079 void set(const Mesh& mesh); 00080 00084 const Mesh& operator = (const Mesh& mesh); 00085 00090 void swap(Mesh& mesh); 00091 00093 00096 00100 virtual bool isValid() const; 00101 00109 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const; 00110 00112 bool binaryWrite(const String& filename); 00113 00115 bool binaryRead(const String& filename); 00116 00117 // Method to get all vertices from a geometric object 00118 virtual void getVertices(vector<Vector3>& vertices) const; 00119 00121 }; 00122 00123 } } // namespaces 00124 00125 #endif // BALL_VIEW_PRIMITIV_MESH_H