AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
RotationalUnit.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxModel/export.h>
21#include <agxPowerLine/Unit.h>
22
23namespace agxPowerLine
24{
29 {
30 public:
35
36
38
43
48
53
58
63
68
72 virtual void setInertia( agx::Real inertia );
73
74 virtual agx::Real getInertia() const;
75
79 virtual agx::Vec3 getDirection() const;
80
86
90 virtual bool preUpdate(agx::Real timeStep) override;
91
94 virtual bool postUpdate(agx::Real timeStep) override;
95
99 virtual bool store(agxStream::StorageStream& str) const override;
100
104 virtual bool restore(agxStream::StorageStream& str) override;
105
107
108 protected:
110
111 protected:
113 };
114
116}
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
The rotational has one rotational degree of freedom.
A rotational unit has one degree of freedom.
virtual agx::Vec3 getDirection() const
returns a vector in world coordinates that defines the rotational axis of the rotational unit.
virtual bool postUpdate(agx::Real timeStep) override
virtual agx::Real getDeliveredTorque() const
returns the amount of torque delivered from the rotational dimension
virtual bool store(agxStream::StorageStream &str) const override
Stores internal data into stream.
agxPowerLine::RotationalDimension * getRotationalDimension() const
returns a pointer to the rotational dimension
static agx::Real convertRPMtoAngularVelocity(const agx::Real rpm)
RotationalUnit()
Create a rotational unit.
static agx::Real convertAngularVelocityToRPM(const agx::Real angVel)
Convert between m/s and rpm.
RotationalUnit(agx::RigidBody *body, agx::UInt8 slot)
agx::Real getRPM() const
returns the number of revolutions per minute
virtual bool preUpdate(agx::Real timeStep) override
virtual bool restore(agxStream::StorageStream &str) override
Restores internal data from stream.
virtual void setInertia(agx::Real inertia)
set the inertia for the rotational dimension of the rotational unit.
void setAngularVelocityDamping(agx::Real damping)
set the angular velocity damping around the local axis (direction)
RotationalDimensionRef m_rotationalDimension
agx::Real getAngularVelocity() const
returns the number of radians per second
agx::Real getAngle() const
virtual agx::Real getInertia() const
Pure virtual class.
Definition: Unit.h:72
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
agx::ref_ptr< RotationalUnit > RotationalUnitRef
double Real
Definition: Real.h:41
uint8_t UInt8
Definition: Integer.h:30