AGXDynamics
2.31.1.0
Actuator.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. 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
18
#ifndef AGXPOWERLINE_ACTUATOR_H
19
#define AGXPOWERLINE_ACTUATOR_H
20
21
#include <
agxPowerLine/SubGraph.h
>
22
#include <
agxPowerLine/ActuatorUnit.h
>
23
#include <
agxPowerLine/Sides.h
>
24
#include <
agxPowerLine/Unit.h
>
25
26
namespace
agx
27
{
28
class
RigidBody;
29
}
30
31
namespace
agxPowerLine
32
{
33
class
PhysicalDimension;
34
class
Connector;
35
36
namespace
detail
37
{
38
class
AbstractDimensionState3Dof
;
39
}
40
}
41
42
namespace
agxPowerLine
43
{
44
AGX_DECLARE_POINTER_TYPES
(
Actuator
);
45
49
class
AGXMODEL_EXPORT
Actuator
:
public
agxPowerLine::Unit
50
{
51
public
:
52
53
Actuator
(
agx::Constraint
* constraint );
54
55
const
agx::Constraint
* getConstraint()
const
;
56
agx::Constraint
* getConstraint();
57
58
virtual
agx::Real
calculateRelativeGradient()
const
= 0;
59
virtual
agx::Real
calculateRelativeValue()
const
= 0;
60
61
virtual
agx::Vec3
calculateLocalDirection(
Side
side,
int
dimensionType)
const
= 0;
62
virtual
agx::Vec3
calculateWorldDirection(
Side
side,
agxPowerLine::PhysicalDimension::Type
dimensionType)
const
= 0;
63
64
virtual
const
agx::RigidBody
* getRigidBody(
Side
side)
const
;
65
virtual
agx::RigidBody
* getRigidBody(
Side
side);
66
67
agxPowerLine::PhysicalDimension
* getPhysicalDimension(
Side
side,
int
dimensionType);
68
const
agxPowerLine::PhysicalDimension
* getPhysicalDimension(
Side
side,
int
dimensionType)
const
;
69
70
agxPowerLine::detail::Translational3DofState
* getTranslationalState(
Side
side);
71
agxPowerLine::detail::Rotational3DofState
* getRotationalState(
Side
side);
72
73
agxPowerLine::detail::AbstractDimensionState3Dof
* getDimensionState(
74
agxPowerLine::Side
side,
75
agxPowerLine::PhysicalDimension::Type
dimensionType);
76
77
bool
reverseOrderRelativeConstraint()
const
;
78
79
virtual
agxPowerLine::DimensionAndSide
getConnectableDimension(
80
agxPowerLine::PhysicalDimension::Type
type
,
agxPowerLine::Side
side)
override
;
81
82
83
agxPowerLine::ActuatorBodyUnit
* getActuatorBodyUnit(
Side
side);
84
const
agxPowerLine::ActuatorBodyUnit
* getActuatorBodyUnit(
Side
side)
const
;
85
86
//* Vectors in world coordinates to calculate the Jacobian */
87
virtual
agx::Vec3
getDir1( )
const
= 0;
88
virtual
agx::Vec3
getDir2( )
const
= 0;
89
virtual
agx::Vec3
getCmToAnchorPos1()
const
= 0;
90
virtual
agx::Vec3
getCmToAnchorPos2()
const
= 0;
91
virtual
agx::Vec3
getSeparation()
const
= 0;
92
virtual
bool
removeNotification(
agxUtil::ConstraintHolder
* holder,
agxSDK::Simulation
* simulation)
override
;
93
94
98
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
99
100
using
agxPowerLine::SubGraph::store
;
101
105
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
106
107
using
agxPowerLine::SubGraph::restore
;
108
109
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
(agxMode::Actuator);
110
virtual
void
store(
agxStream::OutputArchive
&
out
)
const override
;
111
virtual
void
restore(
agxStream::InputArchive
&
in
)
override
;
112
113
protected
:
114
virtual
~
Actuator
();
115
116
Actuator
();
117
118
protected
:
119
bool
m_enabled
;
120
121
agx::observer_ptr<agx::Constraint>
m_constraint
;
122
123
//agx::observer_ptr<agxPowerLine::ActuatorBodyUnit> m_actuatorBodyUnits[Actuator::NUM_BODIES];
124
agx::ref_ptr<agxPowerLine::ActuatorBodyUnit>
m_actuatorBodyUnits[2];
125
};
126
127
128
}
129
130
#endif
agxStream::in
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...
Definition:
InputArchive.h:400
agxPowerLine::Actuator
Definition:
Actuator.h:49
agxUtil::ConstraintHolder
Utility class to hold custom implementations of constraints.
Definition:
agxUtil.h:384
agxStream::out
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...
Definition:
OutputArchive.h:403
agxPowerLine::SubGraph::store
virtual bool store(agxStream::StorageStream &str) const
Stores internal data into stream.
agx::observer_ptr< agx::Constraint >
agxPowerLine::Side
Side
Definition:
Sides.h:30
ActuatorUnit.h
agxPowerLine::Unit
Pure virtual class.
Definition:
Unit.h:72
agx::Constraint
The base class for a constraint.
Definition:
Constraint.h:86
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition:
PhysicalDimension.h:93
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxPowerLine
Definition:
MotorUnit.h:23
agxPowerLine::Actuator::m_constraint
agx::observer_ptr< agx::Constraint > m_constraint
Definition:
Actuator.h:121
agxPowerLine::detail::DimensionState3Dof
Templated three dimensional dimension state.
Definition:
DimensionState.h:354
detail
Definition:
ExternalProcess.h:28
agxPowerLine::PhysicalDimension::Type
int Type
Definition:
PhysicalDimension.h:96
agx
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
Definition:
AckermannSteering.h:21
agx::ref_ptr< agxPowerLine::ActuatorBodyUnit >
agxPowerLine::ActuatorBodyUnit
An ActuatorBodyUnit forms a connection between the power line world and the rest of the simulation...
Definition:
ActuatorUnit.h:143
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:52
SubGraph.h
agx::Vec3T< Real >
agxStream::InputArchive
Class for reading a binary stream of serialized data.
Definition:
InputArchive.h:51
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
Sides.h
Unit.h
agxStream::OutputArchive
Class for writing serialized data in binary format to a stream.
Definition:
OutputArchive.h:56
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition:
Simulation.h:121
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition:
Serializable.h:220
agxPowerLine::DimensionAndSide
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Definition:
PhysicalDimension.h:78
agxPowerLine::Actuator::m_enabled
bool m_enabled
Definition:
Actuator.h:119
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
agxPowerLine::detail::AbstractDimensionState3Dof
Base class for the two three dimensional dimension state classes.
Definition:
DimensionState.h:336
type
GLenum type
Definition:
gl.h:5539
agxPowerLine::SubGraph::restore
virtual bool restore(agxStream::StorageStream &str)
Restores internal data from stream.
include
agxPowerLine
Actuator.h
Generated on Thu Jan 13 2022 19:49:25 for AGXDynamics by
1.8.13