BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool cappingEnabled() const
Definition: clippingPlane.h:86
#define BALL_CREATE(name)
Definition: create.h:62
const Vector3 & getPoint() const
Definition: clippingPlane.h:74
void setHidden(bool hidden)
Definition: clippingPlane.h:68
void setPoint(const Vector3 &v)
Definition: clippingPlane.h:77
const Vector3 & getNormal() const
Definition: clippingPlane.h:53
void setNormal(const Vector3 &normal)
Definition: clippingPlane.h:56
HashSet< const Representation * > reps_
Definition: clippingPlane.h:93
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
static ColorRGBA & getCappingColor()
Definition: clippingPlane.h:83
BALL_EXPORT bool operator==(const String &s1, const String &s2)
void setActive(bool state)
Definition: clippingPlane.h:62
void setCappingEnabled(bool state)
Definition: clippingPlane.h:89
static ColorRGBA capping_color_
Definition: clippingPlane.h:99
HashSet< const Representation * > & getRepresentations()
Definition: clippingPlane.h:50