RobWorkProject  23.9.11-
Public Member Functions | Public Attributes | List of all members
ContactGraph Class Reference

creates a graph where nodes can be physical, logical and compound entities and the edges between nodes are constraints of some sort. More...

#include <ContactGraph.hpp>

Public Member Functions

 ContactGraph (CNodePool *pool, ContactModelFactory &factory)
 Constructor - constructs a ContactGraph with the given nodes and edges. Ownership of nodes and edges is taken. More...
 
virtual ~ContactGraph ()
 Destructor.
 
void broadPhase (rw::kinematics::State &state, bool shortCircuit)
 updates overlab information. updates, inserts and removes edges. Also applies logical and coherence testing.
 
bool narrowPhase (rw::kinematics::State &state, bool shortCircuit)
 apply narrow phase collision detection, and update edge states. If shortCircuit is set to true then narrowPhase will stop when penetration is detected.
 
void updateContacts (rw::kinematics::State &state)
 calculates contact information from cached broadphase and narrowphase results.
 
void applyLogicalCoherenceTest (bool shortCircuit)
 
void rollBack (rw::kinematics::State &state)
 Roll state back to previous state. More...
 
void saveState ()
 save current state
 
std::vector< ConstraintNode * > getStaticConnectedNodes (ConstraintNode *n)
 all nodes that are connected to n through a ConstraintEdge::Structural edge are returned More...
 
std::vector< ConstraintNode * > getConnectedNodes (ConstraintNode *n, ConstraintEdge::EdgeType type)
 
std::vector< std::vector< ConstraintEdge * > > computeGroups ()
 
std::vector< std::vector< ConstraintEdge * > > getPhysicalGroups ()
 
void writeToFile (std::string filename)
 
void resetState (rw::kinematics::State &state)
 

Public Attributes

std::vector< ConstraintEdge * > _fEdges
 

Detailed Description

creates a graph where nodes can be physical, logical and compound entities and the edges between nodes are constraints of some sort.

Constructor & Destructor Documentation

◆ ContactGraph()

ContactGraph ( CNodePool pool,
ContactModelFactory factory 
)

Constructor - constructs a ContactGraph with the given nodes and edges. Ownership of nodes and edges is taken.

Parameters
pool[in] all initial nodes in the graph and all initial constraints in the graph
factory[in] a factory for finding collision constraints

Member Function Documentation

◆ getStaticConnectedNodes()

std::vector<ConstraintNode*> getStaticConnectedNodes ( ConstraintNode n)

all nodes that are connected to n through a ConstraintEdge::Structural edge are returned

Parameters
n
Returns

◆ rollBack()

void rollBack ( rw::kinematics::State state)

Roll state back to previous state.

Parameters
state

The documentation for this class was generated from the following file: