Public Member Functions | Public Attributes

point3d_t Struct Reference

basic 3D point object. More...

#include <geometry_3d.h>

List of all members.

Public Member Functions

 point3d_t (void) throw ()
 point3d_t (float ix, float iy, float iz) throw ()
void clear (void) throw ()
void set (float ix, float iy, float iz) throw ()
void dump (const char *title) const throw ()
void increment (const point3d_t &p) throw ()
void decrement (const point3d_t &p) throw ()
void scale (float r) throw ()
void operator*= (float r) throw ()
void operator+= (const point3d_t &p) throw ()
void operator-= (const point3d_t &p) throw ()
point3d_t operator- (void) const throw ()

Public Attributes

float x
float y
float z

Detailed Description

basic 3D point object.

Unlike 2D points, this is not a template. It is expected that users of this class are modeling 3D space and needing only modest accuracy, hence floats.

WARNING: the default constructor does NOT initialize the point to any particular value (such as (0, 0, 0) ). This is by design, so people can allocate large point3d_t arrays without paying a construction cost. Just be aware that this code:

    point3d_t p;

means that the value of p is undefined, and is probably quite large and random.

Definition at line 74 of file geometry_3d.h.


Constructor & Destructor Documentation

point3d_t::point3d_t ( void   )  throw () [inline]

Definition at line 76 of file geometry_3d.h.

point3d_t::point3d_t ( float  ix,
float  iy,
float  iz 
) throw () [inline]

Definition at line 77 of file geometry_3d.h.


Member Function Documentation

void point3d_t::clear ( void   )  throw () [inline]

Definition at line 81 of file geometry_3d.h.

void point3d_t::set ( float  ix,
float  iy,
float  iz 
) throw () [inline]

Definition at line 85 of file geometry_3d.h.

void point3d_t::dump ( const char *  title  )  const throw () [inline]

Definition at line 89 of file geometry_3d.h.

void point3d_t::increment ( const point3d_t p  )  throw () [inline]

Definition at line 93 of file geometry_3d.h.

void point3d_t::decrement ( const point3d_t p  )  throw () [inline]

Definition at line 99 of file geometry_3d.h.

void point3d_t::scale ( float  r  )  throw () [inline]

Definition at line 105 of file geometry_3d.h.

void point3d_t::operator*= ( float  r  )  throw () [inline]

Definition at line 111 of file geometry_3d.h.

void point3d_t::operator+= ( const point3d_t p  )  throw () [inline]

Definition at line 113 of file geometry_3d.h.

void point3d_t::operator-= ( const point3d_t p  )  throw () [inline]

Definition at line 117 of file geometry_3d.h.

point3d_t point3d_t::operator- ( void   )  const throw () [inline]

Definition at line 121 of file geometry_3d.h.


Member Data Documentation

float point3d_t::x

Definition at line 126 of file geometry_3d.h.

float point3d_t::y

Definition at line 127 of file geometry_3d.h.

float point3d_t::z

Definition at line 128 of file geometry_3d.h.


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