18 #ifndef AGX_POWERLINE_PHYSICAL_DIMENSION_STATE_H 19 #define AGX_POWERLINE_PHYSICAL_DIMENSION_STATE_H 40 class PhysicalDimension;
75 virtual void setValue(
agx::Real value) = 0;
77 virtual agx::Real getGradient()
const = 0;
78 virtual void setGradient(
agx::Real value) = 0;
80 virtual agx::Real getSecondGradient()
const = 0;
82 virtual agx::Vec3 getLocalDirection()
const = 0;
83 virtual agx::Vec3 getWorldDirection()
const = 0;
84 virtual agx::Vec3 getDirection()
const = 0;
87 virtual agx::Real getMassProperty()
const = 0;
88 virtual bool setMassProperty(
agx::Real massProperty) = 0;
92 virtual void setVelocityDamping(
float damping) = 0;
93 virtual float getVelocityDamping() = 0;
99 virtual bool isExternalBody()
const = 0;
104 bool getAllowsPacking()
const;
112 virtual void reserveBody() = 0;
141 virtual void postUpdate(
agx::Real timeStep) = 0;
162 void disallowPacking();
176 bool m_allowsPacking;
209 template<
typename DimensionType>
217 virtual agx::Real getValue()
const override;
219 virtual void setValue(
agx::Real value)
override;
221 virtual agx::Real getGradient()
const override;
223 virtual void setGradient(
agx::Real gradient)
override;
225 virtual agx::Real getSecondGradient()
const override;
227 virtual agx::Vec3 getLocalDirection()
const override;
229 virtual agx::Vec3 getWorldDirection()
const override;
231 virtual agx::Vec3 getDirection()
const override;
233 virtual agx::Real getMassProperty()
const override;
235 virtual bool setMassProperty(
agx::Real massProperty)
override;
237 virtual void addLoad(
agx::Real load)
override;
239 virtual void setVelocityDamping(
float damping)
override;
241 virtual float getVelocityDamping()
override;
245 virtual bool isExternalBody()
const override;
269 virtual void reserveBody()
override;
297 virtual void postUpdate(
agx::Real timeStep)
override;
299 virtual agxStream::StorageAgent* getStorageAgent()
const override;
300 static const char* getConstructClassId();
302 virtual const char* getClassName()
const override;
325 DimensionType m_storage;
339 virtual void setLocalDirection(
const agx::Vec3& direction) = 0;
340 virtual void setWorldDirection(
const agx::Vec3& direction) = 0;
353 template<
typename DimensionType>
370 virtual agx::Real getValue()
const override;
372 virtual void setValue(
agx::Real value)
override;
374 virtual agx::Real getGradient()
const override;
376 virtual void setGradient(
agx::Real gradient)
override;
378 virtual agx::Real getSecondGradient()
const override;
380 virtual agx::Vec3 getLocalDirection()
const override;
382 virtual void setLocalDirection(
const agx::Vec3& direction)
override;
384 virtual agx::Vec3 getWorldDirection()
const override;
386 virtual void setWorldDirection(
const agx::Vec3& direction)
override;
388 virtual agx::Vec3 getDirection()
const override;
390 virtual agx::Real getMassProperty()
const override;
392 virtual bool setMassProperty(
agx::Real massProperty)
override;
394 virtual void addLoad(
agx::Real load)
override;
396 virtual void setVelocityDamping(
float damping)
override;
397 virtual float getVelocityDamping()
override;
401 virtual bool isExternalBody()
const override;
403 virtual void reserveBody()
override;
412 virtual void postUpdate(
agx::Real )
override;
420 virtual agxStream::StorageAgent* getStorageAgent()
const override;
421 static const char* getConstructClassId();
423 virtual const char* getClassName()
const override;
434 void calculateMergedBodyJacobian(
440 void printInvalidDirectionReference()
const;
445 DimensionType m_storage;
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
The SlotMapper is reponsible for mapping one dimensional dimension states to slots in the RigidBodies...
#define AGX_DECLARE_POINTER_TYPES(type)
agxPowerLine contains a collection of connected components that transport power across a system...
Base class providing referencing counted objects.
Structure holding several "normal" rigid bodies.
Templated three dimensional dimension state.
A DimensionState is the data carrier of a PhysicalDimension.
Templated one dimensional dimension state.
The rigid body class, combining a geometric model and a frame of reference.
Abstract base class for storing/restoring a line/drums with version control.
DirectionReference
The DirectionReference specifies what the direction attribute of a DimensionState is relative to...
The object defining a frame of reference and providing transformations operations.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for writing serialized data in binary format to a stream.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation...
Base class for the two one dimensional dimension state classes.
Base class for the two three dimensional dimension state classes.