A class for a polyhedron in 3-D designed for scan conversion. More...
#include <ScanConversionPolyhedron.h>
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, Number > | Segment |
| A line segment that supports mathematical operations. | |
Public Member Functions | |
Constructors etc. | |
| ScanConversionPolyhedron () | |
| Default constructor. Uninitialized memory. | |
| ScanConversionPolyhedron (const ScanConversionPolyhedron &other) | |
| Copy constructor. | |
| ScanConversionPolyhedron & | operator= (const ScanConversionPolyhedron &other) |
| Assignment operator. | |
| ScanConversionPolyhedron & | operator= (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. | |
A class for a polyhedron in 3-D designed for scan conversion.
| 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.
| void ScanConversionPolyhedron< T >::scanConvert | ( | IndexOutputIterator | coordinates, | |
| const RegularGrid< 3, Number > & | grid | |||
| ) | const [inline] |
Scan convert the polyhedron.
| coordinates | is an output iterator for the set of coordinates inside. | |
| grid | describes the grid on which to perform the scan conversion. |
| void mathematicaPrint | ( | std::ostream & | out, | |
| const ScanConversionPolyhedron< T > & | polyhedron | |||
| ) | [related] |
Write the edges in Mathematica readable format.
| bool operator!= | ( | const ScanConversionPolyhedron< T > & | a, | |
| const ScanConversionPolyhedron< T > & | b | |||
| ) | [related] |
Return true if the polyhedra are not equal.
| std::ostream & operator<< | ( | std::ostream & | out, | |
| const ScanConversionPolyhedron< T > & | polyhedron | |||
| ) | [related] |
Write the edges.
| bool operator== | ( | const ScanConversionPolyhedron< T > & | a, | |
| const ScanConversionPolyhedron< T > & | b | |||
| ) | [related] |
Return true if the polyhedra are equal.
References ScanConversionPolyhedron< T >::getEdges().
| std::istream & operator>> | ( | std::istream & | in, | |
| ScanConversionPolyhedron< T > & | polyhedron | |||
| ) | [related] |
Read as a list of edges.
1.6.3