Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

OpenTissue::bvh::BVHGraph< bvh_type > Class Template Reference

#include <bvh_graph.h>

List of all members.

Public Types

typedef BVHGraph< bvh_type > graph_type
typedef BVHGraphNode< bvh_type > node_type
typedef BVHGraphEdge< bvh_type > edge_type
typedef boost::shared_ptr
< node_type
node_ptr_type
typedef boost::shared_ptr
< edge_type
edge_ptr_type
typedef boost::shared_ptr
< node_type const > 
const_node_ptr_type
typedef boost::shared_ptr
< edge_type const > 
const_edge_ptr_type
typedef
bvh_type::geometry_container 
geometry_container
typedef bvh_type::geometry_type geometry_type
typedef bvh_type::volume_type volume_type
typedef std::list< volume_typevolume_container
typedef float real_type
typedef std::list< edge_ptr_typeedge_ptr_container
typedef
edge_ptr_container::iterator 
edge_ptr_iterator
typedef
edge_ptr_container::const_iterator 
const_edge_ptr_iterator
typedef
boost::indirect_iterator
< edge_ptr_iterator, edge_type
edge_iterator
typedef
boost::indirect_iterator
< const_edge_ptr_iterator,
edge_type
const_edge_iterator
typedef std::list< node_ptr_typenode_ptr_container
typedef
node_ptr_container::iterator 
node_ptr_iterator
typedef
node_ptr_container::const_iterator 
const_node_ptr_iterator
typedef
boost::indirect_iterator
< node_ptr_iterator, node_type
node_iterator
typedef
boost::indirect_iterator
< const_node_ptr_iterator,
node_type
const_node_iterator

Public Member Functions

edge_iterator edge_begin ()
edge_iterator edge_end ()
const_edge_iterator edge_begin () const
const_edge_iterator edge_end () const
edge_ptr_iterator edge_ptr_begin ()
edge_ptr_iterator edge_ptr_end ()
const_edge_ptr_iterator edge_ptr_begin () const
const_edge_ptr_iterator edge_ptr_end () const
node_iterator node_begin ()
node_iterator node_end ()
const_node_iterator node_begin () const
const_node_iterator node_end () const
node_ptr_iterator node_ptr_begin ()
node_ptr_iterator node_ptr_end ()
const_node_ptr_iterator node_ptr_begin () const
const_node_ptr_iterator node_ptr_end () const
 BVHGraph ()
 ~BVHGraph ()
std::size_t size_edges () const
std::size_t size_nodes () const
node_ptr_type insert (geometry_type const &g)
node_ptr_type insert (volume_type const &volume)
node_ptr_type insert (volume_type const &volume, geometry_type const &g)
node_ptr_type insert (volume_type const &volume, geometry_container &geometry)
edge_ptr_type insert (node_ptr_type A, node_ptr_type B)
void clear ()
node_ptr_type collapse (edge_ptr_type edge)
void remove_sub_nodes (node_ptr_type node)

Public Attributes

edge_ptr_container m_edges
 All edges in graph.

Protected Member Functions

void remove (edge_ptr_type edge)
void remove (node_ptr_type node)

Protected Attributes

node_ptr_container m_nodes
 All nodes in graph.

Detailed Description

template<typename bvh_type>
class OpenTissue::bvh::BVHGraph< bvh_type >

A BVH Graph. This data structure is used exclusively for bottom-up construction of BVHs.


Member Typedef Documentation

template<typename bvh_type >
typedef boost::indirect_iterator<const_edge_ptr_iterator,edge_type> OpenTissue::bvh::BVHGraph< bvh_type >::const_edge_iterator
template<typename bvh_type >
typedef edge_ptr_container::const_iterator OpenTissue::bvh::BVHGraph< bvh_type >::const_edge_ptr_iterator
template<typename bvh_type >
typedef boost::shared_ptr<edge_type const> OpenTissue::bvh::BVHGraph< bvh_type >::const_edge_ptr_type
template<typename bvh_type >
typedef boost::indirect_iterator<const_node_ptr_iterator,node_type> OpenTissue::bvh::BVHGraph< bvh_type >::const_node_iterator
template<typename bvh_type >
typedef node_ptr_container::const_iterator OpenTissue::bvh::BVHGraph< bvh_type >::const_node_ptr_iterator
template<typename bvh_type >
typedef boost::shared_ptr<node_type const> OpenTissue::bvh::BVHGraph< bvh_type >::const_node_ptr_type
template<typename bvh_type >
typedef boost::indirect_iterator<edge_ptr_iterator,edge_type> OpenTissue::bvh::BVHGraph< bvh_type >::edge_iterator
template<typename bvh_type >
typedef std::list< edge_ptr_type > OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_container
template<typename bvh_type >
typedef edge_ptr_container::iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_iterator
template<typename bvh_type >
typedef boost::shared_ptr<edge_type> OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_type
template<typename bvh_type >
typedef BVHGraphEdge<bvh_type> OpenTissue::bvh::BVHGraph< bvh_type >::edge_type
template<typename bvh_type >
typedef bvh_type::geometry_container OpenTissue::bvh::BVHGraph< bvh_type >::geometry_container
template<typename bvh_type >
typedef bvh_type::geometry_type OpenTissue::bvh::BVHGraph< bvh_type >::geometry_type
template<typename bvh_type >
typedef BVHGraph<bvh_type> OpenTissue::bvh::BVHGraph< bvh_type >::graph_type
template<typename bvh_type >
typedef boost::indirect_iterator<node_ptr_iterator,node_type> OpenTissue::bvh::BVHGraph< bvh_type >::node_iterator
template<typename bvh_type >
typedef std::list< node_ptr_type > OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_container
template<typename bvh_type >
typedef node_ptr_container::iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_iterator
template<typename bvh_type >
typedef boost::shared_ptr<node_type> OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_type
template<typename bvh_type >
typedef BVHGraphNode<bvh_type> OpenTissue::bvh::BVHGraph< bvh_type >::node_type
template<typename bvh_type >
typedef float OpenTissue::bvh::BVHGraph< bvh_type >::real_type
template<typename bvh_type >
typedef std::list<volume_type> OpenTissue::bvh::BVHGraph< bvh_type >::volume_container
template<typename bvh_type >
typedef bvh_type::volume_type OpenTissue::bvh::BVHGraph< bvh_type >::volume_type

Constructor & Destructor Documentation

template<typename bvh_type >
OpenTissue::bvh::BVHGraph< bvh_type >::BVHGraph (  )  [inline]
template<typename bvh_type >
OpenTissue::bvh::BVHGraph< bvh_type >::~BVHGraph (  )  [inline]

Member Function Documentation

template<typename bvh_type >
void OpenTissue::bvh::BVHGraph< bvh_type >::clear (  )  [inline]

Clear Graph. Removes all edges and nodes.

template<typename bvh_type >
node_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::collapse ( edge_ptr_type  edge  )  [inline]

Edge Collapse.

Parameters:
edge A pointer to the edge that should be collapsed into a node.
Returns:
A pointer to the new node that corresponds to the collapsed edge. The previous incident nodes are now sub-nodes of the new node.
template<typename bvh_type >
edge_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_begin (  )  [inline]
template<typename bvh_type >
const_edge_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_begin (  )  const [inline]
template<typename bvh_type >
edge_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_end (  )  [inline]
template<typename bvh_type >
const_edge_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_end (  )  const [inline]
template<typename bvh_type >
edge_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_begin (  )  [inline]
template<typename bvh_type >
const_edge_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_begin (  )  const [inline]
template<typename bvh_type >
const_edge_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_end (  )  const [inline]
template<typename bvh_type >
edge_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::edge_ptr_end (  )  [inline]
template<typename bvh_type >
edge_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::insert ( node_ptr_type  A,
node_ptr_type  B 
) [inline]

Insert Edge. This method inserts and edge between the two specified nodes.

The method guards against self-loofs and redudant edges, both of which is illegal.

Parameters:
A A pointer to the first node.
B A pointer to the second node.
Returns:
A pointer to the newly created edge.
template<typename bvh_type >
node_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::insert ( geometry_type const &  g  )  [inline]

Insert Node.

Parameters:
geometry The initial geometry covered by the new node.
Returns:
A pointer to the new node.
template<typename bvh_type >
node_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::insert ( volume_type const &  volume  )  [inline]

Insert Node.

Parameters:
volume The initial volume of the new node.
Returns:
A pointer to the new node.
template<typename bvh_type >
node_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::insert ( volume_type const &  volume,
geometry_type const &  g 
) [inline]

Insert Node.

Parameters:
volume The initial volume of the new node.
geometry The initial geometry covered by the new node.
Returns:
A pointer to the new node.
template<typename bvh_type >
node_ptr_type OpenTissue::bvh::BVHGraph< bvh_type >::insert ( volume_type const &  volume,
geometry_container geometry 
) [inline]

Insert Node.

Parameters:
volume The initial volume of the new node.
geometry The initial geometry covered by the new node.
Returns:
A pointer to the new node.
template<typename bvh_type >
node_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_begin (  )  [inline]
template<typename bvh_type >
const_node_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_begin (  )  const [inline]
template<typename bvh_type >
node_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_end (  )  [inline]
template<typename bvh_type >
const_node_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_end (  )  const [inline]
template<typename bvh_type >
node_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_begin (  )  [inline]
template<typename bvh_type >
const_node_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_begin (  )  const [inline]
template<typename bvh_type >
node_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_end (  )  [inline]
template<typename bvh_type >
const_node_ptr_iterator OpenTissue::bvh::BVHGraph< bvh_type >::node_ptr_end (  )  const [inline]
template<typename bvh_type >
void OpenTissue::bvh::BVHGraph< bvh_type >::remove ( node_ptr_type  node  )  [inline, protected]

Remove Node. This method is invoked by the remove_subnodes() method.

Parameters:
node A pointer to the node that should be removed.
template<typename bvh_type >
void OpenTissue::bvh::BVHGraph< bvh_type >::remove ( edge_ptr_type  edge  )  [inline, protected]

Remove Edge. This method is invoked by the collapse method.

Parameters:
edge A poiniter to the edge that should be removed.
template<typename bvh_type >
void OpenTissue::bvh::BVHGraph< bvh_type >::remove_sub_nodes ( node_ptr_type  node  )  [inline]

Remove Subnodes. This method is invoked by the BottomUpConstructor algorithm.

Parameters:
node A pointer to the node where all subnode should be removed.
template<typename bvh_type >
std::size_t OpenTissue::bvh::BVHGraph< bvh_type >::size_edges (  )  const [inline]

Retrive the number of edges in graph.

Returns:
Number of edges.
template<typename bvh_type >
std::size_t OpenTissue::bvh::BVHGraph< bvh_type >::size_nodes (  )  const [inline]

Retrive the number of nodes in graph.

Returns:
Number of nodes.

Member Data Documentation

template<typename bvh_type >
edge_ptr_container OpenTissue::bvh::BVHGraph< bvh_type >::m_edges

All edges in graph.

template<typename bvh_type >
node_ptr_container OpenTissue::bvh::BVHGraph< bvh_type >::m_nodes [protected]

All nodes in graph.


The documentation for this class was generated from the following file: