C# Class Glare.Box4f

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

Public Properties

Property Type Description
Max Vector4f
Min Vector4f
Zero Box4f

Public Methods

Method Description
Box4f ( System.Single minX, System.Single minY, System.Single minZ, System.Single minW, System.Single maxX, System.Single maxY, System.Single maxZ, System.Single maxW ) : System

Create a Box4f by providing minimum and maximum extents.

Box4f ( Vector4f min, Vector4f max ) : System

Create a Box4f by providing minimum and maximum extents.

Distance ( Vector4f point ) : System.Single

Get the closest distance between this Box4f and the Vector4f.

Intersect ( Vector4f point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector4f point ) : Vector4f

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

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

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

Overlaps ( Vector4f point ) : bool

Get whether this Box4f inclusively intersects with the Vector4f.

Random ( Random rng ) : Vector4f

Get a random position within the box.

Random ( Random rng, Vector4f &result ) : void

Get a random position within the box.

Relative ( System.Single minX, System.Single minY, System.Single minZ, System.Single minW, System.Single sizeX, System.Single sizeY, System.Single sizeZ, System.Single sizeW ) : Box4f

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

Relative ( Vector4f min, Vector4f size ) : Box4f

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

Relative ( System.Single minX, System.Single minY, System.Single minZ, System.Single minW, System.Single sizeX, System.Single sizeY, System.Single sizeZ, System.Single sizeW, Box4f &result ) : void

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

Relative ( Vector4f min, Vector4f size, Box4f &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box4f.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box4f.

Method Details

Box4f() public method

Create a Box4f by providing minimum and maximum extents.
public Box4f ( System.Single minX, System.Single minY, System.Single minZ, System.Single minW, System.Single maxX, System.Single maxY, System.Single maxZ, System.Single maxW ) : System
minX System.Single
minY System.Single
minZ System.Single
minW System.Single
maxX System.Single
maxY System.Single
maxZ System.Single
maxW System.Single
return System

Box4f() public method

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

Distance() public method

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

Intersect() public method

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

NearestPointTo() public method

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

NearestPointTo() public method

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

Overlaps() public method

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

Random() public method

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

Random() public method

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

Relative() public static method

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

Relative() public static method

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

Relative() public static method

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

Relative() public static method

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

ToString() public method

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

ToString() public method

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

Property Details

Max public_oe property

The maximum extents of the Box4f.
public Vector4f Max
return Vector4f

Min public_oe property

The minimum extents of the Box4f.
public Vector4f Min
return Vector4f

Zero public_oe static_oe property

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