AGXDynamics
2.35.0.2
SlotMapper.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_SLOT_MAPPER_H
18
#define AGXPOWERLINE_SLOT_MAPPER_H
19
20
#include <
agxModel/export.h
>
21
#include <
agx/Vector.h
>
22
#include <
agx/Referenced.h
>
23
#include <
agxPowerLine/detail/DimensionState.h
>
24
#include <
agxPowerLine/detail/PackingInfo.h
>
25
26
27
28
namespace
agxPowerLine
29
{
30
class
PowerLine;
31
32
namespace
detail
33
{
34
class
SlotMapperUnitTestEntryPoint;
35
}
36
}
37
38
39
namespace
agxPowerLine
40
{
51
class
AGXMODEL_EXPORT
SlotMapper
:
public
agx::Referenced
,
public
agxStream::Serializable
52
{
53
public
:
54
SlotMapper
(
agxPowerLine::PowerLine
* powerLine);
55
60
void
pack(
agxPowerLine::detail::Rotational1DofState
* dimension);
61
void
pack(
agxPowerLine::detail::Translational1DofState
* dimension);
62
63
69
void
unpack(
agxPowerLine::detail::Rotational1DofState
* dimension);
70
void
unpack(
agxPowerLine::detail::Translational1DofState
* dimension);
71
79
void
reserve(
agxPowerLine::detail::Rotational1DofState
* dimension);
80
void
reserve(
agxPowerLine::detail::Translational1DofState
* dimension);
81
86
void
split(
agxPowerLine::detail::Rotational1DofState
* dimension);
87
void
split(
agxPowerLine::detail::Translational1DofState
* dimension);
88
89
/*
90
Move the given dimension state from its current body and slot to the given
91
slot in the given body.
92
*/
93
void
move(
agxPowerLine::detail::Rotational1DofState
* dimension,
agx::RigidBody
* body,
agx::UInt8
slot);
94
void
move(
agxPowerLine::detail::Translational1DofState
* dimension,
agx::RigidBody
* body,
agx::UInt8
slot);
95
96
97
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxPowerLine::SlotMapper
);
98
99
private
:
100
SlotMapper
();
// For serialization only.
101
void
assertValid()
const
;
102
103
private
:
109
friend
class
agxPowerLine::detail::SlotMapperUnitTestEntryPoint
;
110
111
private
:
112
agxPowerLine::detail::PackingInfos
m_fullPackings;
113
agxPowerLine::detail::PackingInfos
m_nonfullPackings;
114
agxPowerLine::PowerLine
* m_powerLine;
115
};
116
117
AGX_DECLARE_POINTER_TYPES
(
SlotMapper
);
118
}
119
120
#endif
agxPowerLine::detail::SlotMapperUnitTestEntryPoint
The UnitTestEntryPoint is a backdoor into the SlotMapper's internal state used by the unit tests to e...
Definition:
SlotMapperUnitTestEntryPoint.h:38
Referenced.h
DimensionState.h
Vector.h
agx::Vector< agxPowerLine::detail::PackingInfo >
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition:
Serializable.h:44
PackingInfo.h
export.h
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
agx::UInt8
uint8_t UInt8
Definition:
Integer.h:38
agxPowerLine::PowerLine
PowerLine is the base class for a system of power transfer integrated into the rigid body simulation.
Definition:
PowerLine.h:70
agxPowerLine::SlotMapper
The SlotMapper is reponsible for mapping one dimensional dimension states to slots in the RigidBodies...
Definition:
SlotMapper.h:51
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition:
MotorUnit.h:23
agxPowerLine::detail::DimensionState1Dof
Templated one dimensional dimension state.
Definition:
DimensionState.h:210
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
include
agxPowerLine
SlotMapper.h
Generated on Mon Jan 30 2023 15:44:20 for AGXDynamics by
1.8.17