BICO 1.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Pages
pointweightmodifier.h
Go to the documentation of this file.
1 #ifndef POINTWEIGHTMODIFIER_H
2 #define POINTWEIGHTMODIFIER_H
3
4 #include "../base/weightmodifier.h"
5 #include "../point/point.h"
6
7 namespace CluE
8 {
9
15 class PointWeightModifier : public WeightModifier<Point>
16 {
17 public:
18 virtual PointWeightModifier* clone() const;
19
20 virtual double getWeight(Point&);
21 virtual void setWeight(Point&, double);
22 };
23
24 inline
25 PointWeightModifier* PointWeightModifier::clone() const
26 {
27 return new PointWeightModifier(*this);
28 }
29
30 inline
31 double PointWeightModifier::getWeight(Point& p)
32 {
33 return p.getWeight();
34 }
35
36 inline
37 void PointWeightModifier::setWeight(Point& p, double w)
38 {
39 p.setWeight(w);
40 }
41
42 }
43
44 #endif
CluE::PointWeightModifier::clone
virtual PointWeightModifier * clone() const
make an exact copy of this object The clone method creates a copy of this object and returns a pointe...
Definition: pointweightmodifier.h:25
CluE::PointWeightModifier
Modifies the weight of a Point.
Definition: pointweightmodifier.h:15
CluE::PointWeightModifier::setWeight
virtual void setWeight(Point &, double)
Definition: pointweightmodifier.h:37
CluE::WeightModifier
Abstract base class to modify the weight of weighted objects.
Definition: weightmodifier.h:12
CluE::PointWeightModifier::getWeight
virtual double getWeight(Point &)
Definition: pointweightmodifier.h:31
CluE::Point
Weighted point of arbitrary dimension.
Definition: point.h:17
CluE::Point::getWeight
virtual double getWeight() const
Definition: point.h:92
CluE::Point::setWeight
virtual void setWeight(double w)
Definition: point.h:97