AGXDynamics
2.31.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MultiGear.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
#pragma once
18
19
#include <
agxPowerLine/Connector.h
>
20
21
#include <
agxDriveTrain/Gear.h
>
22
#include <
agxDriveTrain/Shaft.h
>
23
24
#include <
agx/Vector.h
>
25
26
#include <
agxModel/export.h
>
27
28
29
namespace
agxDriveTrain
30
{
31
AGX_DECLARE_POINTER_TYPES
(
MultiGear
);
32
40
class
AGXMODEL_EXPORT
MultiGear
:
public
agxPowerLine::Connector
41
{
42
public
:
43
MultiGear
();
44
53
bool
connect(
agxPowerLine::Unit
* unit,
agx::Real
gearRatio);
54
62
virtual
bool
connect(
agxPowerLine::Unit
* unit)
override
;
63
64
virtual
bool
connect(
agxPowerLine::Side
mySide,
agxPowerLine::Side
otherSide,
agxPowerLine::Unit
* otherUnit)
override
;
65
72
virtual
bool
disconnect(
agxPowerLine::Unit
* unit)
override
;
73
74
83
bool
setGearRatio(
agxPowerLine::Unit
* unit,
agx::Real
gearRatio);
84
93
agx::Real
getGearRatio(
const
agxPowerLine::Unit
* unit)
const
;
94
95
99
agxDriveTrain::Shaft
* getInternalShaft();
100
const
agxDriveTrain::Shaft
* getInternalShaft()
const
;
101
102
103
public
:
// Methods called by the rest of the PowerLine framework.
104
DOXYGEN_START_INTERNAL_BLOCK
()
105
106
using
agxPowerLine::Connector::connect
;
107
using
agxPowerLine::Connector::disconnect
;
108
113
bool
connect(
114
agxPowerLine::Side
mySide,
115
agxPowerLine::Side
unitSide,
116
agxPowerLine::Unit
* unit,
117
agx::Real
gearRatio);
118
119
#ifndef SWIG
120
virtual
agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation
* createConstraint()
override
;
121
#endif
122
123
AGXSTREAM_DECLARE_SERIALIZABLE
(
agxDriveTrain::MultiGear
);
124
virtual
bool
store(
agxStream::StorageStream
&
out
)
const override
;
125
virtual
bool
restore(
agxStream::StorageStream
&
in
)
override
;
126
127
DOXYGEN_END_INTERNAL_BLOCK
()
128
private
:
129
agx::Vector<agxDriveTrain::GearRef>
m_connections;
130
agxDriveTrain::ShaftRef
m_internalShaft;
131
};
132
}
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::Connector
Links two connections together.
Definition:
Connector.h:53
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::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::Unit
Pure virtual class.
Definition:
Unit.h:72
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxDriveTrain::Shaft
A Shaft is the most basic PowerLine Unit.
Definition:
Shaft.h:34
agxPowerLine::Connector::disconnect
virtual bool disconnect()
agx::Vector
Templated vector class.
Definition:
Vector.h:52
Connector.h
agxPowerLine::Connector::connect
virtual bool connect(agxPowerLine::Unit *unit)
Connect a unit to this Connector.
agx::ref_ptr< Shaft >
Vector.h
export.h
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:206
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition:
agxModel/export.h:42
agx::Real
double Real
Definition:
Real.h:42
Gear.h
agxDriveTrain::MultiGear
A MultiGear is a type of gear connector that can have multiple connected shafts, each with its own ge...
Definition:
MultiGear.h:40
Shaft.h
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition:
Object.h:101
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition:
Object.h:100
include
agxDriveTrain
MultiGear.h
Generated on Mon Mar 21 2022 11:53:03 for AGXDynamics by
1.8.5