SplitPlane Class Reference

#include <SplitPlane.h>

List of all members.

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.


Detailed Description

Represents split plane. Stores split direction, position and side where to put primitives intersected by the plane.

Author:
Alex Busenius

Definition at line 25 of file SplitPlane.h.


Constructor & Destructor Documentation

SplitPlane::SplitPlane (  )  [inline]

Default constructor

Definition at line 30 of file SplitPlane.h.

SplitPlane::SplitPlane ( float  pos,
Axis  dir 
) [inline]

Init constructor

Parameters:
pos Split position
dir Split direction

Definition at line 42 of file SplitPlane.h.


Member Function Documentation

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

Parameters:
primSide New side

Definition at line 83 of file SplitPlane.h.

References mSide.

Referenced by SAHKDTree::findBestPlane().


Member Data Documentation

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]

Where to put primitives divided by the plane.

Definition at line 96 of file SplitPlane.h.

Referenced by setSide(), and side().


The documentation for this class was generated from the following file:
Generated on Fri Feb 1 00:02:30 2008 for Grayfall by  doxygen 1.5.1