SurgSim::DataStructures Namespace Reference

## Namespaces

| Convert
| Names
| Common strings for NamedData.

## Classes

class | AabbTree
| AabbTree is a tree that is organized by the bounding boxes of the referenced objects, the bounding box used is the Axis Aligned Bounding Box (AABB), with the extents of an AABB describing the min and max of each coordinate for the given object. More...
class | AabbTreeData
| Internal class to hold a list of AABBs and their respective object ids, it can calculate the elements that intersect with a given aabb each node in the AABB tree holds one of these. More...
class | AabbTreeIntersectionVisitor
| Visitor class to collect the items that intersect with a given bounding box. More...
class | AabbTreeNode
| Node class for the AabbTree, this handles groups of items and subdivision if the number of items gets too big. More...
class | BufferedValue
| BufferedValue is a class to enable a representation of two values for one variable, where both values need to be accessible at the same time, one in a thread safe, single threaded context, the other in a thread unsafe context. More...
class | DataGroup
| A collection of NamedData objects. More...
class | DataGroupBuilder
| A class that allows you to build a DataGroup structure. More...
class | DataGroupCopier
| A class that assists in copying from one DataGroup to another, when assignment is not possible. More...
class | EmptyData
| EmptyData class. More...
class | Grid
| n-dimensional grid structure with uniform non-cubic cells This data structure is useful to search for neighbors in a given range (the size of each cell) More...
class | Groups
| Class to wrap grouping operations, gives access to the members of a group and the groups of members. More...
class | Image
| A templated Image class. More...
class | ImageBase
| Base class for Image-like classes. More...
class | ImageMap
| A class that behaves like an Image but maps an existing array of data. More...
class | IndexDirectory
| A simple bidirectional mapping between names (strings) and distinct consecutive non-negative indices. More...
struct | IndexedLocalCoordinate
| A generic (size_t index, Vector coordinate) pair. More...
struct | Location
| A Location defines a local position w.r.t. More...
struct | MeshElement
| Element structure for meshes. More...
class | NamedData
| A templated dictionary in which data can be accessed by name or index, with immutable names & indices. More...
class | NamedDataBuilder
| A class that allows you to build a NamedData structure. More...
class | NamedVariantData
| A NamedData collection of variant data type. More...
struct | NormalData
| Store normal for each triangle in a triangle mesh. More...
class | OctreeNode
| Octree data structure. More...
class | OctreeNodePlyReaderDelegate
| Subclass the OctreeNodePLyReaderDelegateBase class to enable processing of the templated data, this should be specialized to enable specific processing of various extended node types. More...
class | OctreeNodePlyReaderDelegateBase
| Delegate to read Octrees from ply files, this is the abstract base class, to let us modify loading by datatype. More...
class | OctreePathHash
| Enable the OctreePath to be used as a key in an unordered map, if the int range is exceeded this will just push the least significant numbers (root addresses) out of scope, it loses a little bit of address space as octree ids only go from 0-7. More...
class | OptionalValue
| Container class that can indicate whether the object has been assigned a value. More...
class | PlyReader
| Wrapper for the C .ply file parser This class wraps the main functionality for the original C .ply file parser at http://paulbourke.net/dataformats/ply/ it enables customization of the parsing process either through a delegate class or through executing the requestElement and requestProperty functions. More...
class | PlyReaderDelegate
| PlyReaderDelegate abstract class. More...
struct | powerOf3
| Templated function to compute a power of 3 at compile time (useful for template parameter) More...
struct | powerOf3< 0 >
class | SegmentEmptyData
| SegmentEmptyData class This class is to ensure that the static TriangleMesh::m_className in SegmentMesh does not clash with static TriangleMesh<VertexData, EdgeData, EmptyData>. More...
class | SegmentMesh
| Class to hold the type of a SegmentMesh. More...
class | TetrahedronMesh
| Basic class for storing Tetrahedron Meshes, handling basic vertex, edge, triangle and tetrahedron functionality. More...
class | Tree
| Basic tree structure. More...
class | TreeData
| Abstract base class for data stored in a Tree. More...
class | TreeNode
| Basic tree node structure. More...
class | TreeVisitor
| Abstract Class for visitors, this needs to be extended for other tree nodes when necessary return false from handle() to abort traversal. More...
class | TriangleMesh
| Basic class for storing Triangle Meshes, handling basic vertex, edge, and triangle functionality. More...
class | TriangleMeshPlyReaderDelegate
| Implementation of PlyReaderDelegate for simple triangle meshes. More...
struct | Vertex
| Vertex structure for meshes. More...
struct | Vertex< void >
| Specialization of Vertex with no data. More...
class | Vertices
| Base class for mesh structures, handling basic vertex functionality. More...

## Typedefs

typedef std::array< NamedDataCopyMap, 9 > | DataGroupCopyMap
| The type used for copying values between two DataGroups that cannot assign to each other. More...
typedef std::unordered_map< int, int > | NamedDataCopyMap
| The type used for copying values between two NamedData objects that cannot assign to each other. More...
typedef NamedDataBuilder< boost::any > | NamedVariantDataBuilder
typedef std::vector< size_t > | OctreePath
| Typedef of octree path The path is a vector of children indexes (each within 0 to 7) that lead to the specific node the front of the vector holds the index of the root's children. More...
typedef SegmentMesh< EmptyData, EmptyData > | SegmentMeshPlain
typedef TriangleMesh< EmptyData, EmptyData, EmptyData > | TriangleMeshPlain
typedef Vertices< EmptyData > | VerticesPlain

## Enumerations

enum | Neighborhood { NEIGHBORHOOD_NONE = 0x0, NEIGHBORHOOD_FACE = 0x1, NEIGHBORHOOD_EDGE = 0x2, NEIGHBORHOOD_VERTEX = 0x4, NEIGHBORHOOD_ALL = 0x1 | 0x2 | 0x4 }
| Indicates what neighbors to grab. More...
enum | Symbol { SYMBOL_HALT = -1, SYMBOL_DOWN = 0, SYMBOL_UP = 1, SYMBOL_RIGHT = 2, SYMBOL_LEFT = 3, SYMBOL_BACK = 4, SYMBOL_FRONT = 5 }
| Direction code for the neighborhood search. More...

## Functions

template<typename charT , typename traits , typename T >
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const SurgSim::DataStructures::OptionalValue< T > &val)
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const SurgSim::DataStructures::OptionalValue< SurgSim::Math::Vector3d > &val)
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const SurgSim::DataStructures::IndexedLocalCoordinate &val)
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const Location &loc)
SurgSim::DataStructures::OctreePath | getNeighbor (const OctreePath &origin, const std::array< Symbol, 3 > &direction)
| Calculate the neighbor of an node in the octree by traversing a state machine, see http://ww1.ucmss.com/books/LFS/CSREA2006/MSV4517.pdf for detailed description. More...
std::vector< OctreePath > | getNeighbors (const OctreePath &origin, int type)
| Fetch a list of neighbors, indicated by the type, Face, Edge and Vertex are possible types and can be combined via OR. More...

## Typedef Documentation

## DataGroupCopyMap

typedef std::array<NamedDataCopyMap, 9> SurgSim::DataStructures::DataGroupCopyMap

The type used for copying values between two DataGroups that cannot assign to each other.

## NamedDataCopyMap

typedef std::unordered_map<int, int> SurgSim::DataStructures::NamedDataCopyMap

The type used for copying values between two NamedData objects that cannot assign to each other.

The keys are the source indices. The values are the target indices.

## NamedVariantDataBuilder

typedef NamedDataBuilder<boost::any> SurgSim::DataStructures::NamedVariantDataBuilder

## OctreePath

typedef std::vector<size_t> SurgSim::DataStructures::OctreePath

Typedef of octree path The path is a vector of children indexes (each within 0 to 7) that lead to the specific node the front of the vector holds the index of the root's children.

## SegmentMeshPlain

typedef SegmentMesh<EmptyData, EmptyData> SurgSim::DataStructures::SegmentMeshPlain

## TriangleMeshPlain

typedef TriangleMesh<EmptyData, EmptyData, EmptyData> SurgSim::DataStructures::TriangleMeshPlain

## VerticesPlain

typedef Vertices<EmptyData> SurgSim::DataStructures::VerticesPlain

## Enumeration Type Documentation

## Neighborhood

enum SurgSim::DataStructures::Neighborhood

Indicates what neighbors to grab.

Enumerator
NEIGHBORHOOD_NONE |
NEIGHBORHOOD_FACE |
NEIGHBORHOOD_EDGE |
NEIGHBORHOOD_VERTEX |
NEIGHBORHOOD_ALL |

## Symbol

enum SurgSim::DataStructures::Symbol

Direction code for the neighborhood search.

Enumerator
SYMBOL_HALT |
SYMBOL_DOWN |
SYMBOL_UP |
SYMBOL_RIGHT |
SYMBOL_LEFT |
SYMBOL_BACK |
SYMBOL_FRONT |

## Function Documentation

## getNeighbor()

OctreePath SurgSim::DataStructures::getNeighbor | ( | const OctreePath & | origin,
|  | const std::array< Symbol, 3 > & | direction
| ) |  |

Calculate the neighbor of an node in the octree by traversing a state machine, see http://ww1.ucmss.com/books/LFS/CSREA2006/MSV4517.pdf for detailed description.

The information about the location of a nodes neighbor is encoded in a state machine, this machine is traversed until a 'Halt' instruction is found. If the neighbor is across a boundary on the octree, a new search direction is determined by the algorithm.

Note
  The numbering in the paper and our numbering is slightly different, this means the following transformations took place. a) The colums where reordered to match our numbering b) All the numbers where replaced to match out numbering The number changes where as following: 0 => 6, 1 => 7, 2 => 4, 3 => 5, 4 => 2, 5 => 3, 6 => 0, 7 => 1

Parameters

  origin | the node whose neighbor is needed
  direction | a set of directions, for face neighbors use 1, for edge neighbors use 2 and for vertex neighbors use 3 direction, fill the other spots with SYMBOL_HALT. E.g. to find the left neighbor use {SYMBOL_LEFT, SYMBOL_HALT, SYMBOL_HALT}, for the vertex neighber on the upper left front corner use {SYMBOL_LEFT, SYMBOLD_FRONT, SYMBOL_UP}

Returns
  a OctreePath to the correct neighbor, empty if the neighbor is outside of the tree

## getNeighbors()

std::vector< OctreePath > SurgSim::DataStructures::getNeighbors | ( | const OctreePath & | origin,
|  | int | type
| ) |  |

Fetch a list of neighbors, indicated by the type, Face, Edge and Vertex are possible types and can be combined via OR.

Parameters

  origin | the node whose neighbor is needed
  type | the kind of neighborhood that is needed,

See also
  Neighborhood

Returns
  list of paths with neighbors of the node at origin

## operator<<() [1/4]

template<typename charT , typename traits >

std::basic_ostream<charT, traits>& SurgSim::DataStructures::operator<< | ( | std::basic_ostream< charT, traits > & | out,
|  | const SurgSim::DataStructures::OptionalValue< SurgSim::Math::Vector3d > & | val
| ) |  |

## operator<<() [2/4]

template<typename charT , typename traits >

std::basic_ostream<charT, traits>& SurgSim::DataStructures::operator<< | ( | std::basic_ostream< charT, traits > & | out,
|  | const Location & | loc
| ) |  |

## operator<<() [3/4]

template<typename charT , typename traits >

std::basic_ostream<charT, traits>& SurgSim::DataStructures::operator<< | ( | std::basic_ostream< charT, traits > & | out,
|  | const SurgSim::DataStructures::IndexedLocalCoordinate & | val
| ) |  |

## operator<<() [4/4]

template<typename charT , typename traits , typename T >

std::basic_ostream<charT, traits>& SurgSim::DataStructures::operator<< | ( | std::basic_ostream< charT, traits > & | out,
|  | const SurgSim::DataStructures::OptionalValue< T > & | val
| ) |  |