C# Класс Glare.Box2f

A two-dimensional box that uses Single elements.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Max Vector2f
Min Vector2f
Zero Box2f

Открытые методы

Метод Описание
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.

Описание методов

Box2f() публичный Метод

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
Результат System

Box2f() публичный Метод

Create a Box2f by providing minimum and maximum extents.
public Box2f ( Vector2f min, Vector2f max ) : System
min Vector2f
max Vector2f
Результат System

Distance() публичный Метод

Get the closest distance between this Box2f and the Vector2f.
public Distance ( Vector2f point ) : System.Single
point Vector2f
Результат System.Single

Intersect() публичный Метод

Get the intersection type between this box and the point.
public Intersect ( Vector2f point ) : Containment
point Vector2f
Результат Containment

NearestPointTo() публичный Метод

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
Результат Vector2f

NearestPointTo() публичный Метод

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
Результат void

Overlaps() публичный Метод

Get whether this Box2f inclusively intersects with the Vector2f.
public Overlaps ( Vector2f point ) : bool
point Vector2f
Результат bool

Random() публичный Метод

Get a random position within the box.
public Random ( Random rng ) : Vector2f
rng System.Random
Результат Vector2f

Random() публичный Метод

Get a random position within the box.
public Random ( Random rng, Vector2f &result ) : void
rng System.Random
result Vector2f
Результат void

Relative() публичный статический Метод

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
Результат Box2f

Relative() публичный статический Метод

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
Результат Box2f

Relative() публичный статический Метод

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
Результат void

Relative() публичный статический Метод

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
Результат void

ToString() публичный Метод

Convert to a string representation of the Box2f.
public ToString ( ) : string
Результат string

ToString() публичный Метод

Convert to a string representation of the Box2f.
public ToString ( string format, IFormatProvider provider ) : string
format string
provider IFormatProvider
Результат string

Описание свойств

Max публичное свойство

The maximum extents of the Box2f.
public Vector2f Max
Результат Vector2f

Min публичное свойство

The minimum extents of the Box2f.
public Vector2f Min
Результат Vector2f

Zero публичное статическое свойство

Get an empty Box2f centred on the origin.
public static Box2f,Glare Zero
Результат Box2f