BALL  1.5.0
clippingPlane.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: clippingPlane.h,v 1.3.18.1 2007/03/25 21:25:58 oliver Exp $
5 //
6 
7 #ifndef BALL_VIEW_KERNEL_CLIPPING_PLANE_H
8 #define BALL_VIEW_KERNEL_CLIPPING_PLANE_H
9 
10 #ifndef BALL_DATATYPE_HASHSET_H
11 # include <BALL/DATATYPE/hashSet.h>
12 #endif
13 
14 #ifndef BALL_VIEW_KERNEL_REPRESENTATION_H
16 #endif
17 
18 namespace BALL
19 {
20  namespace VIEW
21  {
26  {
27  public:
28 
30 
31  ClippingPlane();
32 
34  ClippingPlane(const ClippingPlane& plane);
35 
38  virtual ~ClippingPlane();
39 
41  const ClippingPlane& operator = (const ClippingPlane& plane);
42 
44  void clear();
45 
47  bool operator == (const ClippingPlane& plane) const;
48 
51 
53  const Vector3& getNormal() const { return normal_;}
54 
56  void setNormal(const Vector3& normal) { normal_ = normal;}
57 
59  bool isActive() const { return active_;}
60 
62  void setActive(bool state) { active_ = state;}
63 
65  bool isHidden() const { return hidden_;}
66 
68  void setHidden(bool hidden) { hidden_ = hidden;}
69 
71  float getDistance() const;
72 
74  const Vector3& getPoint() const { return point_;}
75 
77  void setPoint(const Vector3& v) { point_ = v;}
78 
80  void flip() { normal_ = -normal_;}
81 
83  static ColorRGBA& getCappingColor() { return capping_color_;}
84 
86  bool cappingEnabled() const { return cap_;}
87 
89  void setCappingEnabled(bool state) { cap_ = state;}
90 
91  protected:
92 
96  bool active_;
97  bool hidden_;
98  bool cap_;
100  };
101 
102  } // namespace VIEW
103 } // namespace BALL
104 
105 #endif // BALL_VIEW_KERNEL_CLIPPING_PLANE_H
BALL::VIEW::ClippingPlane::isHidden
bool isHidden() const
Definition: clippingPlane.h:65
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::ClippingPlane::active_
bool active_
Definition: clippingPlane.h:96
BALL::HashSet
Definition: hashSet.h:45
BALL::VIEW::ClippingPlane::setActive
void setActive(bool state)
Definition: clippingPlane.h:62
BALL::TVector3< float >
BALL::VIEW::ClippingPlane::getNormal
const Vector3 & getNormal() const
Definition: clippingPlane.h:53
BALL::VIEW::ClippingPlane::setPoint
void setPoint(const Vector3 &v)
Definition: clippingPlane.h:77
BALL::VIEW::ClippingPlane::getRepresentations
HashSet< const Representation * > & getRepresentations()
Definition: clippingPlane.h:50
representation.h
BALL::VIEW::ClippingPlane::normal_
Vector3 normal_
Definition: clippingPlane.h:94
BALL
Definition: constants.h:12
BALL::VIEW::ClippingPlane::setCappingEnabled
void setCappingEnabled(bool state)
Definition: clippingPlane.h:89
BALL::VIEW::ClippingPlane::flip
void flip()
Definition: clippingPlane.h:80
BALL::VIEW::ClippingPlane::setNormal
void setNormal(const Vector3 &normal)
Definition: clippingPlane.h:56
BALL::VIEW::ColorRGBA
Definition: colorRGBA.h:31
BALL::VIEW::ClippingPlane::capping_color_
static ColorRGBA capping_color_
Definition: clippingPlane.h:99
hashSet.h
BALL::VIEW::ClippingPlane::point_
Vector3 point_
Definition: clippingPlane.h:95
BALL::VIEW::ClippingPlane::cap_
bool cap_
Definition: clippingPlane.h:98
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::VIEW::ClippingPlane::hidden_
bool hidden_
Definition: clippingPlane.h:97
BALL::VIEW::ClippingPlane::cappingEnabled
bool cappingEnabled() const
Definition: clippingPlane.h:86
BALL::VIEW::ClippingPlane::reps_
HashSet< const Representation * > reps_
Definition: clippingPlane.h:93
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::VIEW::ClippingPlane::setHidden
void setHidden(bool hidden)
Definition: clippingPlane.h:68
BALL::VIEW::ClippingPlane::getCappingColor
static ColorRGBA & getCappingColor()
Definition: clippingPlane.h:83
BALL::VIEW::ClippingPlane
Definition: clippingPlane.h:25
BALL::VIEW::ClippingPlane::isActive
bool isActive() const
Definition: clippingPlane.h:59
BALL::VIEW::ClippingPlane::getPoint
const Vector3 & getPoint() const
Definition: clippingPlane.h:74