#include <Body2D.h>
Public Member Functions | |
| Body2D () | |
| Body2D (int length) | |
| ~Body2D () | |
| int | push (T *v) |
| T * | pop () |
| T * | getElementAt (int index) |
| void | clear () |
| int | getIndexOf (T *v) |
| int | getLength () |
| int | getSize () |
A abstract body made of T objects (preferrably Vector2D or Bezier2D). Basically a container (stack-like) of objects.
filename: Body2D.h
| sonus::Body2D< T >::Body2D | ( | ) | [inline] |
Constructor A standard length of 10 is set.
| sonus::Body2D< T >::Body2D | ( | int | length | ) | [inline] |
Constructor with given length
| length | the length of the body |
| sonus::Body2D< T >::~Body2D | ( | ) | [inline] |
Destructor
| int sonus::Body2D< T >::push | ( | T * | v | ) | [inline] |
Pushes one element onto the stack
| v | the element to be pushed |
| T * sonus::Body2D< T >::pop | ( | ) | [inline] |
Pops one element off the stack
| T * sonus::Body2D< T >::getElementAt | ( | int | index | ) | [inline] |
Gets one element at index from stack (element is not popped off the stack). If there is no element at given index a null pointer is returned.
| index | the index of the element to be returned |
| void sonus::Body2D< T >::clear | ( | ) | [inline] |
Clears the stack.
| int sonus::Body2D< T >::getIndexOf | ( | T * | v | ) | [inline] |
Get the index of one element.
| v | the given element |
| int sonus::Body2D< T >::getLength | ( | ) | [inline] |
Get the length of the container
| int sonus::Body2D< T >::getSize | ( | ) | [inline] |
Get the current size of the container
1.5.4