C# Class Glare.Box2f

A two-dimensional box that uses Single elements.
Afficher le fichier Open project: Burton-Radons/Alexandria Class Usage Examples

Méthodes publiques

Свойство Type Description
Max Vector2f
Min Vector2f
Zero Box2f

Méthodes publiques

Méthode 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 méthode

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
Résultat System

Box2f() public méthode

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

Distance() public méthode

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

Intersect() public méthode

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

NearestPointTo() public méthode

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
Résultat Vector2f

NearestPointTo() public méthode

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
Résultat void

Overlaps() public méthode

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

Random() public méthode

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

Random() public méthode

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

Relative() public static méthode

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
Résultat Box2f

Relative() public static méthode

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
Résultat Box2f

Relative() public static méthode

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
Résultat void

Relative() public static méthode

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
Résultat void

ToString() public méthode

Convert to a string representation of the Box2f.
public ToString ( ) : string
Résultat string

ToString() public méthode

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

Property Details

Max public_oe property

The maximum extents of the Box2f.
public Vector2f Max
Résultat Vector2f

Min public_oe property

The minimum extents of the Box2f.
public Vector2f Min
Résultat Vector2f

Zero public_oe static_oe property

Get an empty Box2f centred on the origin.
public static Box2f,Glare Zero
Résultat Box2f