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

OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ > Class Template Reference

#include <geometry_tetrahedron_z_slicer.h>

List of all members.

Public Types

typedef vector3_type_ vector3_type
typedef vector3_type::value_type real_type

Public Member Functions

 ZTetrahedronSlicer (vector3_type const &p0, vector3_type const &p1, vector3_type const &p2, vector3_type const &p3)
unsigned int intersect (real_type const &z, vector3_type slice[4]) const

Protected Member Functions

bool swap (int i, int j)
void intersect (real_type const &z, int i, int j, vector3_type &p) const

Protected Attributes

vector3_type m_p [4]
 Nodes of tetrahedron.

Detailed Description

template<typename vector3_type_>
class OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >

Specialized Tetrahedron Slicer. Cut a tetrahedron with a specified z-plane and returns the sliced tetrahedron.

This code was originally implemented by Andreas Bæentzen, IMM (jab@imm.dtu.dk).


Member Typedef Documentation

template<typename vector3_type_>
typedef vector3_type::value_type OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::real_type
template<typename vector3_type_>
typedef vector3_type_ OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::vector3_type

Constructor & Destructor Documentation

template<typename vector3_type_>
OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::ZTetrahedronSlicer ( vector3_type const &  p0,
vector3_type const &  p1,
vector3_type const &  p2,
vector3_type const &  p3 
) [inline]

Member Function Documentation

template<typename vector3_type_>
void OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::intersect ( real_type const &  z,
int  i,
int  j,
vector3_type p 
) const [inline, protected]

Computes intersection point of edge going from node i towards node j

Parameters:
z The z value, indicating the z-plane aginst which the edge is tested.
i The node index of the starting node (got lowest z-value).
j The node index of the ending node (got highest z-value).
p Upon return this argument holds the intersection point.
template<typename vector3_type_>
unsigned int OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::intersect ( real_type const &  z,
vector3_type  slice[4] 
) const [inline]

Compute Intersection Slice of Tetrahedron and Z-plane.

Parameters:
z The z-plane to slice against.
slice Upon return holds the intersection points of the sliced tetrahedron.
Returns:
The number of vertices in the sliced tetrahedron.
template<typename vector3_type_>
bool OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::swap ( int  i,
int  j 
) [inline, protected]

Swap the order of two nodes if their z-value allows it.

Parameters:
i A node index.
j A node index.
Returns:
true if swapped otherwise false.

Member Data Documentation

template<typename vector3_type_>
vector3_type OpenTissue::geometry::ZTetrahedronSlicer< vector3_type_ >::m_p[4] [protected]

Nodes of tetrahedron.


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