|
Structural deformable models
|
Implements a Node used by Model and Edge. More...
#include <Node.h>


Public Types | |
| enum | NodeState { ST_NONE =0, ST_HIGHLIGHT =1, ST_SELECT =2 } |
Public Member Functions | |
| Node (const ParticleParam *phys=&ParticleParam::global) | |
| Default constructor. More... | |
| Node (const Node &rhs) | |
| Assignment constructor. More... | |
| Node (float _x, float _y, const ParticleParam *phys=&ParticleParam::global) | |
| Constructor. More... | |
| virtual | ~Node () |
| Destructor. More... | |
| Node & | operator= (const Node &rhs) |
| Assignment operator. More... | |
| Node & | setPos (const Point &p) |
| int | getIndex () const |
| void | attachSensor (sensor_cptr _sensor) |
| void | addSensorForce () |
| void | enableState (dword nstate) |
| void | disableState (dword nstate=0xffffffff) |
| void | toggleState (dword nstate) |
| bool | hasState (dword nstate=0xffffffff) const |
| void | draw () const |
Public Member Functions inherited from Point2D | |
| Point2D () | |
| Point2D (const Point2D &rhs) | |
| Point2D (float _x, float _y) | |
| Point2D (const float *val) | |
| virtual | ~Point2D () |
| Point2D & | operator= (const Point2D &rhs) |
| Point2D & | operator= (float rhs) |
| Point2D & | operator= (const float *rhs) |
| Point2D & | operator+= (const Point2D &rhs) |
| Point2D & | operator-= (const Point2D &rhs) |
| Point2D & | operator*= (const Point2D &rhs) |
| Point2D & | operator*= (const float f) |
| Point2D & | operator/= (const Point2D &rhs) |
| Point2D & | operator/= (const float f) |
| float | operator* (const Point2D &rhs) const |
| const Point2D & | const_times (const Point2D &rhs) const |
| Point2D & | times (const Point2D &rhs) |
| float | dot (const Point2D &rhs) const |
| float | crossZ (const Point2D &rhs) const |
| float | sinAngle (const Point2D &rhs) const |
| float | angle (const Point2D &rhs=Point2D(1, 0)) const |
| float | sinAngleX () const |
| float | angleX () const |
| Point2D | operator* (float rhs) const |
| Point2D | operator+ (const Point2D &rhs) const |
| Point2D | operator- (const Point2D &rhs) const |
| Point2D | operator/ (const Point2D &rhs) const |
| Point2D | operator/ (float rhs) const |
| float | sum () const |
| returns 1-norm More... | |
| float | norm2 () const |
| returns squared 2-norm More... | |
| float | norm () const |
| returns 2-norm aka length or absolute More... | |
| float | normalize () |
| normalizes the vector; returns old norm More... | |
| bool | clamp (float x0, float y0, float x1, float y1) |
| void | glVertex () const |
| Issue a glVertex2f call. More... | |
| const Point2D | flipOrtho () const |
| const Point2D | copyNormalized () const |
| const Point2D | rotate (float angle) const |
Public Attributes | |
| sensor_cptr | sensor |
| std::string | sensorID |
| float | mass |
| Mass. More... | |
Public Attributes inherited from Point2D | |
| float | x |
| float | y |
Protected Attributes | |
| Point | v |
| Velocity and Force. More... | |
| Point | f |
| Point | ef |
| extern force More... | |
| int | index |
| Index in the list (Model.nodes) More... | |
| float | oangle |
| float | cangle |
| float | nedges |
| std::vector< int > | edges |
| dword | state |
Friends | |
| class | Model |
| std::ostream & | operator<< (std::ostream &os, const Node &n) |
| output operator More... | |
| enum Node::NodeState |
| Node::Node | ( | const ParticleParam * | phys = &ParticleParam::global | ) |
|
inline |
Assignment constructor.
Definition at line 21 of file Node.h.
References ParticleParam::global, Node(), operator=(), and Model::phys.
| Node::Node | ( | float | _x, |
| float | _y, | ||
| const ParticleParam * | phys = &ParticleParam::global |
||
| ) |
|
inlinevirtual |
| void Node::addSensorForce | ( | ) |
Definition at line 62 of file Node.cpp.
References f, sensor, Point2D::x, and Point2D::y.
Referenced by getIndex().
| void Node::attachSensor | ( | sensor_cptr | _sensor | ) |
Definition at line 50 of file Node.cpp.
References PPSensor::PP_DO, PPSensor::PP_DONT, sensor, sensorID, and Sensor::UPD_MINMAX.
Referenced by getIndex(), Model::readNode(), and Brain::triggerTest().
|
inline |
Definition at line 39 of file Node.h.
References state.
Referenced by Model::setHLNode(), and Brain::triggerTest().
| void Node::draw | ( | ) | const |
Definition at line 69 of file Node.cpp.
References hasState(), sensorID, sglBitmapStringOutlined(), ST_HIGHLIGHT, ST_SELECT, state, Point2D::x, and Point2D::y.
Referenced by hasState().
|
inline |
Definition at line 38 of file Node.h.
References state.
Referenced by Model::setHLNode(), and Brain::triggerTest().
|
inline |
Definition at line 33 of file Node.h.
References addSensorForce(), attachSensor(), index, and operator<<.
Referenced by Brain::doCommand().
|
inline |
Definition at line 28 of file Node.h.
References Point2D::operator=().
Referenced by Brain::triggerTest().
|
inline |
|
friend |
output operator
Definition at line 38 of file Node.cpp.
Referenced by getIndex(), and operator<<().
|
protected |
Definition at line 60 of file Node.h.
Referenced by Model::getNodeAngle(), and operator=().
|
protected |
|
protected |
Definition at line 52 of file Node.h.
Referenced by addSensorForce(), Model::addTorque(), and operator=().
|
protected |
Index in the list (Model.nodes)
Definition at line 56 of file Node.h.
Referenced by Model::addNode(), getIndex(), and operator=().
| float Node::mass |
Mass.
Definition at line 48 of file Node.h.
Referenced by operator<<(), operator=(), and Model::readNode().
|
protected |
Definition at line 57 of file Node.h.
Referenced by operator=().
| sensor_cptr Node::sensor |
Definition at line 43 of file Node.h.
Referenced by addSensorForce(), attachSensor(), Edge::getSensorValue(), operator<<(), and operator=().
| std::string Node::sensorID |
Definition at line 44 of file Node.h.
Referenced by attachSensor(), draw(), and operator=().
|
protected |
Definition at line 61 of file Node.h.
Referenced by disableState(), draw(), enableState(), hasState(), operator=(), and toggleState().
|
protected |
1.8.11