BALL 1.5.0
Loading...
Searching...
No Matches
vertex2.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4// $Id: vertex2.h,v 1.12 2005/12/23 17:02:08 amoll Exp $
5//
6
7#ifndef BALL_VIEW_DATATYPE_VERTEX2_H
8#define BALL_VIEW_DATATYPE_VERTEX2_H
9
10#ifndef BALL_COMMON_H
11# include <BALL/common.h>
12#endif
13
14#ifndef BALL_MATHS_VECTOR3_H
15# include <BALL/MATHS/vector3.h>
16#endif
17
18namespace BALL
19{
20 namespace VIEW
21 {
22
33 {
34 public:
35
37
38
41
42
47
50 Vertex2(const Vertex2& vertex);
51
53
56
59 virtual ~Vertex2();
60
66 virtual void clear();
67
69
72
77 void set(const Vertex2& vertex);
78
84 const Vertex2& operator = (const Vertex2& vertex);
85
88 void swap(Vertex2& vertex);
89
91
94
99 void setVertex1(const Vector3& v);
100
104 void setVertex1(const float x, const float y, const float z);
105
110 Vector3& getVertex1();
111
114 const Vector3& getVertex1() const;
115
121 void getVertex1(Vector3& v) const;
122
126 void getVertex1(float& x, float& y, float& z) const;
127
142 void setVertex1Address(const Vector3& v);
143
151 void setDefaultVertex1Address();
152
157 Vector3* getVertex1Address() const;
158
163 void setVertex2(const Vector3& v);
164
168 void setVertex2(const float x, const float y, const float z);
169
174 Vector3& getVertex2();
175
179 const Vector3& getVertex2() const;
180
187 void getVertex2(Vector3& v) const;
188
192 void getVertex2(float& x, float& y, float& z) const;
193
208 void setVertex2Address(const Vector3& v);
209
219 void setDefaultVertex2Address();
220
225 Vector3* getVertex2Address() const;
226
232 void setVertices(const Vector3& vertex1, const Vector3& vertex2);
233
237 void setVertices
238 (const float vertex1_x,
239 const float vertex1_y,
240 const float vertex1_z,
241 const float vertex2_x,
242 const float vertex2_y,
243 const float vertex2_z);
244
253 void setVertexAddresses(const Vector3& vertex1, const Vector3& vertex2);
254
260 void getVertices(Vector3& vertex1, Vector3& vertex2);
261
266 void getVertices
267 (float& vertex1_x, float& vertex1_y, float& vertex1_z,
268 float& vertex2_x, float& vertex2_y, float& vertex2_z);
269
280 void setDefaultVertexAddresses();
281
283
286
296 bool isDefaultVertex1Address() const;
297
307 bool isDefaultVertex2Address() const;
308
319 bool isDefaultVertexAddresses() const;
320
322
325
329 virtual bool isValid() const;
330
338 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
339
341
342 private:
343
344 /* vertex 1 */
345 Vector3 vertex1_;
346
347 /* vertex 2 */
348 Vector3 vertex2_;
349
350 /* vertex 1 pointer */
351 Vector3* vertex1_ptr_;
352
353 /* vertex 2 pointer */
354 Vector3* vertex2_ptr_;
355 };
356
357
358# ifndef BALL_NO_INLINE_FUNCTIONS
359# include <BALL/VIEW/DATATYPE/vertex2.iC>
360# endif
361
362 } // namespace VIEW
363} // namespace BALL
364
365#endif // BALL_VIEW_DATATYPE_VERTEX2_H
#define BALL_CREATE(name)
Definition create.h:62
STL namespace.
#define BALL_VIEW_EXPORT