#include <tgNodes.h>
|
| tgNodes () |
|
| tgNodes (std::vector< btVector3 > &nodes) |
|
| tgNodes (std::vector< tgNode > &nodes) |
|
| ~tgNodes () |
|
void | setNode (int key, const btVector3 &node) |
|
void | setNode (int key, const tgNode &node) |
|
std::vector< tgNode > & | getNodes () |
|
const std::vector< tgNode > & | getNodes () const |
|
bool | nodeExists (int key) const |
|
int | addNode (const btVector3 &node) |
|
int | addNode (const btVector3 &node, std::string tags) |
|
int | addNode (const tgNode &node) |
|
int | addNode (double x, double y, double z) |
|
int | addNode (double x, double y, double z, std::string tags) |
|
tgPair | pair (int from, int to, std::string tags="") |
|
void | move (const btVector3 &offset) |
|
void | moveNode (int idx, const btVector3 offset) |
|
void | addRotation (const btVector3 &fixedPoint, const btVector3 &axis, double angle) |
|
void | addRotation (const btVector3 &fixedPoint, const btVector3 &fromOrientation, const btVector3 &toOrientation) |
|
void | addRotation (const btVector3 &fixedPoint, const btQuaternion &rotation) |
|
std::vector< tgNode * > | find (std::string tags) |
|
int | size () const |
|
std::vector< tgNode * > | findAll () |
|
std::vector< tgNode * > | findUntagged () |
|
bool | contains (const tgNode &needle) const |
|
tgNode & | operator[] (int key) |
|
const tgNode & | operator[] (int key) const |
|
tgNode & | operator-= (const tgNode &other) |
|
tgNode & | operator-= (const std::vector< tgNode * > other) |
|
tgNode & | operator+= (const tgNode &other) |
|
tgNode & | operator+= (const std::vector< tgNode * > other) |
|
|
static bool | contains (std::vector< tgNode * > haystack, const tgNode *needle) |
|
|
void | assertNodeExists (int key) const |
|
void | assertUniqueNodes () const |
|
int | addElement (tgNodeelement) |
|
void | addElements (std::vector< tgNode * > elements) |
|
void | setElement (int key, tgNodeelement) |
|
std::vector< tgNode > & | getElements () |
|
const std::vector< tgNode > & | getElements () const |
|
void | removeElement (const tgNode &element) |
|
void | removeElement (const tgNode *element) |
|
void | removeElements (const std::vector< tgNode > &elements) |
|
void | removeElements (const std::vector< tgNode * > &elements) |
|
tgNode & | getElement (int key) |
|
const tgNode & | getElement (int key) const |
|
bool | keyExists (int key) const |
|
bool | elementExists (const tgNode &element) const |
|
void | assertKeyExists (int key, std::string message="Element at index does not exist") const |
|
void | assertUnique (tgNode &element, std::string message="Taggable elements must be unique.") |
|
void | assertUniqueElements (std::string message="Taggable elements must be unique.") const |
|
tgTaggable * | _taggable (tgNode *obj) |
|
|
std::map< int, std::string > | m_names |
|
A node is an attachment point. The client identifies nodes with an integer index or selects them using tags (see tgTaggable). : add error checking
- Todo:
- : move operator[] out of tgTaggables into here
Definition at line 49 of file tgNodes.h.
Create an empty set of nodes.
Definition at line 55 of file tgNodes.h.
tgNodes::tgNodes |
( |
std::vector< btVector3 > & |
nodes | ) |
|
|
inline |
Create a set of nodes given a vector of btVector3.
- Parameters
-
[in] | nodes | a vector of btVector3; the elements must be unique |
- Author
- Lee Brownston
- Date
- Wed 26 Feb 2014
Definition at line 65 of file tgNodes.h.
The destructor has nothing to do.
Definition at line 84 of file tgNodes.h.
int tgNodes::addNode |
( |
const btVector3 & |
node | ) |
|
|
inline |
Add a node and return the created index.
- Parameters
-
- Returns
- the key under which btVector3 is stored
- Todo:
- If node is already a value in the map, return its key.
Definition at line 129 of file tgNodes.h.
int tgNodes::addNode |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inline |
Add a node specified by its coordinates and return the created index.
- Parameters
-
[in] | x | the x coordinate of the btVector3 |
[in] | y | the y coordinate of the btVector3 |
[in] | z | the z coordinate of the btVector3 |
- Returns
- the key under which btVector3 is stored : Do we need this really? It complicates things like named nodes...
- Todo:
- If node is already a value in the map, return its index.
Definition at line 153 of file tgNodes.h.
Return a vector of pointers to Ts that have all of the specified tags.
Definition at line 64 of file tgTaggables.h.
Is the index within range.
- Parameters
-
- Return values
-
true | if key is within range |
false | if key is not within range |
Definition at line 229 of file tgTaggables.h.
void tgNodes::move |
( |
const btVector3 & |
offset | ) |
|
|
inline |
Add the given btVector3 to all btVector3 objects in elements.
- Parameters
-
[in] | offset | a btVector3 to add to all the btVector3 objects in m_nodes |
- Todo:
- use std::for_each()
Definition at line 175 of file tgNodes.h.
bool tgNodes::nodeExists |
( |
int |
key | ) |
const |
|
inline |
Is the index within range.
- Parameters
-
- Return values
-
true | if key is within range |
false | if key is not within range |
Definition at line 118 of file tgNodes.h.
Remove the elements contained in 'other' from this object
Definition at line 136 of file tgTaggables.h.
Return a non-const reference to the element that is indexed by the int key. It must be in m_elements.
- Parameters
-
[in] | key | the key of the element to retrieve a const reference to the element that is indexed by idx |
Definition at line 123 of file tgTaggables.h.
tgPair tgNodes::pair |
( |
int |
from, |
|
|
int |
to, |
|
|
std::string |
tags = "" |
|
) |
| |
void tgNodes::setNode |
( |
int |
key, |
|
|
const btVector3 & |
node |
|
) |
| |
|
inline |
Assign the given vector to the given key.
- Parameters
-
[in] | node | a btVector3 |
| idx] | the integer by which the btVector3 is indexed |
Definition at line 91 of file tgNodes.h.
The documentation for this class was generated from the following files: