AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
WireUtils.h File Reference

Go to the source code of this file.

Namespaces

namespace  agxWire
 Implements a Wire model with adaptive resolution.
 

Macros

#define planeProject(pnt)   pnt - ( normal * ( plane * pnt ) )
 
#define shape_to_world_transform(geom)    ((*geom->getShapes().begin())->getLocalTransform() * geom->getTransform())
 
#define world_to_shape_transform(geom)    (shape_to_world_transform( geom ).inverse())
 

Functions

template<typename IteratorCompatibleContainer >
IteratorCompatibleContainer::const_iterator agxWire::findBeginIterator (const IteratorCompatibleContainer &container, int nodeMask)
 Primitive function to find begin iterator for utility functions below.
 
template<typename IteratorCompatibleContainer >
agx::Real agxWire::findDistanceFromStartGivenPoint (agx::Real pulledInBegin, const IteratorCompatibleContainer &container, const agx::Vec3 &point)
 Search vector/list container defining a wire for the 3D point -> 1D wire projection.
 
template<typename IteratorCompatibleContainer >
agx::Real agxWire::findDistanceFromStartGivenPoint (agx::Real pulledInBegin, const IteratorCompatibleContainer &container, const agx::Vec3 &point, typename IteratorCompatibleContainer::const_iterator beginIt, typename IteratorCompatibleContainer::const_iterator endIt, agx::Real &shortestDistanceSquared)
 Search vector/list container defining a wire for the 3D point -> 1D wire projection.
 
template<typename IteratorCompatibleContainer >
IteratorCompatibleContainer::const_iterator agxWire::findEndIterator (const IteratorCompatibleContainer &container, int nodeMask)
 Primitive function to find end iterator for utility functions below.
 
template<typename IteratorCompatibleContainer >
agx::Vec3 agxWire::findPointOnWire (const IteratorCompatibleContainer &container, const agx::Vec3 &point)
 Projects any 3D point onto wire.
 
template<typename IteratorCompatibleContainer >
agx::Vec3 agxWire::findPointOnWire (const IteratorCompatibleContainer &container, const agx::Vec3 &point, const agx::Vec3 n)
 Projects any 3D point onto wire.
 
template<typename IteratorCompatibleContainer >
agx::Vec3 agxWire::findPointOnWire (const IteratorCompatibleContainer &container, const agx::Vec3 &point, typename IteratorCompatibleContainer::const_iterator beginIt, typename IteratorCompatibleContainer::const_iterator endIt, agx::Real &shortestDistanceSquared)
 Projects any 3D point onto wire.
 
template<typename IteratorCompatibleContainer >
agx::Vec3 agxWire::findPointOnWire (const IteratorCompatibleContainer &container, const agx::Vec3 &point, typename IteratorCompatibleContainer::const_iterator beginIt, typename IteratorCompatibleContainer::const_iterator endIt, const agx::Vec3 n, agx::Real &shortestDistanceSquared)
 
template<typename IteratorCompatibleContainer >
const Node * agxWire::getNode (const IteratorCompatibleContainer &container, agx::Real distanceFromStart)
 Finds the wire node given current distance from the start of the wire (wire defined to be iterator compatible container).
 
template<typename IteratorCompatibleContainer >
Node * agxWire::getNode (IteratorCompatibleContainer &container, agx::Real distanceFromStart)
 Finds the wire node given current distance from the start of the wire (wire defined to be iterator compatible container).
 
template<typename It >
It agxWire::getNodeIterator (agx::Real distanceFromStart, It begin, It end, It containerEnd)
 This function is used by getNode, but can be used of some nodes in the beginning or end of the wire should be excluded.
 
static agx::Vec3 agxWire::transformPointToShape (const agx::Vec3 &p, const agxCollide::Geometry *g)
 Transforms a point given in world coordinates to shape coordinates of geometry g.
 
static agx::Vec3 agxWire::transformPointToWorld (const agx::Vec3 &p, const agxCollide::Geometry *g)
 Transforms a point given in shape coordinates to world given geometry g.
 
static agx::Vec3 agxWire::transformVectorToShape (const agx::Vec3 &v, const agxCollide::Geometry *g)
 Transforms a vector given in world coordinates to shape coordinates of geometry g.
 
static agx::Vec3 agxWire::transformVectorToWorld (const agx::Vec3 &v, const agxCollide::Geometry *g)
 Transforms a vector given in shape coordinates to world coordinates given geometry g.
 

Macro Definition Documentation

◆ planeProject

#define planeProject (   pnt)    pnt - ( normal * ( plane * pnt ) )

◆ shape_to_world_transform

#define shape_to_world_transform (   geom)     ((*geom->getShapes().begin())->getLocalTransform() * geom->getTransform())

Definition at line 31 of file WireUtils.h.

◆ world_to_shape_transform

#define world_to_shape_transform (   geom)     (shape_to_world_transform( geom ).inverse())

Definition at line 34 of file WireUtils.h.