C# Class Glare.Box3f

A three-dimensional box that uses Single elements.
Show file Open project: Burton-Radons/Alexandria Class Usage Examples

Public Properties

Property Type Description
Max Vector3f
Min Vector3f
Zero Box3f

Public Methods

Method Description
Box3f ( System.Single minX, System.Single minY, System.Single minZ, System.Single maxX, System.Single maxY, System.Single maxZ ) : System

Create a Box3f by providing minimum and maximum extents.

Box3f ( Vector3f min, Vector3f max ) : System

Create a Box3f by providing minimum and maximum extents.

Distance ( Vector3f point ) : System.Single

Get the closest distance between this Box3f and the Vector3f.

Intersect ( Frustum frustum ) : Containment

Get the intersection between a Box3f and a Frustum.

Intersect ( Vector3f point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector3f point ) : Vector3f

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

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

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

Overlaps ( Vector3f point ) : bool

Get whether this Box3f inclusively intersects with the Vector3f.

Random ( Random rng ) : Vector3f

Get a random position within the box.

Random ( Random rng, Vector3f &result ) : void

Get a random position within the box.

Relative ( System.Single minX, System.Single minY, System.Single minZ, System.Single sizeX, System.Single sizeY, System.Single sizeZ ) : Box3f

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

Relative ( Vector3f min, Vector3f size ) : Box3f

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

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

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

Relative ( Vector3f min, Vector3f size, Box3f &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box3f.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box3f.

Method Details

Box3f() public method

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

Box3f() public method

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

Distance() public method

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

Intersect() public method

Get the intersection between a Box3f and a Frustum.
public Intersect ( Frustum frustum ) : Containment
frustum Frustum
return Containment

Intersect() public method

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

NearestPointTo() public method

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

NearestPointTo() public method

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

Overlaps() public method

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

Random() public method

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

Random() public method

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

Relative() public static method

Create a Box3f 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 sizeX, System.Single sizeY, System.Single sizeZ ) : Box3f
minX System.Single
minY System.Single
minZ System.Single
sizeX System.Single
sizeY System.Single
sizeZ System.Single
return Box3f

Relative() public static method

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

Relative() public static method

Create a Box3f 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 sizeX, System.Single sizeY, System.Single sizeZ, Box3f &result ) : void
minX System.Single
minY System.Single
minZ System.Single
sizeX System.Single
sizeY System.Single
sizeZ System.Single
result Box3f
return void

Relative() public static method

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

ToString() public method

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

ToString() public method

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

Property Details

Max public property

The maximum extents of the Box3f.
public Vector3f Max
return Vector3f

Min public property

The minimum extents of the Box3f.
public Vector3f Min
return Vector3f

Zero public static property

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