#include <SplitPlane.h>
Public Member Functions | |
SplitPlane () | |
SplitPlane (float pos, Axis dir) | |
bool | operator< (const SplitPlane &other) const |
float | position () const |
Axis | direction () const |
Side | side () const |
void | setSide (Side primSide) |
Private Attributes | |
float | mPosition |
Split position. | |
Axis | mDirection |
Split direction. | |
Side | mSide |
Where to put primitives divided by the plane. |
Definition at line 25 of file SplitPlane.h.
SplitPlane::SplitPlane | ( | ) | [inline] |
Default constructor
Definition at line 30 of file SplitPlane.h.
SplitPlane::SplitPlane | ( | float | pos, | |
Axis | dir | |||
) | [inline] |
Init constructor
pos | Split position | |
dir | Split direction |
Definition at line 42 of file SplitPlane.h.
bool SplitPlane::operator< | ( | const SplitPlane & | other | ) | const [inline] |
Comparision operator for sorting. Planes are first sorted by position and then by direction
Definition at line 51 of file SplitPlane.h.
References EPSILON, mDirection, and mPosition.
float SplitPlane::position | ( | ) | const [inline] |
Get split position
Definition at line 60 of file SplitPlane.h.
References mPosition.
Referenced by SAHKDTree::buildTree(), SAHKDTree::classifyAndSplice(), SAHKDTree::findBestPlane(), and Box::split().
Axis SplitPlane::direction | ( | ) | const [inline] |
Get split direction
Definition at line 67 of file SplitPlane.h.
References mDirection.
Referenced by SAHKDTree::buildTree(), SAHKDTree::classifyAndSplice(), SAHKDTree::findBestPlane(), and Box::split().
Side SplitPlane::side | ( | ) | const [inline] |
Get primitives side
Definition at line 74 of file SplitPlane.h.
References mSide.
Referenced by SAHKDTree::classifyAndSplice().
void SplitPlane::setSide | ( | Side | primSide | ) | [inline] |
Set primitives side
primSide | New side |
Definition at line 83 of file SplitPlane.h.
References mSide.
Referenced by SAHKDTree::findBestPlane().
float SplitPlane::mPosition [private] |
Split position.
Definition at line 90 of file SplitPlane.h.
Referenced by operator<(), and position().
Axis SplitPlane::mDirection [private] |
Split direction.
Definition at line 93 of file SplitPlane.h.
Referenced by direction(), and operator<().
Side SplitPlane::mSide [private] |