C# Class Glare.Box2f

A two-dimensional box that uses Single elements.
显示文件 Open project: Burton-Radons/Alexandria Class Usage Examples

Public Properties

Property Type Description
Max Vector2f
Min Vector2f
Zero Box2f

Public Methods

Method Description
Box2f ( System.Single minX, System.Single minY, System.Single maxX, System.Single maxY ) : System

Create a Box2f by providing minimum and maximum extents.

Box2f ( Vector2f min, Vector2f max ) : System

Create a Box2f by providing minimum and maximum extents.

Distance ( Vector2f point ) : System.Single

Get the closest distance between this Box2f and the Vector2f.

Intersect ( Vector2f point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector2f point ) : Vector2f

Get the nearest point between this Box2f and a Vector2f. If the Vector2f is inside this Box2f, it is returned untouched.

NearestPointTo ( Vector2f &point, Vector2f &result ) : void

Get the nearest point between this Box2f and a Vector2f. If the Vector2f is inside this Box2f, it is returned untouched.

Overlaps ( Vector2f point ) : bool

Get whether this Box2f inclusively intersects with the Vector2f.

Random ( Random rng ) : Vector2f

Get a random position within the box.

Random ( Random rng, Vector2f &result ) : void

Get a random position within the box.

Relative ( System.Single minX, System.Single minY, System.Single sizeX, System.Single sizeY ) : Box2f

Create a Box2f by providing the minimum extent and the size of each side.

Relative ( Vector2f min, Vector2f size ) : Box2f

Create a Box2f by providing the minimum extent and the size of each side.

Relative ( System.Single minX, System.Single minY, System.Single sizeX, System.Single sizeY, Box2f &result ) : void

Create a Box2f by providing the minimum extent and the size of each side.

Relative ( Vector2f min, Vector2f size, Box2f &result ) : void

Create a Box2f by providing the minimum extent and the size of each side.

ToString ( ) : string

Convert to a string representation of the Box2f.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box2f.

Method Details

Box2f() public method

Create a Box2f by providing minimum and maximum extents.
public Box2f ( System.Single minX, System.Single minY, System.Single maxX, System.Single maxY ) : System
minX System.Single
minY System.Single
maxX System.Single
maxY System.Single
return System

Box2f() public method

Create a Box2f by providing minimum and maximum extents.
public Box2f ( Vector2f min, Vector2f max ) : System
min Vector2f
max Vector2f
return System

Distance() public method

Get the closest distance between this Box2f and the Vector2f.
public Distance ( Vector2f point ) : System.Single
point Vector2f
return System.Single

Intersect() public method

Get the intersection type between this box and the point.
public Intersect ( Vector2f point ) : Containment
point Vector2f
return Containment

NearestPointTo() public method

Get the nearest point between this Box2f and a Vector2f. If the Vector2f is inside this Box2f, it is returned untouched.
public NearestPointTo ( Vector2f point ) : Vector2f
point Vector2f
return Vector2f

NearestPointTo() public method

Get the nearest point between this Box2f and a Vector2f. If the Vector2f is inside this Box2f, it is returned untouched.
public NearestPointTo ( Vector2f &point, Vector2f &result ) : void
point Vector2f
result Vector2f
return void

Overlaps() public method

Get whether this Box2f inclusively intersects with the Vector2f.
public Overlaps ( Vector2f point ) : bool
point Vector2f
return bool

Random() public method

Get a random position within the box.
public Random ( Random rng ) : Vector2f
rng System.Random
return Vector2f

Random() public method

Get a random position within the box.
public Random ( Random rng, Vector2f &result ) : void
rng System.Random
result Vector2f
return void

Relative() public static method

Create a Box2f by providing the minimum extent and the size of each side.
public static Relative ( System.Single minX, System.Single minY, System.Single sizeX, System.Single sizeY ) : Box2f
minX System.Single
minY System.Single
sizeX System.Single
sizeY System.Single
return Box2f

Relative() public static method

Create a Box2f by providing the minimum extent and the size of each side.
public static Relative ( Vector2f min, Vector2f size ) : Box2f
min Vector2f
size Vector2f
return Box2f

Relative() public static method

Create a Box2f by providing the minimum extent and the size of each side.
public static Relative ( System.Single minX, System.Single minY, System.Single sizeX, System.Single sizeY, Box2f &result ) : void
minX System.Single
minY System.Single
sizeX System.Single
sizeY System.Single
result Box2f
return void

Relative() public static method

Create a Box2f by providing the minimum extent and the size of each side.
public static Relative ( Vector2f min, Vector2f size, Box2f &result ) : void
min Vector2f
size Vector2f
result Box2f
return void

ToString() public method

Convert to a string representation of the Box2f.
public ToString ( ) : string
return string

ToString() public method

Convert to a string representation of the Box2f.
public ToString ( string format, IFormatProvider provider ) : string
format string
provider IFormatProvider
return string

Property Details

Max public_oe property

The maximum extents of the Box2f.
public Vector2f Max
return Vector2f

Min public_oe property

The minimum extents of the Box2f.
public Vector2f Min
return Vector2f

Zero public_oe static_oe property

Get an empty Box2f centred on the origin.
public static Box2f,Glare Zero
return Box2f