Structural deformable models
|
Implements an Edge with spring functionality. More...
#include <Edge.h>
Public Member Functions | |
Edge (const Edge &rhs) | |
Edge (int _from, int _to, std::vector< Node > &_nodes, const ParticleParam *phys=&ParticleParam::global, int _index=-1) | |
Edge (int _from, int _to, std::vector< Node > &_nodes, float restlength, float spring_k=1, int _index=-1) | |
virtual | ~Edge () |
void | setNodesList (std::vector< Node > &nodes) |
Edge & | operator= (const Edge &rhs) |
const Point | dir () const |
const Point | idir () const |
float | length2 () const |
float | length () const |
float | lengthRatio () const |
float | adaptRestLength () |
float | adaptRestLength (float ratio) |
float | getAngle () const |
float | adaptAngle () |
Node & | fromNode () |
Node & | toNode () |
const Node & | fromNode () const |
const Node & | toNode () const |
dword | getSensorValue (float &sum, dword &nsamples) const |
Public Attributes | |
int | from |
int | to |
float | xangle |
float | cxangle |
std::vector< Node > * | nodes |
float | restlength |
float | springconstant |
spring constant More... | |
float | dampingconstant |
damping constant More... | |
int | edgesensor |
0-none, >0-use from sensor n times, <0 use to sensor More... | |
Protected Attributes | |
int | index |
index in the model (Model.edges) More... | |
Friends | |
class | Model |
std::ostream & | operator<< (std::ostream &os, const Edge &p) |
|
inline |
Definition at line 25 of file Edge.h.
References operator=().
|
inline |
Definition at line 29 of file Edge.h.
References adaptRestLength(), ParticleParam::damping, dampingconstant, edgesensor, from, index, nodes, Model::phys, ParticleParam::springconst, springconstant, and to.
|
inline |
Definition at line 42 of file Edge.h.
References edgesensor, from, index, nodes, restlength, springconstant, and to.
|
inline |
|
inline |
Definition at line 95 of file Edge.h.
References length(), and restlength.
Referenced by Edge(), and Brain::triggerTest().
|
inline |
|
inline |
Definition at line 73 of file Edge.h.
References from, fromNode(), to, and toNode().
Referenced by getAngle(), and length2().
|
inline |
Definition at line 121 of file Edge.h.
Referenced by Model::addTorque(), dir(), getSensorValue(), and idir().
|
inline |
Definition at line 102 of file Edge.h.
References Point2D::angleX(), and dir().
Referenced by adaptAngle().
Definition at line 144 of file Edge.h.
References edgesensor, from, fromNode(), Node::sensor, to, and toNode().
Referenced by toNode().
|
inline |
|
inline |
Definition at line 87 of file Edge.h.
References length2(), and dmutil::sqrt().
Referenced by adaptRestLength(), and lengthRatio().
|
inline |
|
inline |
Definition at line 91 of file Edge.h.
References length(), and restlength.
Referenced by MStructure::buildMasterModel().
Definition at line 60 of file Edge.h.
References dampingconstant, edgesensor, from, index, nodes, restlength, springconstant, and to.
Referenced by Edge().
|
inline |
|
inline |
Definition at line 122 of file Edge.h.
Referenced by Model::addTorque(), dir(), getSensorValue(), and idir().
|
inline |
|
friend |
Definition at line 108 of file Edge.h.
float Edge::dampingconstant |
damping constant
Definition at line 136 of file Edge.h.
Referenced by Edge(), operator=(), and Model::readEdge().
int Edge::edgesensor |
0-none, >0-use from sensor n times, <0 use to sensor
Definition at line 137 of file Edge.h.
Referenced by Edge(), getSensorValue(), operator=(), and Model::readEdge().
int Edge::from |
Definition at line 128 of file Edge.h.
Referenced by dir(), Edge(), fromNode(), getSensorValue(), idir(), length2(), operator=(), and Brain::triggerTest().
|
protected |
index in the model (Model.edges)
Definition at line 141 of file Edge.h.
Referenced by Edge(), and operator=().
std::vector<Node>* Edge::nodes |
Definition at line 131 of file Edge.h.
Referenced by Edge(), fromNode(), operator=(), setNodesList(), and toNode().
float Edge::restlength |
Definition at line 132 of file Edge.h.
Referenced by adaptRestLength(), MStructure::buildMasterModel(), Edge(), lengthRatio(), operator=(), Model::readEdge(), and Brain::triggerTest().
float Edge::springconstant |
spring constant
Definition at line 134 of file Edge.h.
Referenced by MStructure::buildMasterModel(), Edge(), operator=(), Model::readEdge(), and Brain::triggerTest().
int Edge::to |
Definition at line 128 of file Edge.h.
Referenced by dir(), Edge(), getSensorValue(), idir(), length2(), operator=(), toNode(), and Brain::triggerTest().
float Edge::xangle |
Definition at line 129 of file Edge.h.
Referenced by adaptAngle().