00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: quadMesh.h,v 1.1.4.1 2007-03-25 21:26:11 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_VIEW_PRIMITIV_QUADMESH_H 00008 #define BALL_VIEW_PRIMITIV_QUADMESH_H 00009 00010 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H 00011 # include <BALL/VIEW/KERNEL/geometricObject.h> 00012 #endif 00013 00014 #ifndef BALL_VIEW_DATATYPE_COLOREXTENSIONS_H 00015 # include <BALL/VIEW/DATATYPE/colorExtensions.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00020 namespace VIEW 00021 { 00027 class BALL_VIEW_EXPORT QuadMesh 00028 : public GeometricObject, 00029 public MultiColorExtension 00030 { 00031 public: 00032 00034 struct Quadruple 00035 { 00037 Quadruple(Position p1, Position p2, Position p3, Position p4) 00038 { 00039 q1 = p1; q2 = p2; q3 = p3; q4 = p4; 00040 } 00041 00043 Position q1, q2, q3, q4; 00044 }; 00045 00046 BALL_CREATE(QuadMesh) 00047 00048 00052 QuadMesh(); 00053 00055 QuadMesh(const QuadMesh& mesh); 00056 00058 ~QuadMesh(){} 00059 00060 // Method to get all vertices from a geometric object 00061 virtual void getVertices(vector<Vector3>& vertices) const { vertices = vertex;} 00062 00067 vector<Vector3> vertex; 00068 vector<Vector3> normal; 00069 vector<Quadruple> quad; 00070 }; 00071 00072 } } // namespaces 00073 00074 #endif // BALL_VIEW_PRIMITIV_QUADMESH_H