AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Deformable1DRoute.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 AGXMODEL_DEFORMABLE1DROUTE_H
18#define AGXMODEL_DEFORMABLE1DROUTE_H
19
21
22namespace agxModel
23{
26 AGX_DECLARE_POINTER_TYPES(Deformable1DMinErrorPointRoute);
27
33 {
34 public:
43
47 Deformable1DInitializationReport(agx::Real targetError, agx::Real maxError, agx::Real resolution, size_t numNodes);
48
53
58
63
67 size_t getNumNodes() const;
68
73
80
85
90
91 private:
92 agx::Real m_targetError;
93 agx::Real m_maxError;
94 agx::Real m_resolution;
95 size_t m_numNodes;
96 };
97
181
262
318}
319
320#endif // AGXMODEL_DEFORMABLE1DROUTE_H
#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 AGXMODEL_EXPORT
Initialization report kept in Deformable1D object for the user to check validity of the initial state...
void store(agxStream::OutputArchive &out) const
Store to output archive.
Deformable1DInitializationReport()
Create a report with values indication that no initialization has happened yet, or that the initializ...
void restore(agxStream::InputArchive &in)
Restore from input archive.
Deformable1DInitializationReport(agx::Real targetError, agx::Real maxError, agx::Real resolution, size_t numNodes)
Construct given target (minimum) error and the actual (maximum) error from route.
Route the initial setup given nodes.
Deformable1DNodeRoute()
Default constructor.
virtual ~Deformable1DNodeRoute()
Default constructor for serialization.
agxModel::Deformable1DNodeRef add(agxModel::Deformable1DNodeRef node, agx::Real length)
Add node to route.
const RouteData::Container & getRouteDataContainer() const
virtual agxModel::Deformable1DInitializationReport tryInitializeAllNodes() override
virtual agxModel::Deformable1DInitializationReport initializeAndAddAllNodes() override
Initializes.
Routing implementation where the user add 'points', i.e., orientation is neglected.
virtual agxModel::Deformable1DInitializationReport tryInitializeAllNodes() override
agx::Real getOriginalResolutionPerUnitLength() const
Deformable1DPointRoute(agx::Real resolutionPerUnitLength, agx::Real minError=agx::Real(-1))
Construct given wanted resolution per unit length and minimum wanted error from routing.
Deformable1DNodeRefContainer m_routeNodes
Deformable1DPointRoute()
Default constructor for serialization.
const agxModel::Deformable1DNodeRefContainer & getRouteNodes() const
virtual agxModel::Deformable1DInitializationReport initializeAndAddAllNodes() override
Initialize call from base.
void setMinError(agx::Real minError)
agx::Bool add(agxModel::Deformable1DNodeRef node)
Add node to the route.
agxModel::Deformable1DNodeRef add(agxModel::NodeAttachmentRef attachment)
Add attachment to the route.
virtual ~Deformable1DPointRoute()
Reference counted object, protected destructor.
agxModel::Deformable1DNodeRef add(const agx::Vec3 &point)
Add free world point to the route.
Base class for routing algorithms holding all nodes and resolution.
virtual agxModel::Deformable1DInitializationReport tryInitializeAllNodes()=0
void restore(agxStream::InputArchive &in) override
Restore given input archive.
const agxModel::Deformable1DNodeRefContainer & getNodes() const
All nodes from routing - these nodes are only kept during initialization stage.
virtual ~Deformable1DRoute()
Reference counted object, protected destructor.
virtual void postInitialize()
Called after the Deformable1D has been successfully initialized.
void setResolutionPerUnitLength(agx::Real resolutionPerUnitLength)
Possibility for implementations to change the resolution.
agx::Real getResolutionPerUnitLength() const
void store(agxStream::OutputArchive &out) const override
Store given output archive.
agx::Bool add(agxModel::Deformable1DNodeRef node, agx::Real length)
Add-node-method for implementations.
virtual agxModel::Deformable1DInitializationReport initializeAndAddAllNodes()=0
Pure virtual method where the implementation should execute its routing algorithm and add the nodes f...
agxModel::Deformable1DInitializationReport tryInitialize()
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(agxModel::Deformable1DRoute)
Deformable1DRoute(agx::Real resolutionPerUnitLength)
Construct given resolution per unit length.
agxModel::Deformable1DInitializationReport initialize()
Initialize call from the Deformable1D implementation expecting a report how the routing went.
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 higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
bool Bool
Definition Integer.h:40
double Real
Definition Real.h:42
RouteData(agxModel::Deformable1DNodeRef node, agx::Real length)