AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Route.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 AGXCABLE_ROUTE_H
18#define AGXCABLE_ROUTE_H
19
20#include <agx/Referenced.h>
21
23
24#include <agxCable/Node.h>
27
28
29// Deformable1D classes are used solely for reading old serializations.
31
32namespace agxCable
33{
35
77
78
80
98
99
101
108 {
109 public:
113 explicit SegmentingRoute(agx::Real startingResolution);
114
117
118 public:
119 SegmentingRoute(agx::Real resolution, agx::Real originalResolution, agx::Real maxAllowedError,
120 agxCable::RoutingNodeRefVector&& routingNodes,
123 using HomogeneousSegmentsRoute::restore;
124
125 protected:
128 };
129
130
137 {
138 public:
139 explicit PathRoute(agx::Real targetResolution);
142
143 public:
145 using HomogeneousSegmentsRoute::restore;
146
147 protected:
150
151 private:
152 agx::Real m_targetResolution;
153 };
154
159 {
160 public:
165 explicit Route(agx::Real resolutionPerUnitLength);
166
167 public:
169
170 protected:
172 virtual ~Route();
173 };
174}
175
176#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXCABLE_EXPORT
An ordered collection of agxCable::Node objects that has been added to a particular cable.
Definition Route.h:41
virtual void restore(agxStream::InputArchive &in) override
virtual agxCable::RouteInitializationReport initialize()=0
HomogeneousSegmentsRoute(agx::Real resolution, agx::Real maxAllowedError)
const agxCable::CableSegmentRefVector & getSegments() const
HomogeneousSegmentsRoute(agx::Real resolution, agx::Real originalResolution, agx::Real maxAllowedError, agxCable::RoutingNodeRefVector &&routingNodes, agxCable::CableSegmentRefVector &&segments)
agx::Real m_originalResolution
The resolution supplied to the constructor. Resolution search always start here.
Definition Route.h:74
void setMaxAllowedError(agx::Real error)
virtual void store(agxStream::OutputArchive &out) const override
agxCable::CableSegmentRefVector m_segments
Definition Route.h:71
agx::Real getMaxAllowedError() const
agxCable::RoutingNodeRefVector m_routingNodes
Definition Route.h:70
agx::Real m_resolution
The current resolution, updated by running the segmentation algorithm.
Definition Route.h:73
bool add(agxCable::RoutingNode *node)
const agxCable::RoutingNodeRefVector & getRouteNodes() const
virtual agxCable::RouteInitializationReport tryInitialize()=0
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxCable::Route)
A route that creates segments directly from the routing nodes.
Definition Route.h:86
virtual agxCable::RouteInitializationReport initialize() override
virtual agxCable::RouteInitializationReport tryInitialize() override
IdentityRoute(agx::Real resolution)
A route that creates a path roughly following the routing nodes.
Definition Route.h:137
virtual agxCable::RouteInitializationReport initialize() override
PathRoute(agx::Real targetResolution)
virtual agxCable::RouteInitializationReport tryInitialize() override
Legacy route type that exist solely for the purpose of restoring old serializations.
Definition Route.h:159
virtual ~Route()
Route(agx::Real resolutionPerUnitLength)
Create a new empty cable route with the given peferred resolution.
Base class for route nodes that defines the path and some behavior of a cable.
A route that finds a segment length that divides the route legs as evenly as possible.
Definition Route.h:108
SegmentingRoute(agx::Real resolution, agx::Real originalResolution, agx::Real maxAllowedError, agxCable::RoutingNodeRefVector &&routingNodes, agxCable::CableSegmentRefVector &&segments)
SegmentingRoute(agx::Real startingResolution)
virtual agxCable::RouteInitializationReport initialize() override
virtual agxCable::RouteInitializationReport tryInitialize() override
Routing implementation where the user add 'points', i.e., orientation is neglected.
Class for reading a binary stream of serialized data.
Class for writing serialized data in binary format to a stream.
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Base class providing referencing counted objects.
Definition Referenced.h:120
Contain classes for 6 DOF lumped element cables/wires/ropes.
double Real
Definition Real.h:42