AGX Dynamics
2.37.3.2
RotationalTranslationalConnector.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_TRANSLATIONAL_CONNECTOR_H
18
#define AGXPOWERLINE_ROTATIONAL_TRANSLATIONAL_CONNECTOR_H
19
20
#include <
agxPowerLine/PowerLine.h
>
21
#include <
agxPowerLine/Connector.h
>
22
#include <
agxPowerLine/RotationalTranslationalConstraints.h
>
23
24
namespace
agxPowerLine
25
{
26
36
class
AGXMODEL_EXPORT
RotationalTranslationalConnector
:
public
agxPowerLine::Connector
37
{
38
public
:
42
RotationalTranslationalConnector
();
43
44
virtual
bool
postUpdate(
agx::Real
timeStep)
override
;
45
46
virtual
agx::RegularizationParameters::VariableType
calculateComplianceAndDamping(
47
const
agx::Real
timeStep,
agx::Real
& compliance,
agx::Real
& damping)
override
;
48
49
using
Connector::connect
;
50
55
virtual
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
* createConstraint()
override
;
56
60
void
setShaftRadius(
agx::Real
shaftRadius);
61
virtual
agx::Real
getShaftRadius()
const
;
62
63
agx::Real
getShaftAngle()
const
;
64
agx::Real
getRodPosition()
const
;
65
69
virtual
bool
store(
agxStream::StorageStream
& str)
const override
;
70
74
virtual
bool
restore(
agxStream::StorageStream
& str)
override
;
75
76
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxPowerLine::RotationalTranslationalConnector
);
77
78
protected
:
79
virtual
~RotationalTranslationalConnector
() {}
80
#ifndef SWIGPYTHON
81
virtual
bool
connect(
PhysicalDimension
* inputDimension,
Side
inputSide,
Side
outputSide,
PhysicalDimension
* outputDimension )
override
;
82
#endif
83
protected
:
84
agx::Real
m_shaftRadius
;
85
agx::Real
m_shaftAngle
;
86
agx::Real
m_rodPosition
;
87
};
88
89
typedef
agx::ref_ptr< RotationalTranslationalConnector >
RotationalTranslationalConnectorRef
;
90
91
92
97
class
AGXMODEL_EXPORT
RotationalTranslationalHolonomicConnector
:
public
RotationalTranslationalConnector
98
{
99
public
:
103
RotationalTranslationalHolonomicConnector
( );
104
105
virtual
agx::RegularizationParameters::VariableType
calculateComplianceAndDamping(
const
agx::Real
timeStep,
agx::Real
& compliance,
agx::Real
& damping )
override
;
106
107
virtual
agx::Real
calculateViolation( )
const override
;
108
112
virtual
bool
store(
agxStream::StorageStream
& str )
const override
;
113
117
virtual
bool
restore(
agxStream::StorageStream
& str )
override
;
118
119
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxPowerLine::RotationalTranslationalHolonomicConnector
);
120
};
121
122
typedef
agx::ref_ptr< RotationalTranslationalHolonomicConnector >
RotationalTranslationalHolonomicConnectorRef
;
123
124
}
125
126
#endif
RotationalTranslationalConstraints.h
agxPowerLine::RotationalTranslationalConnector::m_shaftRadius
agx::Real m_shaftRadius
Definition:
RotationalTranslationalConnector.h:84
agxPowerLine::Connector
Links two connections together.
Definition:
Connector.h:53
agxPowerLine::RotationalTranslationalConnector::m_rodPosition
agx::Real m_rodPosition
Definition:
RotationalTranslationalConnector.h:86
agxPowerLine::RotationalTranslationalConnectorRef
agx::ref_ptr< RotationalTranslationalConnector > RotationalTranslationalConnectorRef
Definition:
RotationalTranslationalConnector.h:89
agxPowerLine::Side
Side
Definition:
Sides.h:30
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
Constraint implementation for constraining a number of physical dimensions of the same type...
Definition:
PowerLineConstraints.h:150
agxPowerLine::RotationalTranslationalConnector::m_shaftAngle
agx::Real m_shaftAngle
Definition:
RotationalTranslationalConnector.h:85
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition:
PhysicalDimension.h:93
agxPowerLine::RotationalTranslationalHolonomicConnectorRef
agx::ref_ptr< RotationalTranslationalHolonomicConnector > RotationalTranslationalHolonomicConnectorRef
Definition:
RotationalTranslationalConnector.h:122
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system...
Definition:
MotorUnit.h:23
agxPowerLine::RotationalTranslationalConnector::~RotationalTranslationalConnector
virtual ~RotationalTranslationalConnector()
Definition:
RotationalTranslationalConnector.h:79
agxPowerLine::RotationalTranslationalConnector
Constrains a rotational degree of freedom with a translational degree of freedom with a non-holonomic...
Definition:
RotationalTranslationalConnector.h:36
Connector.h
agxPowerLine::Connector::connect
virtual bool connect(agxPowerLine::Unit *unit)
Connect a unit to this Connector.
PowerLine.h
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
agx::RegularizationParameters::VariableType
VariableType
Definition:
RegularizationParameters.h:32
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
agxPowerLine::RotationalTranslationalHolonomicConnector
This class can be used to connect the position of a rotational and a positional unit.
Definition:
RotationalTranslationalConnector.h:97
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
include
agxPowerLine
RotationalTranslationalConnector.h
Generated on Fri Apr 12 2024 12:40:26 for AGX Dynamics by
1.8.13