Itasca C++ Interface
Loading...
Searching...
No Matches
iwall.h
Go to the documentation of this file.
1#pragma once
7#include "base/src/farray.h"
8
9namespace itasca {
10 class IThing;
11 class IGroup;
12}
13namespace itascaxd {
14 class IPiece;
15 class IPieceMechanical;
16 class IBody;
17 class IContact;
18}
19
20namespace pfc {
21 using namespace itasca;
22 using namespace itascaxd;
23
35 class IWall {
36 public:
38 inline static const TType type_ = 0x4cd817c3;
39
41 virtual IThing * getIThing() = 0;
43 virtual const IThing * getIThing() const = 0;
45 virtual IWall * getNext() = 0;
47 virtual const IWall * getNext() const = 0;
49 virtual IPiece * getFirstIPiece() = 0;
51 virtual const IPiece * getFirstIPiece() const = 0;
55 virtual const IPieceMechanical *getFirstIPieceMechanical() const = 0;
57 virtual IBody * getIBody() = 0;
59 virtual const IBody * getIBody() const = 0;
61 virtual bool isFWall() const = 0;
63 //virtual QStringList getAllPieceProperties() const = 0;
64
66 virtual DVect getPosition() const = 0;
68 virtual DVect getCentRot() const = 0;
70 virtual DVect getVelocity() const = 0;
72 virtual DAVect getAngVelocity() const = 0;
74 virtual DVect getDisplacement() const = 0;
75#ifdef TWOD
77 virtual double getAngDisplacement() const = 0;
78#endif
80 virtual DVect getForce() const = 0;
82 virtual DAVect getMoment() const = 0;
84 virtual Quat getOrient() const=0;
85
87 virtual void setPosition(const DVect &p) = 0;
89 virtual void setCentRot(const DVect &p) = 0;
91 virtual void setVelocity(const DVect &p) = 0;
93 virtual void setAngVelocity(const DAVect &p) = 0;
95 virtual void setDisplacement(const DVect &v) = 0;
96#ifdef TWOD
98 virtual void setAngDisplacement(const double &v) = 0;
99#endif
101 virtual void setOrient(const Quat &q)=0;
102#ifdef THREED
104 virtual void setOrientFromEuler(const DVect3 &d)=0;
105#endif
106
109 virtual void rotate(const DVect &rotp,const DVect &axis,const double &w,bool update=true,bool noThrow = false) = 0;
110
112 virtual bool setProperty(const QString &name,const QVariant &v)=0;
114 virtual void getContactList(FArray<IContact *> *ret,const TType &type=0,const IPiece *p2=0)=0;
116 virtual void getContactList(FArray<const IContact *> *ret,const TType &type=0,const IPiece *p2=0) const=0;
118 virtual uint64 getContactCount(bool active,const TType &type=0,bool domainToo = false) const=0;
120 virtual double getServoGainFactor() const =0;
122 virtual double getServoGain() const =0;
124 virtual double getServoVmax() const =0;
126 virtual DVect getServoForce() const =0;
128 virtual bool getServoActive() const =0;
130 virtual int getServoGainUpdate() const =0;
132 virtual void setServoGainFactor(const double &d) =0;
134 virtual void setServoGain(const double &d) =0;
136 virtual void setServoVmax(const double &d) =0;
138 virtual void setServoForce(const DVect &f) =0;
140 virtual void setServoActive(bool b) =0;
142 virtual void setServoGainUpdate(int i) =0;
143 };
144} // namespace pfc
145// EoF
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
3D quaternion utility class.
Definition quat.h:108
Base class for items that will be stored in containers.
Definition ithing.h:30
Definition ibody.h:20
Definition ipiece.h:15
Definition ipiecemechanical.h:11
Interface for a generic wall. This is the interface for a generic wall. Specific wall types must deri...
Definition iwall.h:35
virtual const IThing * getIThing() const =0
Return a const IThing interface for this object.
virtual bool isFWall() const =0
Boolean to denote whether or not this is a faceted wall.
virtual IPieceMechanical * getFirstIPieceMechanical()=0
Return the first IPieceMechanical in this wall.
virtual const IWall * getNext() const =0
Return the next const IWall object in the global list, or 0 if it is the last set.
virtual void setDisplacement(const DVect &v)=0
Set the wall accumulated displacement to v.
virtual IWall * getNext()=0
Return the next IWall object in the global list, or 0 if it is the last set.
virtual DVect getCentRot() const =0
Return the center of rotation about which a wall can rotate.
virtual double getServoGainFactor() const =0
Get wall servo gain relaxation factor.
virtual void setOrient(const Quat &q)=0
Set the orientation.
virtual DAVect getAngVelocity() const =0
Return the angular velocity of the wall.
virtual void getContactList(FArray< IContact * > *ret, const TType &type=0, const IPiece *p2=0)=0
Return a list of IContacts.
virtual IThing * getIThing()=0
Return an IThing interface for this object.
virtual bool setProperty(const QString &name, const QVariant &v)=0
Set the properties in prop to v for all PieceMechanicals that are in this wall.
virtual DVect getServoForce() const =0
Get wall servo force.
virtual const IPiece * getFirstIPiece() const =0
Return the first const IPiece in this wall.
virtual bool getServoActive() const =0
Get wall servo activity status.
virtual DVect getVelocity() const =0
Return the translational velocity of the wall.
virtual void setServoForce(const DVect &f)=0
Set servo force.
virtual DVect getDisplacement() const =0
Return the accumulated displacement of the point corresponding to position.
virtual void setServoActive(bool b)=0
Set servo active status.
virtual void setPosition(const DVect &p)=0
Set the wall position to p.
virtual IPiece * getFirstIPiece()=0
Return the first IPiece in this wall.
virtual DVect getPosition() const =0
Return a unique QStringList for each wall.
virtual const IBody * getIBody() const =0
Return a const IBody pointer.
virtual DAVect getMoment() const =0
Return the moment of all contacts with with wall.
virtual void setVelocity(const DVect &p)=0
Set the wall translational velocity to p.
virtual void setAngVelocity(const DAVect &p)=0
Set the wall angular velocity to p.
virtual double getServoVmax() const =0
Get wall servo cap velocity.
virtual void setServoGainFactor(const double &d)=0
Set servo gain relaxation factor.
virtual DVect getForce() const =0
Return the sum of all contact forces to which the wall does not react.
static const TType type_
TType for type casting.
Definition iwall.h:38
virtual void getContactList(FArray< const IContact * > *ret, const TType &type=0, const IPiece *p2=0) const =0
Return a list of const IContacts.
virtual void rotate(const DVect &rotp, const DVect &axis, const double &w, bool update=true, bool noThrow=false)=0
virtual IBody * getIBody()=0
Return an IBody pointer.
virtual Quat getOrient() const =0
Return the current orientation.
virtual const IPieceMechanical * getFirstIPieceMechanical() const =0
Return the first const IPieceMechanical in this wall.
virtual void setCentRot(const DVect &p)=0
Set the wall center of rotation to p.
virtual int getServoGainUpdate() const =0
Get wall servo gain update interval.
virtual void setServoGainUpdate(int i)=0
Set servo gain update interval.
virtual double getServoGain() const =0
Get wall servo gain.
virtual uint64 getContactCount(bool active, const TType &type=0, bool domainToo=false) const =0
Return the number of contacts.
virtual void setServoGain(const double &d)=0
Set servo gain.
virtual void setServoVmax(const double &d)=0
Set servo cap velocity.
An array class that attempts to minimize unnecessary heap access.
uint32 TType
class type indicator
Definition basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
DAVect3 DAVect
Angular vector of doubles, either 2D or 3D.
Definition dim.h:162
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4
PFC namespace.
Definition iballfluid.h:15