Itasca C++ Interface
irangeelementtype.h
Go to the documentation of this file.
1 #pragma once
2 
8 // A short description precedes each, and generally the access functions
9 // are self-explanatory.
10 
11 #include "base/src/baseqt.h"
12 #include "module/interface/dim.h"
14 
15 
16 namespace itascaxd {
18 
22  class IRangeElementSphere { // name = "sphere"
23  public:
25  inline static const TType type_ = 0x4c815bad;
26 
27  shared::Signal<const DVect &> centerChanged;
28  shared::Signal<double> radius1Changed;
29  shared::Signal<double> radius2Changed;
30 
32  virtual DVect getCenter() const=0;
34  virtual double getRadius1() const=0;
36  virtual double getRadius2() const=0;
38  virtual bool isAnnulus() const=0;
40  virtual void setCenter(const DVect &)=0;
42  virtual void setRadius1(const double &d)=0;
44  virtual void setRadius2(const double &d)=0;
47  };
48 
50 
53 #ifdef THREED
54  class IRangeElementCylinder { // name = "cylinder"
55  public:
57  inline static const TType type_ = 0x4c815baf;
58 
59  shared::Signal<const DVect &> beginChanged;
60  shared::Signal<const DVect &> endChanged;
61  shared::Signal<double> radius1Changed;
62  shared::Signal<double> radius2Changed;
63 
65  virtual DVect getBegin() const=0;
67  virtual DVect getEnd() const=0;
69  virtual double getRadius1() const=0;
71  virtual double getRadius2() const=0;
73  virtual void setBegin(const DVect &v)=0;
75  virtual void setEnd(const DVect &v)=0;
77  virtual void setRadius(const double &d1,const double &d2)=0;
79  virtual IRangeElement *getIRangeElement()=0;
80  };
81 #endif
83 
86  class IRangeElementPosition { // name = "box"
87  public:
89  inline static const TType type_ = 0x57222304;
90 
91  shared::Signal<const DVect &> lowerBoundChanged;
92  shared::Signal<const DVect &> upperBoundChanged;
93  shared::Signal<const DVect &> toleranceChanged;
94  shared::Signal<const DVect &> centerChanged;
95 
97  virtual DVect getLowerBound() const=0;
99  virtual DVect getUpperBound() const=0;
101  virtual DVect getTolerance() const=0;
103  virtual DVect getCenter() const=0;
105  virtual void setLowerBound(const DVect &v)=0;
107  virtual void setUpperBound(const DVect &v)=0;
109  virtual void setTolerance(const DVect &v)=0;
111  virtual void setCenter(const DVect &v)=0;
114  };
115 
118  class IRangeElementPlane { // name = "plane"
119  public:
121  inline static const TType type_ = 0x4c815bb1;
123  enum Kind {
124  kAbove=0,
125  kBelow=1,
126  kDist=2
127  };
128 
129  shared::Signal<const DVect &> normalChanged;
130  shared::Signal<const DVect &> originChanged;
131  shared::Signal<Kind> kindChanged;
132  shared::Signal<double> distanceChanged;
133 
135  virtual Orientation getOrientation() const=0;
137  virtual DVect getOrigin() const=0;
139  virtual Kind getKind() const=0;
141  virtual double getDistance() const=0;
143  virtual void setOrientation(const Orientation &o)=0;
145  virtual void setOrigin(const DVect &o)=0;
147  virtual void setKind(Kind k)=0;
149  virtual void setDistance(const double &d)=0;
150  };
151 
153 
157  class IRangeElementNamed { // name = "named"
158  public:
160  inline static const TType type_ = 0x4c815bb3;
161 
162  shared::Signal<const QString &> nameChanged;
163 
165  virtual QString getFilterName() const=0;
167  virtual void setFilterName(const QString &s)=0;
168  };
169 } // namespace itascaxd
170 // EoF
All default base headers if Qt is being used.
Class for storing an "orientation", or a direction in 2D or 3D space.
Definition: orientation.h:99
Interface to a filter element, which is a member of a IRange..
Definition: irangeelement.h:19
Interface to a Range Element that is actually a named filter.
Definition: irangeelementtype.h:157
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: irangeelementtype.h:160
virtual void setFilterName(const QString &s)=0
Sets the name of the named filter element.
virtual QString getFilterName() const =0
Returns the name of the named filter element.
Interface to a RangeElement of a plane in space, where you want objects above, below,...
Definition: irangeelementtype.h:118
virtual Kind getKind() const =0
Returns if the objects should be above, below, or within a certain distance of the filter,...
virtual Orientation getOrientation() const =0
Returns the plane Orientation, see setOrientation()
Kind
Possible object location.
Definition: irangeelementtype.h:123
@ kAbove
Definition: irangeelementtype.h:124
@ kDist
Definition: irangeelementtype.h:126
@ kBelow
Definition: irangeelementtype.h:125
virtual DVect getOrigin() const =0
Returns the plane origin, see setOrigin()
virtual double getDistance() const =0
Returns the object distance from the filter.
virtual void setOrigin(const DVect &o)=0
Sets the plane origin.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: irangeelementtype.h:121
virtual void setDistance(const double &d)=0
Sets the object distance to the filter.
virtual void setOrientation(const Orientation &o)=0
Sets the plane Orientation.
virtual void setKind(Kind k)=0
Sets where the object will be located related to plane, above, below, within a given distance,...
A filter element specified as a geometric region inside a capped cylinder, defined by a segment [begi...
Definition: irangeelementtype.h:86
virtual DVect getCenter() const =0
Returns the center.
virtual IRangeElement * getIRangeElement()=0
Returns a pointer to the IRangeElement object.
virtual DVect getUpperBound() const =0
Returns the upper bound.
virtual void setUpperBound(const DVect &v)=0
Sets the upper bound.
virtual DVect getLowerBound() const =0
Returns the lower bound.
virtual DVect getTolerance() const =0
Returns the tolerance.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: irangeelementtype.h:89
virtual void setLowerBound(const DVect &v)=0
Sets the lower bound.
virtual void setTolerance(const DVect &v)=0
Sets the tolernace.
virtual void setCenter(const DVect &v)=0
Sets the center.
A filter element described as a sphere in space.
Definition: irangeelementtype.h:22
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: irangeelementtype.h:25
virtual double getRadius1() const =0
Returns the spherical annulus inner radius, see setRadius1()
virtual void setRadius1(const double &d)=0
Sets the spherical annulus inner radius.
virtual double getRadius2() const =0
Returns the spherical (outer) radius, , see setRadius2()
virtual void setCenter(const DVect &)=0
Sets the sphere center.
virtual bool isAnnulus() const =0
Returns true if object represents an spherical annulus, , see setRadius1()
virtual IRangeElement * getIRangeElement()=0
Returns a pointer to the IRangeElement object.
virtual DVect getCenter() const =0
Returns the sphere center, see setCenter.
virtual void setRadius2(const double &d)=0
Sets the spherical (outer) radius.
DIM - Provides code portability between 2D and 3D codes.
uint32 TType
class type indicator
Definition: basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition: dim.h:150
Interface to a filter element, which is a member of a IRange.
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4