C# Класс Glare.Box4d

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

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

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

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

Метод Описание
Box4d ( Double minX, Double minY, Double minZ, Double minW, Double maxX, Double maxY, Double maxZ, Double maxW ) : System

Create a Box4d by providing minimum and maximum extents.

Box4d ( Vector4d min, Vector4d max ) : System

Create a Box4d by providing minimum and maximum extents.

Distance ( Vector4d point ) : Double

Get the closest distance between this Box4d and the Vector4d.

Intersect ( Vector4d point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector4d point ) : Vector4d

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

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

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

Overlaps ( Vector4d point ) : bool

Get whether this Box4d inclusively intersects with the Vector4d.

Random ( Random rng ) : Vector4d

Get a random position within the box.

Random ( Random rng, Vector4d &result ) : void

Get a random position within the box.

Relative ( Double minX, Double minY, Double minZ, Double minW, Double sizeX, Double sizeY, Double sizeZ, Double sizeW ) : Box4d

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

Relative ( Vector4d min, Vector4d size ) : Box4d

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

Relative ( Double minX, Double minY, Double minZ, Double minW, Double sizeX, Double sizeY, Double sizeZ, Double sizeW, Box4d &result ) : void

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

Relative ( Vector4d min, Vector4d size, Box4d &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box4d.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box4d.

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

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

Create a Box4d by providing minimum and maximum extents.
public Box4d ( Double minX, Double minY, Double minZ, Double minW, Double maxX, Double maxY, Double maxZ, Double maxW ) : System
minX Double
minY Double
minZ Double
minW Double
maxX Double
maxY Double
maxZ Double
maxW Double
Результат System

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

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

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

Get the closest distance between this Box4d and the Vector4d.
public Distance ( Vector4d point ) : Double
point Vector4d
Результат Double

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

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

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

Get the nearest point between this Box4d and a Vector4d. If the Vector4d is inside this Box4d, it is returned untouched.
public NearestPointTo ( Vector4d point ) : Vector4d
point Vector4d
Результат Vector4d

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

Get the nearest point between this Box4d and a Vector4d. If the Vector4d is inside this Box4d, it is returned untouched.
public NearestPointTo ( Vector4d &point, Vector4d &result ) : void
point Vector4d
result Vector4d
Результат void

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

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

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

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

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

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

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

Create a Box4d by providing the minimum extent and the size of each side.
public static Relative ( Double minX, Double minY, Double minZ, Double minW, Double sizeX, Double sizeY, Double sizeZ, Double sizeW ) : Box4d
minX Double
minY Double
minZ Double
minW Double
sizeX Double
sizeY Double
sizeZ Double
sizeW Double
Результат Box4d

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

Create a Box4d by providing the minimum extent and the size of each side.
public static Relative ( Vector4d min, Vector4d size ) : Box4d
min Vector4d
size Vector4d
Результат Box4d

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

Create a Box4d by providing the minimum extent and the size of each side.
public static Relative ( Double minX, Double minY, Double minZ, Double minW, Double sizeX, Double sizeY, Double sizeZ, Double sizeW, Box4d &result ) : void
minX Double
minY Double
minZ Double
minW Double
sizeX Double
sizeY Double
sizeZ Double
sizeW Double
result Box4d
Результат void

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

Create a Box4d by providing the minimum extent and the size of each side.
public static Relative ( Vector4d min, Vector4d size, Box4d &result ) : void
min Vector4d
size Vector4d
result Box4d
Результат void

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

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

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

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

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

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

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

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

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

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

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