#include <node.h>
Collaboration diagram for sparkle::Node:

Public Member Functions | |
ctors/dtor | |
| Node (double initialX, double initialY, Shape *newOwner) | |
| ~Node () | |
Modifiers | |
| void | applyForce (double xForce, double yForce) |
| void | setPosition (double newX, double newY) |
| void | addEdge (Edge *newEdge) |
| void | setOwner (Shape *newOwner) |
Getters | |
Not necessarily const | |
| double | getX () const |
| double | getY () const |
| Vector< double > | getVector () const |
| Shape * | owner () const |
Protected Attributes | |
| sparkle::Vector< double > | loc |
| Shape * | ownerShape |
| std::vector< Edge * > | edges |
The Most basic component of the physics engine
|
||||||||||||||||
|
Constructs node at x,y with optional owner newOwner
|
|
|
Deconstructor |
|
||||||||||||
|
Apply a force to the node. This function will notify the parent sparkle::Shape of the force
|
|
||||||||||||
|
Change the position of the node
|
|
|
Lets this node know it's a member of the edge
|
|
|
Set the owner of the node since a node by itself is rather useless
|
|
|
Retrieve x-coord
|
|
|
Retrieve y-coord
|
|
|
|
|
|
Get the owner of the node. If there is no owner, it will return
|
|
|
Vector of node |
|
|
Owner of node |
|
|
Edges connected to this node |