C#Code
C#Code
Public Member Functions | Public Attributes
Libraries.Collision.RectCollision2D Class Reference
Inheritance diagram for Libraries.Collision.RectCollision2D:
Libraries.Collision.BaseCollision Libraries.Collision.BaseCollision

List of all members.

Public Member Functions

 RectCollision2D ()
 RectCollision2D (Vector2 topL, Vector2 bottomR)
void SetWithDims (Vector2 topL, Vector2 dims)
void SetWithDims (Vector3 topL, Vector2 dims)
void Set (Vector2 topL, Vector2 bottomR)
bool CollisionTest (RectCollision2D check)
bool PointInRectTest (Vector2 point)
bool PointInRectTest (Vector3 point)
Vector2 PointInRectUV (Vector2 point)
 RectCollision2D ()
 RectCollision2D (Vector2 topL, Vector2 bottomR)
void SetWithDims (Vector2 topL, Vector2 dims)
void SetWithDims (Vector3 topL, Vector2 dims)
void Set (Vector2 topL, Vector2 bottomR)
bool CollisionTest (RectCollision2D check)
bool PointInRectTest (Vector2 point)
bool PointInRectTest (Vector3 point)
Vector2 PointInRectUV (Vector2 point)

Public Attributes

Vector2 m_topL
 Top left and bottom right corners.
Vector2 m_bottomR

Detailed Description

2D axis alligned rectangle collision handling for 3D space. X is increasing going right, Y is increasing going up.


Constructor & Destructor Documentation

Libraries.Collision.RectCollision2D.RectCollision2D ( )

Default constructor.

Libraries.Collision.RectCollision2D.RectCollision2D ( Vector2  topL,
Vector2  bottomR 
)

Constructor.

topL - Top left corner.
bottomR - Bottom right corner.
Libraries.Collision.RectCollision2D.RectCollision2D ( )

Default constructor.

Libraries.Collision.RectCollision2D.RectCollision2D ( Vector2  topL,
Vector2  bottomR 
)

Constructor.

topL - Top left corner.
bottomR - Bottom right corner.

Member Function Documentation

bool Libraries.Collision.RectCollision2D.CollisionTest ( RectCollision2D  check)

Check for a collision with the given object.

check - Rect to check for a collision with.

Return:
Value is true if a collision was detected, false if not.
bool Libraries.Collision.RectCollision2D.CollisionTest ( RectCollision2D  check)

Check for a collision with the given object.

check - Rect to check for a collision with.

Return:
Value is true if a collision was detected, false if not.
bool Libraries.Collision.RectCollision2D.PointInRectTest ( Vector3  point)

Test if a point is in the rectangle.

point - Point to check.

Return:
Value is true if the point is in the rectangle, false if not.
bool Libraries.Collision.RectCollision2D.PointInRectTest ( Vector2  point)

Test if a point is in the rectangle.

point - Point to check.

Return:
Value is true if the point is in the rectangle, false if not.
bool Libraries.Collision.RectCollision2D.PointInRectTest ( Vector3  point)

Test if a point is in the rectangle.

point - Point to check.

Return:
Value is true if the point is in the rectangle, false if not.
bool Libraries.Collision.RectCollision2D.PointInRectTest ( Vector2  point)

Test if a point is in the rectangle.

point - Point to check.

Return:
Value is true if the point is in the rectangle, false if not.
Vector2 Libraries.Collision.RectCollision2D.PointInRectUV ( Vector2  point)

Get the time (u,v) along the rect width and hight that the given point is at in the rectangle.

point - Point to check.

Return:
Value is the time along the lines, (-1, -1) if the point was not in the rectangle.
Vector2 Libraries.Collision.RectCollision2D.PointInRectUV ( Vector2  point)

Get the time (u,v) along the rect width and hight that the given point is at in the rectangle.

point - Point to check.

Return:
Value is the time along the lines, (-1, -1) if the point was not in the rectangle.
void Libraries.Collision.RectCollision2D.Set ( Vector2  topL,
Vector2  bottomR 
)

Set the corners.

topL - Top left corner.
bottomR - Bottom right corner.
void Libraries.Collision.RectCollision2D.Set ( Vector2  topL,
Vector2  bottomR 
)

Set the corners.

topL - Top left corner.
bottomR - Bottom right corner.
void Libraries.Collision.RectCollision2D.SetWithDims ( Vector3  topL,
Vector2  dims 
)

Set the collision area.

topL - Top left corner.
dims - Dimensions to apply. Gets added to the top left position.
void Libraries.Collision.RectCollision2D.SetWithDims ( Vector3  topL,
Vector2  dims 
)

Set the collision area.

topL - Top left corner.
dims - Dimensions to apply. Gets added to the top left position.
void Libraries.Collision.RectCollision2D.SetWithDims ( Vector2  topL,
Vector2  dims 
)

Set the collision area.

topL - Top left corner.
dims - Dimensions to apply. Gets added to the top left position.
void Libraries.Collision.RectCollision2D.SetWithDims ( Vector2  topL,
Vector2  dims 
)

Set the collision area.

topL - Top left corner.
dims - Dimensions to apply. Gets added to the top left position.

Member Data Documentation

Top left and bottom right corners.


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