AGX Dynamics
2.37.3.2
RotationalUnit.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGXPOWERLINE_ROTATIONAL_UNIT_H
18
#define AGXPOWERLINE_ROTATIONAL_UNIT_H
19
20
#include <
agxModel/export.h
>
21
#include <
agxPowerLine/RotationalDimension.h
>
22
#include <
agxPowerLine/Unit.h
>
23
24
namespace
agxPowerLine
25
{
29
class
AGXMODEL_EXPORT
RotationalUnit
:
public
agxPowerLine::Unit
30
{
31
public
:
35
RotationalUnit
();
36
37
38
RotationalUnit
(
agx::RigidBody
* body,
agx::UInt8
slot);
39
43
virtual
agx::Real
getDeliveredTorque()
const
;
44
48
agx::Real
getAngle
()
const
;
49
53
agx::Real
getAngularVelocity()
const
;
54
58
agx::Real
getRPM()
const
;
59
63
void
setAngularVelocityDamping(
agx::Real
damping );
64
68
agxPowerLine::RotationalDimension
* getRotationalDimension()
const
;
69
73
virtual
void
setInertia(
agx::Real
inertia );
74
75
virtual
agx::Real
getInertia()
const
;
76
80
virtual
agx::Vec3
getDirection()
const
;
81
85
static
agx::Real
convertAngularVelocityToRPM(
const
agx::Real
angVel );
86
static
agx::Real
convertRPMtoAngularVelocity(
const
agx::Real
rpm );
87
91
virtual
bool
preUpdate(
agx::Real
timeStep)
override
;
92
95
virtual
bool
postUpdate(
agx::Real
timeStep)
override
;
96
100
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
101
105
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
106
107
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxPowerLine::RotationalUnit
);
108
109
protected
:
110
virtual
~
RotationalUnit
();
111
112
protected
:
113
RotationalDimensionRef
m_rotationalDimension
;
114
};
115
116
typedef
agx::ref_ptr<RotationalUnit>
RotationalUnitRef
;
117
}
118
119
#endif // AGXMODEL_ROTATIONAL_UNIT_H
agxPowerLine::RotationalUnit::m_rotationalDimension
RotationalDimensionRef m_rotationalDimension
Definition:
RotationalUnit.h:113
agxPowerLine::RotationalUnitRef
agx::ref_ptr< RotationalUnit > RotationalUnitRef
Definition:
RotationalUnit.h:116
agxPowerLine::RotationalUnit
A rotational unit has one degree of freedom.
Definition:
RotationalUnit.h:29
agxPowerLine::Unit
Pure virtual class.
Definition:
Unit.h:72
agx::UInt8
uint8_t UInt8
Definition:
Integer.h:38
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system...
Definition:
MotorUnit.h:23
agxPowerLine::RotationalDimension
The rotational has one rotational degree of freedom.
Definition:
RotationalDimension.h:45
agx::ref_ptr< RotationalDimension >
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
export.h
agx::Vec3T< Real >
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
AGXSTREAM_DECLARE_SERIALIZABLE
#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
Unit.h
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
RotationalDimension.h
agx::getAngle
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
Definition:
ConstraintImplementation.h:1419
include
agxPowerLine
RotationalUnit.h
Generated on Fri Apr 12 2024 12:40:26 for AGX Dynamics by
1.8.13