Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.Point2D Class Reference

represents a point in 2 dimensional space More...

Inheritance diagram for DOL.GS.Point2D:
DOL.GS.IPoint2D DOL.GS.Point3D DOL.GS.GameLocation DOL.GS.GameObject DOL.GS.Housing.House DOL.GS.Keeps.GameKeepHookPoint DOL.GS.Movement.PathPoint DOL.GS.GameLiving DOL.GS.GameStaticItem DOL.GS.Relics.RelicPad DOL.GS.Relics.RelicPillar DOL.GS.GameDoor DOL.GS.GameNPC DOL.GS.GamePlayer DOL.GS.Keeps.GameKeepComponent DOL.GS.Keeps.GameKeepDoor DOL.GS.Keeps.GameRelicDoor DOL.GS.DjinnStone DOL.GS.GameGravestone DOL.GS.GameRelic DOL.GS.GameRelicPad DOL.GS.GameStaticItemTimed DOL.GS.GameVault DOL.GS.Housing.GameLotMarker DOL.GS.Keeps.FrontiersPortalStone DOL.GS.Keeps.GameKeepBanner DOL.GS.MinotaurRelic DOL.GS.RealmAbilities.Statics.GenericBase

List of all members.

Public Member Functions

 Point2D ()
 Constructs a new 2D point object.
 Point2D (int x, int y)
 Constructs a new 2D point object.
 Point2D (IPoint2D point)
 Constructs a new 2D point object.
ushort GetHeading (IPoint2D point)
 Get the heading to a point.
Point2D GetPointFromHeading (ushort heading, int distance)
 Get the point at the given heading and distance.
int GetDistance (IPoint2D point)
 Get the distance to a point.
virtual void Clear ()
override string ToString ()
 Creates the string representation of this point.
bool IsWithinRadius (IPoint2D point, int radius)
 Determine if another point is within a given radius.

Public Attributes

const double HEADING_CONST
const double HEADING_TO_RADIAN = (360.0/4096.0)*(Math.PI/180.0)
 The factor to convert a heading value to radians.
const double RADIAN_TO_HEADING = (180.0/Math.PI)*(4096.0/360.0)
 The factor to convert radians to a heading value.

Protected Attributes

int m_x
 The X coord of this point.
int m_y
 The Y coord of this point.

Properties

virtual int X [get, set]
 X coord of this point.
virtual int Y [get, set]
 Y coord of this point.

Detailed Description

represents a point in 2 dimensional space


Constructor & Destructor Documentation

DOL.GS.Point2D.Point2D ( )

Constructs a new 2D point object.

DOL.GS.Point2D.Point2D ( int  x,
int  y 
)

Constructs a new 2D point object.

Parameters:
xThe X coord
yThe Y coord
DOL.GS.Point2D.Point2D ( IPoint2D  point)

Constructs a new 2D point object.

Parameters:
pointThe 2D point

Member Function Documentation

int DOL.GS.Point2D.GetDistance ( IPoint2D  point)

Get the distance to a point.

If you don't actually need the distance value, it is faster to use IsWithinRadius (since it avoids the square root calculation)

Parameters:
pointTarget point
Returns:
Distance to point

Implements DOL.GS.IPoint2D.

ushort DOL.GS.Point2D.GetHeading ( IPoint2D  point)

Get the heading to a point.

Parameters:
pointTarget point
Returns:
Heading to target point

Implements DOL.GS.IPoint2D.

Point2D DOL.GS.Point2D.GetPointFromHeading ( ushort  heading,
int  distance 
)

Get the point at the given heading and distance.

Parameters:
gameHeadingDOL Heading
distanceDistance to point
Returns:
Point at the given heading and distance

Implements DOL.GS.IPoint2D.

bool DOL.GS.Point2D.IsWithinRadius ( IPoint2D  point,
int  radius 
)

Determine if another point is within a given radius.

Parameters:
pointTarget point
radiusRadius
Returns:
True if the point is within the radius, otherwise false
override string DOL.GS.Point2D.ToString ( )

Creates the string representation of this point.

Returns:

Reimplemented in DOL.GS.GameObject, DOL.GS.GamePlayer, DOL.GS.Keeps.GameKeepComponent, DOL.GS.MinotaurRelic, and DOL.GS.Point3D.


Member Data Documentation

const double DOL.GS.Point2D.HEADING_CONST
Initial value:
                        651.89864690440329530934789477382
const double DOL.GS.Point2D.HEADING_TO_RADIAN = (360.0/4096.0)*(Math.PI/180.0)

The factor to convert a heading value to radians.

Heading to degrees = heading * (360 / 4096) Degrees to radians = degrees * (PI / 180)

int DOL.GS.Point2D.m_x [protected]

The X coord of this point.

int DOL.GS.Point2D.m_y [protected]

The Y coord of this point.

const double DOL.GS.Point2D.RADIAN_TO_HEADING = (180.0/Math.PI)*(4096.0/360.0)

The factor to convert radians to a heading value.

Radians to degrees = radian * (180 / PI) Degrees to heading = degrees * (4096 / 360)


Property Documentation

virtual int DOL.GS.Point2D.X [get, set]

X coord of this point.

Implements DOL.GS.IPoint2D.

Reimplemented in DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, and DOL.GS.Housing.House.

virtual int DOL.GS.Point2D.Y [get, set]

Y coord of this point.

Implements DOL.GS.IPoint2D.

Reimplemented in DOL.GS.GameLiving, DOL.GS.GameNPC, DOL.GS.GamePlayer, and DOL.GS.Housing.House.


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events