vtf-logo

BRep< 2, T > Class Template Reference

A class for a b-rep in 2-D. More...

List of all members.

Public Types

typedef Base::SizeType SizeType
 The size type.
typedef T Number
 The number type.
typedef ads::FixedArray<
2, Number
Point
 A point in 2-D.
typedef ads::FixedArray<
2, int > 
Index
 A multi-index in 2-D.
typedef geom::BBox< 2, NumberBBox
 A bounding box.
typedef geom::RegularGrid<
2, T > 
Lattice
 The lattice.
typedef Grid< 2, NumberGrid
 The grid type.

Public Member Functions

 BRep ()
 Default constructor. An empty b-rep.
 BRep (const BRep &other)
 Copy constructor.
BRep & operator= (const BRep &other)
 Assignment operator.
 ~BRep ()
 Trivial destructor.
 BRep (const SizeType verticesSize, const void *vertices, const SizeType simplicesSize, const void *indexedSimplices, const BBox &cartesianDomain, const Number maximumDistance)
 Make from vertices and faces. Throw away irrelevant faces.
void make (const SizeType verticesSize, const void *vertices, const SizeType simplicesSize, const void *indexedSimplices)
 Make from vertices and faces.
void make (const SizeType verticesSize, const void *vertices, const SizeType simplicesSize, const void *indexedSimplices, const BBox &cartesianDomain, const Number maximumDistance)
 Make from vertices and faces.
int getMaximimFaceIdentifier () const
 Return the maximum face identifier.
int getRightFace (const int vertexIndex) const
int getLeftFace (const int vertexIndex) const
int getMaximumFaceIdentifier () const
 Return the maximum face identifier.
std::pair< int, int > computeClosestPoint (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance, bool arePerformingLocalClipping, int arePerformingGlobalClipping, const std::vector< Point > &globalPoints) const
 Calculate the signed distance, closest point, etc. for all the points in the grid.
std::pair< int, int > computeClosestPointUnsigned (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance, bool arePerformingLocalClipping, int arePerformingGlobalClipping, const std::vector< Point > &globalPoints) const
 Calculate the unsigned distance, closest point, etc. for all the points in the grid.
std::pair< int, int > computeClosestPointUsingBBox (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance) const
 Use bounding boxes around the characteristic polygons instead of polygon scan conversion.
std::pair< int, int > computeClosestPointUnsignedUsingBBox (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance) const
 Use bounding boxes around the characteristic polygons instead of polygon scan conversion.
std::pair< int, int > computeClosestPointUsingBruteForce (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance) const
 Use bounding boxes around the primitives instead of polygon scan conversion.
std::pair< int, int > computeClosestPointUnsignedUsingBruteForce (const Lattice &lattice, std::vector< Grid > *grids, Number maximumDistance) const
 Use bounding boxes around the primitives instead of polygon scan conversion.
BBox computeBBox () const
 Return the bounding box that contains the mesh.
void displayInformation (std::ostream &out) const
 Display information about the b-rep.
void display (std::ostream &out) const
 Display the b-rep.


Detailed Description

template<typename T>
class BRep< 2, T >

A class for a b-rep in 2-D.


Constructor & Destructor Documentation

template<typename T>
BRep< 2, T >::BRep ( const SizeType  verticesSize,
const void *  vertices,
const SizeType  simplicesSize,
const void *  indexedSimplices,
const BBox cartesianDomain,
const Number  maximumDistance 
) [inline]

Make from vertices and faces. Throw away irrelevant faces.

Parameters:
verticesSize The number of vertices.
vertices The vertices.
simplicesSize The number of faces.
indexedSimplices The indexed faces.
cartesianDomain is the domain of interest.
maximumDistance is how far the distance will be computed.
Make the b-rep from vertex coordinates and face indices. Clip the b-rep so that faces outside the relevant Cartesian domain are thrown away. (Any face within maximumDistance of cartesianDomain is regarded as relevant.)

This constructor calls make() with the same arguments.


Member Function Documentation

template<typename T>
std::pair< int, int > BRep< 2, T >::computeClosestPoint ( const Lattice lattice,
std::vector< Grid > *  grids,
Number  maximumDistance,
bool  arePerformingLocalClipping,
int  arePerformingGlobalClipping,
const std::vector< Point > &  globalPoints 
) const [inline]

Calculate the signed distance, closest point, etc. for all the points in the grid.

Parameters:
lattice is the lattice on which the grids lie.
grids is the container of grids. Each one holds the distance, closest point, etc. arrays.
maximumDistance is the distance to calculate distance away from the curve.
arePerformingLocalClipping determines whether local clipping will be performed on the characteristic polygons.
arePerformingGlobalClipping can be 0, 1 or 2. 0 indicates that no global clipping will be done. 1 indicates limited global clipping; 2 indicates full global clipping.
globalPoints is the set of points used in global clipping.
Returns:
the number of points scan converted (counting multiplicities) and the number of distances set.

template<typename T>
std::pair< int, int > BRep< 2, T >::computeClosestPointUnsigned ( const Lattice lattice,
std::vector< Grid > *  grids,
Number  maximumDistance,
bool  arePerformingLocalClipping,
int  arePerformingGlobalClipping,
const std::vector< Point > &  globalPoints 
) const [inline]

Calculate the unsigned distance, closest point, etc. for all the points in the grid.

Parameters:
lattice is the lattice on which the grids lie.
grids is the container of grids. Each one holds the distance, closest point, etc. arrays.
maximumDistance is the distance to calculate distance away from the curve.
arePerformingLocalClipping determines whether local clipping will be performed on the characteristic polygons.
arePerformingGlobalClipping can be 0, 1 or 2. 0 indicates that no global clipping will be done. 1 indicates limited global clipping; 2 indicates full global clipping.
globalPoints is the set of points used in global clipping.
Returns:
the number of points scan converted (counting multiplicities) and the number of distances set.

template<typename T>
void BRep< 2, T >::displayInformation ( std::ostream &  out  )  const [inline]

Display information about the b-rep.

Report if the manifold is closed.

template<typename T>
void BRep< 2, T >::make ( const SizeType  verticesSize,
const void *  vertices,
const SizeType  simplicesSize,
const void *  indexedSimplices,
const BBox cartesianDomain,
const Number  maximumDistance 
) [inline]

Make from vertices and faces.

Parameters:
verticesSize The number of vertices.
vertices The vertices.
simplicesSize The number of faces.
indexedSimplices The indexed faces.
cartesianDomain is the domain of interest.
maximumDistance is how far the distance will be computed.
Make the b-rep from vertex coordinates and face indices. Clip the b-rep so that faces outside the relevant Cartesian domain are thrown away. (Any face within maximumDistance of cartesianDomain is regarded as relevant.)

template<typename T>
void BRep< 2, T >::make ( const SizeType  verticesSize,
const void *  vertices,
const SizeType  simplicesSize,
const void *  indexedSimplices 
) [inline]

Make from vertices and faces.

Parameters:
verticesSize The number of vertices.
vertices The vertices.
simplicesSize The number of triangle faces.
indexedSimplices The indexed triangle faces.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:55:43 2007 for Closest Point Transform by  doxygen 1.4.7