Concrete class providing a flat geometry (in the XY-plane, with Z up). More...
#include <geometry.h>
Public Member Functions | |
GeometryFlat (uint seed) | |
float | height (const XYZ &p) const |
Height is just the z co-ordinate of a point. | |
void | set_height (XYZ &p, float v) const |
Setting a height is simply assigning to the z-coordinate. | |
const XYZ | midpoint (const XYZ &v0, const XYZ &v1) const |
The mid-point between two points is simply their average. | |
float | normalised_latitude (const XYZ &) const |
This doesn't really mean anything here, so return zero, which would correspond to the equator of a spherical geometry. | |
const XYZ | up (const XYZ &) const |
Returns unit z vector. (Up is the same everywhere in this geometry). | |
const XYZ | north (const XYZ &) const |
Returns unit y vector. (North is the same everywhere in this geometry). | |
const XYZ | east (const XYZ &) const |
Returns unit x vector. (East is the same everywhere in this geometry). | |
const XYZ | perturb (const XYZ &p, const XYZ &variation) const |
Add a random variation to a point. | |
float | epsilon () const |
Returns zero. Heights are stored exactly once assigned so no need for non-zero epsilon. | |
virtual void | scan_convert (const boost::array< XYZ, 3 > &v, const ScanConvertBackend &) const |
![]() | |
Geometry (uint seed) | |
Constructor. | |
virtual | ~Geometry () |
Destructor. | |
virtual uint | scan_convert_image_aspect_ratio () const |
Multiplier for width of a scan-converted image. | |
Additional Inherited Members | |
![]() | |
static void | scan_convert_common (const boost::array< XYZ, 3 > &v, const ScanConvertBackend &backend) |
Common scan-converter code. More... | |
![]() | |
Random01 | _r01 |
Random number generator used for perturbations and the like. More... | |
Concrete class providing a flat geometry (in the XY-plane, with Z up).
|
virtual |
Scan lines are through the centre of pixels at y=0.5. This function doesn't care about quantization in x; that's for the backend.
Implements ScanConverter.