AAPlane.h
Go to the documentation of this file.
1#ifndef __GfxTL__AAPLANE_HEADER__
2#define __GfxTL__AAPLANE_HEADER__
3
4namespace GfxTL
5{
6 template <class PointT>
7 class AAPlane
8 {
9 public:
10 typedef PointT PointType;
11 typedef typename PointType::ScalarType ScalarType;
12
13 AAPlane();
14 AAPlane(unsigned int axis, ScalarType value);
15 AAPlane(unsigned int axis, const PointType& p);
16 inline ScalarType operator()(const PointType& p) const;
17 void Set(unsigned int axis, ScalarType value);
18 inline unsigned int Axis() const;
19 inline ScalarType Value() const;
20 void Value(ScalarType v);
21
22 private:
23 unsigned int _axis;
24 ScalarType _value;
25 };
26
27 template <class PointT>
30 {
31 return p[_axis] - _value;
32 }
33
34 template <class PointT>
35 unsigned int
37 {
38 return _axis;
39 }
40
41 template <class PointT>
44 {
45 return _value;
46 }
47
48 template <class PointT>
49 void
51 {
52 _value = v;
53 }
54}; // namespace GfxTL
55
56#include "AAPlane.hpp"
57
58#endif
PointType::ScalarType ScalarType
Definition AAPlane.h:11
void Set(unsigned int axis, ScalarType value)
Definition AAPlane.hpp:21
ScalarType Value() const
Definition AAPlane.h:43
PointT PointType
Definition AAPlane.h:10
unsigned int Axis() const
Definition AAPlane.h:36
ScalarType operator()(const PointType &p) const
Definition AAPlane.h:29
Definition AABox.h:10