BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: vertex1.h,v 1.10.20.1 2007/03/25 21:25:42 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_VIEW_DATATYPE_VERTEX1_H 00008 #define BALL_VIEW_DATATYPE_VERTEX1_H 00009 00010 #ifndef BALL_COMMON_H 00011 # include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_MATHS_VECTOR3_H 00015 # include <BALL/MATHS/vector3.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00020 namespace VIEW 00021 { 00031 class BALL_VIEW_EXPORT Vertex 00032 { 00033 public: 00034 00035 BALL_CREATE(Vertex) 00036 00037 00040 00045 Vertex(); 00046 00052 Vertex(const Vertex& vertex); 00053 00055 00058 00061 virtual ~Vertex(); 00062 00068 virtual void clear(); 00069 00071 00074 00079 void set(const Vertex& v); 00080 00086 const Vertex& operator = (const Vertex& v); 00087 00092 void swap(Vertex& v); 00093 00095 00098 00102 void setVertex(const Vector3& v); 00103 00107 void setVertex(const float x, const float y, const float z); 00108 00112 Vector3& getVertex(); 00113 00117 const Vector3& getVertex() const; 00118 00122 void getVertex(Vector3& v) const; 00123 00127 void getVertex(float& x, float& y, float& z) const; 00128 00142 void setVertexAddress(const Vector3& v); 00143 00152 void setDefaultVertexAddress(); 00153 00158 Vector3* getVertexAddress() const; 00159 00161 00164 00172 bool isDefaultVertexAddress() const; 00173 00175 00178 00182 virtual bool isValid() const; 00183 00191 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const; 00192 00194 00195 private: 00196 00197 /* vertex */ 00198 Vector3 vertex1_; 00199 00200 /* vertex pointer */ 00201 Vector3* vertex1_ptr_; 00202 }; 00203 00204 00205 # ifndef BALL_NO_INLINE_FUNCTIONS 00206 # include <BALL/VIEW/DATATYPE/vertex1.iC> 00207 # endif 00208 00209 } // namespace VIEW 00210 } // namespace BALL 00211 00212 #endif // BALL_VIEW_DATATYPE_VERTEX1_H