AGXDynamics
2.35.0.2
TranslationalDimension.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. 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_TRANSLATIONAL_DIMENSION_H
18
#define AGXPOWERLINE_TRANSLATIONAL_DIMENSION_H
19
20
#include <
agxModel/export.h
>
21
#include <
agxPowerLine/PhysicalDimension.h
>
22
#include <
agxPowerLine/Connector.h
>
23
#include <
agxPowerLine/DirectionReference.h
>
24
25
#include <
agxSDK/StepEventListener.h
>
26
27
#include <
agxUtil/agxUtil.h
>
28
29
#include <
agx/RigidBody.h
>
30
#include <
agx/ElementaryConstraint.h
>
31
32
namespace
agxPowerLine
33
{
34
35
DOXYGEN_START_INTERNAL_BLOCK
()
36
37
#define DEFAULT_TRANSLATIONAL_DIRECTION agx::Vec3(0, 1, 0)
38
39
class
TranslationalUnit;
40
47
class
AGXMODEL_EXPORT
TranslationalDimension :
public
agxPowerLine::PhysicalDimension
48
{
49
public
:
55
TranslationalDimension(
agxPowerLine::Unit
* unit);
56
62
TranslationalDimension(
63
agxPowerLine::Unit
* unit,
64
agx::RigidBody
* body,
65
const
agx::Vec3
& direction,
66
agxPowerLine::DirectionReference
directionReference,
67
bool
externalBody =
false
);
68
73
static
std::string getStaticTypeName();
74
78
virtual
std::string getTypeName()
const override
;
79
83
virtual
void
renderDebug()
override
;
84
88
virtual
agx::Real
getOutputLoad()
const override
;
89
virtual
agx::Real
getInputLoad()
const override
;
90
agx::Real
getOutputForce()
const
;
91
agx::Real
getInputForce()
const
;
92
93
97
virtual
agx::Real
getPowerIn()
const override
;
98
virtual
agx::Real
getPowerOut()
const override
;
99
103
virtual
agx::Vec3
getWorldDirection()
const
;
104
112
static
agxPowerLine::PhysicalDimension::Type
getStaticType();
113
117
virtual
bool
store(
agxStream::StorageStream
&
out
)
const override
;
118
122
virtual
bool
restore(
agxStream::StorageStream
&
in
)
override
;
123
124
AGXSTREAM_DECLARE_SERIALIZABLE
(agxPowerLine::TranslationalDimension);
125
126
protected
:
127
TranslationalDimension();
128
virtual
~TranslationalDimension();
129
};
130
131
132
typedef
agx::ref_ptr<TranslationalDimension>
TranslationalDimensionRef;
133
137
class
AGXMODEL_EXPORT
TranslationalConnector :
public
agxPowerLine::Connector
138
{
139
public
:
140
TranslationalConnector();
141
142
virtual
PhysicalDimensionMultiBodyConstraintImplementation* createConstraint()
override
;
143
virtual
agx::RegularizationParameters::VariableType
calculateComplianceAndDamping(
const
agx::Real
timeStep,
agx::Real
& compliance,
agx::Real
& damping)
override
;
144
148
virtual
bool
store(
agxStream::StorageStream
&
out
)
const override
;
149
153
virtual
bool
restore(
agxStream::StorageStream
&
in
)
override
;
154
155
AGXSTREAM_DECLARE_SERIALIZABLE
(agxPowerLine::TranslationalConnector);
156
157
protected
:
158
virtual
~TranslationalConnector() {}
159
};
160
161
typedef
agx::ref_ptr<TranslationalConnector>
TranslationalConnectorRef;
162
163
DOXYGEN_END_INTERNAL_BLOCK
()
164
}
165
166
#endif // AGXMODEL_TRANSLATIONAL_DIMENSION_H
agx::Real
double Real
Definition:
Real.h:42
agx::RegularizationParameters::VariableType
VariableType
Definition:
RegularizationParameters.h:32
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:412
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
export.h
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
macros.h:96
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition:
StorageStream.h:48
StepEventListener.h
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition:
PhysicalDimension.h:93
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
agxPowerLine::PhysicalDimension::Type
int Type
Definition:
PhysicalDimension.h:96
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::Unit
Pure virtual class.
Definition:
Unit.h:72
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
Connector.h
RigidBody.h
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition:
MotorUnit.h:23
ElementaryConstraint.h
agxPowerLine::Connector
Links two connections together.
Definition:
Connector.h:53
DirectionReference.h
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agxPowerLine::DirectionReference
DirectionReference
The DirectionReference specifies what the direction attribute of a DimensionState is relative to.
Definition:
DirectionReference.h:27
agx::Vec3T< Real >
agxUtil.h
PhysicalDimension.h
include
agxPowerLine
TranslationalDimension.h
Generated on Mon Jan 30 2023 15:44:21 for AGXDynamics by
1.8.17