ScanConversionPolyhedron< T > Class Template Reference

A class for a polyhedron in 3-D designed for scan conversion. More...

#include <ScanConversionPolyhedron.h>

List of all members.

Public Types

typedef T Number
 The floating point number type.
typedef ads::FixedArray
< 3, Number
Point
 The representation of a point in 3 dimensions.
typedef SegmentMath< 3, NumberSegment
 A line segment that supports mathematical operations.

Public Member Functions

Constructors etc.

 ScanConversionPolyhedron ()
 Default constructor. Uninitialized memory.
 ScanConversionPolyhedron (const ScanConversionPolyhedron &other)
 Copy constructor.
ScanConversionPolyhedronoperator= (const ScanConversionPolyhedron &other)
 Assignment operator.
ScanConversionPolyhedronoperator= (const IndexedEdgePolyhedron< Number > &x)
 Assignment operator from an IndexedEdgePolyhedron.
 ~ScanConversionPolyhedron ()
 Trivial destructor.
Mathematical functions.

void computeBBox (BBox< 3, Number > *bb) const
 Make a BBox containing the polyhedron.
void convertLocationsToIndices (const RegularGrid< 3, Number > &grid)
 Convert the Cartesian coordinates of this polyhedron to index coordinates.
template<typename IndexOutputIterator >
void scanConvert (IndexOutputIterator coordinates, const RegularGrid< 3, Number > &grid) const
 Scan convert the polyhedron.
Accesors.

const std::vector< Segment > & getEdges () const
 Return a const reference to the edges.
Manipulators.

void clear ()
 Clear the edges.
void insertEdge (const Point &p, const Point &q)
 Add an edge to the polyhedron.

Related Functions

(Note that these are not member functions.)



template<typename T >
std::ostream & operator<< (std::ostream &out, const ScanConversionPolyhedron< T > &polyhedron)
 Write the edges.
template<typename T >
void mathematicaPrint (std::ostream &out, const ScanConversionPolyhedron< T > &polyhedron)
 Write the edges in Mathematica readable format.
template<typename T >
std::istream & operator>> (std::istream &in, ScanConversionPolyhedron< T > &polyhedron)
 Read as a list of edges.
template<typename T >
bool operator== (const ScanConversionPolyhedron< T > &a, const ScanConversionPolyhedron< T > &b)
 Return true if the polyhedra are equal.
template<typename T >
bool operator!= (const ScanConversionPolyhedron< T > &a, const ScanConversionPolyhedron< T > &b)
 Return true if the polyhedra are not equal.

Detailed Description

template<typename T = double>
class ScanConversionPolyhedron< T >

A class for a polyhedron in 3-D designed for scan conversion.

Parameters:
T is the number type. By default it is double.

As the name suggests, this class is designed for 3-D polyhedron scan conversion. The Polyhedron is represented as a set of edges. The edges support mathematical operations that enable efficient slicing to obtain polygons. This, in turn, enables efficient scan conversion.


Member Function Documentation

template<typename T = double>
template<typename IndexOutputIterator >
void ScanConversionPolyhedron< T >::scanConvert ( IndexOutputIterator  coordinates,
const RegularGrid< 3, Number > &  grid 
) const [inline]

Scan convert the polyhedron.

Parameters:
coordinates is an output iterator for the set of coordinates inside.
grid describes the grid on which to perform the scan conversion.

Friends And Related Function Documentation

template<typename T >
void mathematicaPrint ( std::ostream &  out,
const ScanConversionPolyhedron< T > &  polyhedron 
) [related]

Write the edges in Mathematica readable format.

template<typename T >
bool operator!= ( const ScanConversionPolyhedron< T > &  a,
const ScanConversionPolyhedron< T > &  b 
) [related]

Return true if the polyhedra are not equal.

template<typename T >
std::ostream & operator<< ( std::ostream &  out,
const ScanConversionPolyhedron< T > &  polyhedron 
) [related]

Write the edges.

template<typename T >
bool operator== ( const ScanConversionPolyhedron< T > &  a,
const ScanConversionPolyhedron< T > &  b 
) [related]

Return true if the polyhedra are equal.

References ScanConversionPolyhedron< T >::getEdges().

template<typename T >
std::istream & operator>> ( std::istream &  in,
ScanConversionPolyhedron< T > &  polyhedron 
) [related]

Read as a list of edges.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3