sgdk::ZeroDirection Class Reference
[Compass Module]

#include <swiss_gd_knife/math/geom/compass.hpp>

List of all members.


Detailed Description

A typesafe enumeration class defining the possible directions a Compass can identify as the "zero-degree direction".


Model of:


Public Member Functions

 ZeroDirection (const ZeroDirection &copy)
 The copy constructor.
ZeroDirectionoperator= (const ZeroDirection &copy)
 The assignment operator.
bool isParallelToXAxis () const
bool isParallelToYAxis () const
bool isNegative () const
bool isPositive () const

Static Public Attributes

static const ZeroDirection NEGATIVE_X_AXIS
static const ZeroDirection NEGATIVE_Y_AXIS
static const ZeroDirection POSITIVE_X_AXIS
static const ZeroDirection POSITIVE_Y_AXIS


Constructor & Destructor Documentation

sgdk::ZeroDirection::ZeroDirection const ZeroDirection copy  )  [inline]
 

Constructs a new ZeroDirection that will be internally equivalent to the copy.

Parameters:
copy the ZeroDirection being copied.


Member Function Documentation

ZeroDirection& sgdk::ZeroDirection::operator= const ZeroDirection copy  )  [inline]
 

Sets this ZeroDirection to be internally equivalent to the copy.

Parameters:
copy the ZeroDirection being copied.
Returns:
a reference to this ZeroDirection.

bool sgdk::ZeroDirection::isParallelToXAxis  )  const [inline]
 

Returns true if this object is either ZeroDirection::NEGATIVE_X_AXIS or ZeroDirection::POSITIVE_X_AXIS, false otherwise.

Returns:
true if the direction this object defines is parallel to the x-axis, false otherwise.

bool sgdk::ZeroDirection::isParallelToYAxis  )  const [inline]
 

Returns true if this object is either ZeroDirection::NEGATIVE_Y_AXIS or ZeroDirection::POSITIVE_Y_AXIS, false otherwise.

Returns:
true if the direction this object defines is parallel to the y-axis, false otherwise.

bool sgdk::ZeroDirection::isNegative  )  const [inline]
 

Returns true if this object is either ZeroDirection::NEGATIVE_X_AXIS or ZeroDirection::NEGATIVE_Y_AXIS, false otherwise.

Returns:
true if the direction this object defines is opposite to that of the axis to which it is parallel, false otherwise.

bool sgdk::ZeroDirection::isPositive  )  const [inline]
 

Returns true if this object is either ZeroDirection::POSITIVE_X_AXIS or ZeroDirection::POSITIVE_Y_AXIS, false otherwise.

Returns:
true if the direction this object defines is the same as that of the axis to which it is parallel, false otherwise.


Member Data Documentation

const ZeroDirection sgdk::ZeroDirection::NEGATIVE_X_AXIS [static]
 

If this object is passed into either Compass::Compass() or Compass::setZeroDirection(), then for some x <= 0, Compass::getDirection(x,0) will return zero.

const ZeroDirection sgdk::ZeroDirection::NEGATIVE_Y_AXIS [static]
 

If this object is passed into either Compass::Compass() or Compass::setZeroDirection(), then for some y <= 0, Compass::getDirection(0,y) will return zero.

const ZeroDirection sgdk::ZeroDirection::POSITIVE_X_AXIS [static]
 

If this object is passed into either Compass::Compass() or Compass::setZeroDirection(), then for some x >= 0, Compass::getDirection(x,0) will return zero.

const ZeroDirection sgdk::ZeroDirection::POSITIVE_Y_AXIS [static]
 

If this object is passed into either Compass::Compass() or Compass::setZeroDirection(), then for some y >= 0, Compass::getDirection(0,y) will return zero.


Swiss GD Knife is hosted by SourceForge.net.