Itasca C++ Interface
Loading...
Searching...
No Matches
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
13
14
15namespace itascaxd {
17
21 class IRangeElementSphere { // name = "sphere"
22 public:
24 inline static const TType type_ = 0x4c815bad;
25
26 shared::Signal<const DVect &> centerChanged;
27 shared::Signal<double> radius1Changed;
28 shared::Signal<double> radius2Changed;
29
31 virtual DVect getCenter() const=0;
33 virtual double getRadius1() const=0;
35 virtual double getRadius2() const=0;
37 virtual bool isAnnulus() const=0;
39 virtual void setCenter(const DVect &)=0;
41 virtual void setRadius1(const double &d)=0;
43 virtual void setRadius2(const double &d)=0;
46 };
47
49
52#ifdef THREED
53 class IRangeElementCylinder { // name = "cylinder"
54 public:
56 inline static const TType type_ = 0x4c815baf;
57
58 shared::Signal<const DVect &> beginChanged;
59 shared::Signal<const DVect &> endChanged;
60 shared::Signal<double> radius1Changed;
61 shared::Signal<double> radius2Changed;
62
64 virtual DVect getBegin() const=0;
66 virtual DVect getEnd() const=0;
68 virtual double getRadius1() const=0;
70 virtual double getRadius2() const=0;
72 virtual void setBegin(const DVect &v)=0;
74 virtual void setEnd(const DVect &v)=0;
76 virtual void setRadius(const double &d1,const double &d2)=0;
78 virtual IRangeElement *getIRangeElement()=0;
79 };
80#endif
82
85 class IRangeElementPosition { // name = "box"
86 public:
88 inline static const TType type_ = 0x57222304;
89
90 shared::Signal<const DVect &> lowerBoundChanged;
91 shared::Signal<const DVect &> upperBoundChanged;
92 shared::Signal<const DVect &> toleranceChanged;
93 shared::Signal<const DVect &> centerChanged;
94
96 virtual DVect getLowerBound() const=0;
98 virtual DVect getUpperBound() const=0;
100 virtual DVect getTolerance() const=0;
102 virtual DVect getCenter() const=0;
104 virtual void setLowerBound(const DVect &v)=0;
106 virtual void setUpperBound(const DVect &v)=0;
108 virtual void setTolerance(const DVect &v)=0;
110 virtual void setCenter(const DVect &v)=0;
113 };
114
117 class IRangeElementPlane { // name = "plane"
118 public:
120 inline static const TType type_ = 0x4c815bb1;
122 enum Kind {
125 kDist=2
126 };
127
128 shared::Signal<const DVect &> normalChanged;
129 shared::Signal<const DVect &> originChanged;
130 shared::Signal<Kind> kindChanged;
131 shared::Signal<double> distanceChanged;
132
134 virtual Orientation getOrientation() const=0;
136 virtual DVect getOrigin() const=0;
138 virtual Kind getKind() const=0;
140 virtual double getDistance() const=0;
142 virtual void setOrientation(const Orientation &o)=0;
144 virtual void setOrigin(const DVect &o)=0;
146 virtual void setKind(Kind k)=0;
148 virtual void setDistance(const double &d)=0;
149 };
150
152
156 class IRangeElementNamed { // name = "named"
157 public:
159 inline static const TType type_ = 0x4c815bb3;
160
161 shared::Signal<const string &> nameChanged;
162
164 virtual string getFilterName() const=0;
166 virtual void setFilterName(const string &s)=0;
167 };
168} // namespace itascaxd
169// EoF
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:18
Interface to a Range Element that is actually a named filter.
Definition irangeelementtype.h:156
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition irangeelementtype.h:159
virtual string getFilterName() const =0
Returns the name of the named filter element.
virtual void setFilterName(const string &s)=0
Sets 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:117
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:122
@ kAbove
Definition irangeelementtype.h:123
@ kDist
Definition irangeelementtype.h:125
@ kBelow
Definition irangeelementtype.h:124
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:120
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:85
virtual DVect getCenter() const =0
Returns the center.
virtual DVect getUpperBound() const =0
Returns the upper bound.
virtual IRangeElement * getIRangeElement()=0
Returns a pointer to the IRangeElement object.
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:88
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:21
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition irangeelementtype.h:24
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 DVect getCenter() const =0
Returns the sphere center, see setCenter.
virtual void setRadius2(const double &d)=0
Sets the spherical (outer) radius.
virtual IRangeElement * getIRangeElement()=0
Returns a pointer to the IRangeElement object.
DIM - Provides code portability between 2D and 3D codes.
uint32 TType
class type indicator
Definition basedef.h:47
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:156
Interface to a filter element, which is a member of a IRange.
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:6