17 #ifndef AGXCABLE_ROUTE_H
18 #define AGXCABLE_ROUTE_H
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
An ordered collection of agxCable::Node objects that has been added to a particular cable.
virtual void restore(agxStream::InputArchive &in) override
virtual agxCable::RouteInitializationReport initialize()=0
HomogeneousSegmentsRoute()
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.
void setMaxAllowedError(agx::Real error)
virtual void store(agxStream::OutputArchive &out) const override
agxCable::CableSegmentRefVector m_segments
agx::Real getMaxAllowedError() const
agxCable::RoutingNodeRefVector m_routingNodes
agx::Real m_resolution
The current resolution, updated by running the segmentation algorithm.
agx::Real m_maxAllowedError
bool add(agxCable::RoutingNode *node)
agx::Real getResolution() const
virtual agxCable::RouteInitializationReport tryInitialize()=0
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxCable::Route)
virtual ~HomogeneousSegmentsRoute()
const agxCable::RoutingNodeRefVector & getRouteNodes() const
A route that creates segments directly from the routing nodes.
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.
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.
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.
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
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.
Contain classes for 6 DOF lumped element cables/wires/ropes.
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...
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.