Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members Related Pages

# SDLmm::SPoint Class Reference

A small usefull class representing a point in 2 dimensional space. More...

`#include <sdlmm_spoint.h>`

List of all members.

## Public Methods
| SPoint ()
| Default constructor which creates an empty SPoint (xy variables set to zero). More...
| SPoint (const SPoint &point)
| This is the copy constructor. Simply initializes the value of an SPoint to that of another SPoint. More...
| SPoint (Sint16 nx, Sint16 ny)
| Constructor which initializes the class from integer values. More...
SPoint& | operator= (const SPoint &point)
| Set the value of an SPoint to that of an existing SPoint. More...
bool | operator== (const SPoint &point) const
| Compare two points for equality. More...
bool | operator< (const SPoint &point) const
bool | operator<= (const SPoint &point) const
bool | operator> (const SPoint &point) const
bool | operator>= (const SPoint &point) const
SPoint& | operator+= (const SPoint &point)
SPoint& | operator-= (const SPoint &point)
SPoint | operator+ (const SPoint &point) const
SPoint | operator- (const SPoint &point) const
SPoint& | operator *= (Sint16 scalar)
SPoint& | operator/= (Sint16 scalar)
SPoint | operator * (Sint16 scalar) const
SPoint | operator/ (Sint16 scalar) const
## Public Attributes
Sint16 | x
Sint16 | y

## Detailed Description

A small usefull class representing a point in 2 dimensional space.

Author:
  Adam Gates

## Constructor & Destructor Documentation

SDLmm::SPoint::SPoint ( | )`[inline]`

| Default constructor which creates an empty SPoint (xy variables set to zero).

SDLmm::SPoint::SPoint ( | const SPoint & point )`[inline]`

  | This is the copy constructor. Simply initializes the value of an SPoint to that of another SPoint. Parameters:
  point | an existing SPoint object.

SDLmm::SPoint::SPoint ( | Sint16 nx,
| Sint16 ny )`[inline]`

  | Constructor which initializes the class from integer values. Parameters:
  nx, horizontal | position
  ny, vertical | position

## Member Function Documentation

SPoint SDLmm::SPoint::operator * ( | Sint16 scalar ) const`[inline]`

SPoint & SDLmm::SPoint::operator *= ( | Sint16 scalar )`[inline]`

SPoint SDLmm::SPoint::operator+ ( | const SPoint & point ) const`[inline]`

SPoint & SDLmm::SPoint::operator+= ( | const SPoint & point )`[inline]`

SPoint SDLmm::SPoint::operator- ( | const SPoint & point ) const`[inline]`

SPoint & SDLmm::SPoint::operator-= ( | const SPoint & point )`[inline]`

SPoint SDLmm::SPoint::operator/ ( | Sint16 scalar ) const`[inline]`

SPoint & SDLmm::SPoint::operator/= ( | Sint16 scalar )`[inline]`

bool SDLmm::SPoint::operator< ( | const SPoint & point ) const`[inline]`

| Returns: true if both point.x and point.y is larger than x and y in this point.

bool SDLmm::SPoint::operator<= ( | const SPoint & point ) const`[inline]`

| Returns: true if both point.x and point.y is larger than or equal to x and y in this point.

SPoint & SDLmm::SPoint::operator= ( | const SPoint & point )`[inline]`

| Set the value of an SPoint to that of an existing SPoint.

bool SDLmm::SPoint::operator== ( | const SPoint & point ) const`[inline]`

| Compare two points for equality. Returns: true if coordinates are identical in both points.

bool SDLmm::SPoint::operator> ( | const SPoint & point ) const`[inline]`

| Returns: true if both point.x and point.y is smaller than x and y in this point.

bool SDLmm::SPoint::operator>= ( | const SPoint & point ) const`[inline]`

| Returns: true if both point.x and point.y is smaller than or equal to x and y in this point.

## Member Data Documentation

Sint16 SDLmm::SPoint::x

Sint16 SDLmm::SPoint::y

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

- sdlmm_spoint.h

Documentation automatically generated by written by Dimitri van Heesch. | Project hosted at