dtTerrain::SoarXDrawable::Index Struct Reference

This structure represents a location on the terrain's 2D grid. More...

#include <soarxdrawable.h>

List of all members.

Public Member Functions

 Index ()
 Simply sets all values to zero.
 Index (int xValue, int yValue)
 Simple named constructor.
 Index (int qValue, int xValue, int yValue)
 Index (const Index &i, const Index &j, unsigned int parity, bool direction)
void clamp (int value)
 Clamps the x,y components of this index between zero and the value specified.
bool operator< (int value)
 Less-than comparison on this Index with another value.
bool operator> (int value)
 Greater-than comparison on this Index with another value.
void operator>>= (int bits)
 Right shifts both x and y components of this index by the specified number of bits.
void operator<<= (int bits)
 Left shifts both x and y components of this index by the specified number of bits.
void operator &= (int value)
 Performs a bit-wise AND on the x,y components of this index.
void operator+= (const Index &rhs)
 In place addition of the x,y components of this index with the x,y components of the other.
void operator-= (const Index &rhs)
 In place subtraction of the x,y components of this index with the x,y components of the other.

Public Attributes

unsigned int q
int x
int y


Detailed Description

This structure represents a location on the terrain's 2D grid.

Constructor & Destructor Documentation

dtTerrain::SoarXDrawable::Index::Index (  )  [inline]

Simply sets all values to zero.

dtTerrain::SoarXDrawable::Index::Index ( int  xValue,
int  yValue 
) [inline]

Simple named constructor.

dtTerrain::SoarXDrawable::Index::Index ( int  qValue,
int  xValue,
int  yValue 
) [inline]

dtTerrain::SoarXDrawable::Index::Index ( const Index i,
const Index j,
unsigned int  parity,
bool  direction 
)


Member Function Documentation

void dtTerrain::SoarXDrawable::Index::clamp ( int  value  )  [inline]

Clamps the x,y components of this index between zero and the value specified.

Parameters:
The max value to clamp this index to.

bool dtTerrain::SoarXDrawable::Index::operator< ( int  value  )  [inline]

Less-than comparison on this Index with another value.

Returns:
True if both x,y components of this index are less than the specified value.

bool dtTerrain::SoarXDrawable::Index::operator> ( int  value  )  [inline]

Greater-than comparison on this Index with another value.

Returns:
True if both x,y components of this index are greater than the specified value.

void dtTerrain::SoarXDrawable::Index::operator>>= ( int  bits  )  [inline]

Right shifts both x and y components of this index by the specified number of bits.

Parameters:
value Number of bits to shift the components by.

void dtTerrain::SoarXDrawable::Index::operator<<= ( int  bits  )  [inline]

Left shifts both x and y components of this index by the specified number of bits.

Parameters:
value Number of bits to shift the components by.

void dtTerrain::SoarXDrawable::Index::operator &= ( int  value  )  [inline]

Performs a bit-wise AND on the x,y components of this index.

Parameters:
value The value to bit-wise AND with this index.

void dtTerrain::SoarXDrawable::Index::operator+= ( const Index rhs  )  [inline]

In place addition of the x,y components of this index with the x,y components of the other.

Parameters:
rhs The index to add to this one.

void dtTerrain::SoarXDrawable::Index::operator-= ( const Index rhs  )  [inline]

In place subtraction of the x,y components of this index with the x,y components of the other.

Parameters:
rhs The index to subtract from this one.


Member Data Documentation

unsigned int dtTerrain::SoarXDrawable::Index::q

int dtTerrain::SoarXDrawable::Index::x

int dtTerrain::SoarXDrawable::Index::y


http://www.delta3d.org
2.0.0 generated 14 Feb 2008