AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
PackingInfo.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXPOWERLINE_DETAIL_PACKING_INFO
18#define AGXPOWERLINE_DETAIL_PACKING_INFO
19
20#include <agx/Integer.h>
21#include <agx/Vector.h>
22
23namespace agx
24{
25 class RigidBody;
26}
27
28namespace agxStream
29{
30 class InputArchive;
31 class OutputArchive;
32}
33
34namespace agxPowerLine
35{
36 namespace detail
37 {
38 struct Rotational;
39 template <typename DimensionType> class DimensionState1Dof;
40 using Rotational1DofState = DimensionState1Dof<Rotational>;
41 }
42}
43
44namespace agxPowerLine
45{
46 namespace detail
47 {
56 {
57 public:
58
63
69
71
72 const Rotational1DofState* operator[](const agx::UInt8 slot) const;
73
75
77
78 bool contains(const Rotational1DofState* dimension) const;
79
80 bool contains(const agx::RigidBody* body) const;
81
82 bool isEmpty() const;
83
84 bool isFull() const;
85
86 int getSize() const;
87
89
91
92 void erase(const Rotational1DofState* dimension);
93
94 void newSlot(Rotational1DofState* dimension);
95
96 void assertValid() const;
97
100
101 private:
102 // Mapping between the dimension state and slots in a RigidBody.
103 // All dimension states use the same body, and m_dimensions[i] use slot i
104 // in the RigidBody.
105 Rotational1DofState* m_dimensions[3];
106 };
107
109 }
110}
111
112#endif
Templated one dimensional dimension state.
Information about which DimensionState1Dof is using which slot in a RigidBody.
Definition PackingInfo.h:56
void store(agxStream::OutputArchive &out) const
const Rotational1DofState * operator[](const agx::UInt8 slot) const
bool contains(const agx::RigidBody *body) const
Rotational1DofState ** end()
PackingInfo()
A default-constructed PackingInfo is empty, i.e., it tracks no PhysicalDimension.
void newSlot(Rotational1DofState *dimension)
bool contains(const Rotational1DofState *dimension) const
void restore(agxStream::InputArchive &in)
PackingInfo(Rotational1DofState *dimension)
A packing info tracking the given dimension only.
void erase(const Rotational1DofState *dimension)
Rotational1DofState *& operator[](const agx::UInt8 slot)
Rotational1DofState ** begin()
Class for reading a binary stream of serialized data.
Class for writing serialized data in binary format to a stream.
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
DimensionState1Dof< Rotational > Rotational1DofState
agxPowerLine contains a collection of connected components that transport power across a system.
Definition MotorUnit.h:24
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint8_t UInt8
Definition Integer.h:30