Physics::SpaceTypeInfo Class Reference

Describes the type of a space (Simple, hash-map based, or quad-tree based), with specific parameters. More...

#include <Space.h>

List of all members.

Classes

struct  HashData
 Hash parameters structure. More...
struct  QuadData
 Quad parameters structure. More...
struct  SimpleData
struct  SweepAndPruneData
 'Sweep and prune' parameters structure. More...

Public Types

enum  ESpaceType { SIMPLE, HASH, QUAD, SWEEP_AND_PRUNE }
enum  ESAPAxesOrder {
  SAP_AXES_XYZ = dSAP_AXES_XYZ, SAP_AXES_XZY = dSAP_AXES_XZY, SAP_AXES_YXZ = dSAP_AXES_YXZ, SAP_AXES_YZX = dSAP_AXES_YZX,
  SAP_AXES_ZXY = dSAP_AXES_ZXY, SAP_AXES_ZYX = dSAP_AXES_ZYX
}
 'Sweep and prune' axis order. More...

Public Member Functions

 SpaceTypeInfo (ESpaceType type=SIMPLE)
 Builds a space with all parameters set to default.
ESpaceType getType () const
 Returns the type of the space.
void setType (ESpaceType type)
HashDatagetHashData ()
 Returns the parameters for a hash space.
const HashDatagetHashData () const
QuadDatagetQuadData ()
 Returns the parameters for a quad space.
const QuadDatagetQuadData () const
SweepAndPruneDatagetSweepAndPruneData ()
 Returns the parameters for a 'sweep and prune' space.
const SweepAndPruneDatagetSweepAndPruneData () const
void setTypeSimple ()
HashDatasetTypeHash ()
QuadDatasetTypeQuad ()
SweepAndPruneDatasetTypeSweepAndPrune ()

Protected Attributes

ESpaceType type
 Type of the space. Could be deduced from data (of boost::variant type), but preferably stored in the class.
boost::variant< HashData,
QuadData, SweepAndPruneData,
SimpleData
data
 Empty structure, similar to void for our use.


Detailed Description

Describes the type of a space (Simple, hash-map based, or quad-tree based), with specific parameters.

Author:
Sukender
Version:
0.2.1 - Now uses boost.variant

Definition at line 78 of file Space.h.


Member Enumeration Documentation

'Sweep and prune' axis order.

Order XZY or ZXY usually works best, if your Y is up.

Enumerator:
SAP_AXES_XYZ 
SAP_AXES_XZY 
SAP_AXES_YXZ 
SAP_AXES_YZX 
SAP_AXES_ZXY 
SAP_AXES_ZYX 

Definition at line 109 of file Space.h.

Enumerator:
SIMPLE 
HASH 
QUAD 
SWEEP_AND_PRUNE 

Definition at line 80 of file Space.h.


Constructor & Destructor Documentation

Physics::SpaceTypeInfo::SpaceTypeInfo ( ESpaceType  type = SIMPLE  )  [inline]

Builds a space with all parameters set to default.

Definition at line 83 of file Space.h.

References setType(), and type.


Member Function Documentation

const HashData& Physics::SpaceTypeInfo::getHashData (  )  const [inline]

Returns the parameters for a hash space.

Definition at line 126 of file Space.h.

References ASSERT, data, HASH, and type.

HashData& Physics::SpaceTypeInfo::getHashData (  )  [inline]

Returns the parameters for a hash space.

Definition at line 124 of file Space.h.

References ASSERT, data, HASH, and type.

Referenced by Physics::Space::init(), and setTypeHash().

const QuadData& Physics::SpaceTypeInfo::getQuadData (  )  const [inline]

Returns the parameters for a quad space.

Definition at line 130 of file Space.h.

References ASSERT, data, QUAD, and type.

QuadData& Physics::SpaceTypeInfo::getQuadData (  )  [inline]

Returns the parameters for a quad space.

Definition at line 128 of file Space.h.

References ASSERT, data, QUAD, and type.

Referenced by Physics::Space::init(), and setTypeQuad().

const SweepAndPruneData& Physics::SpaceTypeInfo::getSweepAndPruneData (  )  const [inline]

Returns the parameters for a 'sweep and prune' space.

Definition at line 134 of file Space.h.

References ASSERT, data, SWEEP_AND_PRUNE, and type.

SweepAndPruneData& Physics::SpaceTypeInfo::getSweepAndPruneData (  )  [inline]

Returns the parameters for a 'sweep and prune' space.

Definition at line 132 of file Space.h.

References ASSERT, data, SWEEP_AND_PRUNE, and type.

Referenced by Physics::Space::init(), and setTypeSweepAndPrune().

ESpaceType Physics::SpaceTypeInfo::getType (  )  const [inline]

Returns the type of the space.

Definition at line 86 of file Space.h.

References type.

Referenced by Physics::Space::init().

void Physics::SpaceTypeInfo::setType ( ESpaceType  type  )  [inline]

Definition at line 88 of file Space.h.

References HASH, QUAD, setTypeHash(), setTypeQuad(), setTypeSimple(), setTypeSweepAndPrune(), SIMPLE, and SWEEP_AND_PRUNE.

Referenced by SpaceTypeInfo().

HashData& Physics::SpaceTypeInfo::setTypeHash (  )  [inline]

QuadData& Physics::SpaceTypeInfo::setTypeQuad (  )  [inline]

void Physics::SpaceTypeInfo::setTypeSimple (  )  [inline]

Definition at line 137 of file Space.h.

References data, SIMPLE, and type.

Referenced by setType().

SweepAndPruneData& Physics::SpaceTypeInfo::setTypeSweepAndPrune (  )  [inline]


Member Data Documentation

Empty structure, similar to void for our use.

Definition at line 178 of file Space.h.

Referenced by getHashData(), getQuadData(), getSweepAndPruneData(), setTypeHash(), setTypeQuad(), setTypeSimple(), and setTypeSweepAndPrune().

Type of the space. Could be deduced from data (of boost::variant type), but preferably stored in the class.

Definition at line 173 of file Space.h.

Referenced by getHashData(), getQuadData(), getSweepAndPruneData(), getType(), setTypeHash(), setTypeQuad(), setTypeSimple(), setTypeSweepAndPrune(), and SpaceTypeInfo().


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

Generated on Sun Jan 17 11:39:36 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9