![]() |
Dawn of Light - Class documentation 2900
This is the Dawn of Light project
|
represents a point in 2 dimensional space More...
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. | |
represents a point in 2 dimensional space
| DOL.GS.Point2D.Point2D | ( | ) |
Constructs a new 2D point object.
| DOL.GS.Point2D.Point2D | ( | int | x, |
| int | y | ||
| ) |
Constructs a new 2D point object.
| x | The X coord |
| y | The Y coord |
| DOL.GS.Point2D.Point2D | ( | IPoint2D | point | ) |
Constructs a new 2D point object.
| point | The 2D point |
| 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)
| point | Target point |
Implements DOL.GS.IPoint2D.
| ushort DOL.GS.Point2D.GetHeading | ( | IPoint2D | point | ) |
Get the heading to a point.
| point | Target point |
Implements DOL.GS.IPoint2D.
| Point2D DOL.GS.Point2D.GetPointFromHeading | ( | ushort | heading, |
| int | distance | ||
| ) |
Get the point at the given heading and distance.
| gameHeading | DOL Heading |
| distance | Distance to point |
Implements DOL.GS.IPoint2D.
| bool DOL.GS.Point2D.IsWithinRadius | ( | IPoint2D | point, |
| int | radius | ||
| ) |
Determine if another point is within a given radius.
| point | Target point |
| radius | Radius |
| override string DOL.GS.Point2D.ToString | ( | ) |
Creates the string representation of this point.
Reimplemented in DOL.GS.GameObject, DOL.GS.GamePlayer, DOL.GS.Keeps.GameKeepComponent, DOL.GS.MinotaurRelic, and DOL.GS.Point3D.
| const double DOL.GS.Point2D.HEADING_CONST |
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)
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.