C# Class Glare.Box3

A three-dimensional box that uses Length elements.
Mostrar archivo Open project: Burton-Radons/Alexandria Class Usage Examples

Public Properties

Property Type Description
Max System.Vector3
Min System.Vector3
Zero Box3

Public Methods

Method Description
Box3 ( Length minX, Length minY, Length minZ, Length maxX, Length maxY, Length maxZ ) : System

Create a Box3 by providing minimum and maximum extents.

Box3 ( System.Vector3 min, System.Vector3 max ) : System

Create a Box3 by providing minimum and maximum extents.

Distance ( System.Vector3 point ) : Length

Get the closest distance between this Box3 and the Vector3.

Intersect ( Frustum frustum ) : Containment

Get the intersection between a Box3 and a Frustum.

Intersect ( System.Vector3 point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( System.Vector3 point ) : System.Vector3

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

NearestPointTo ( System.Vector3 &point, System.Vector3 &result ) : void

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

Overlaps ( System.Vector3 point ) : bool

Get whether this Box3 inclusively intersects with the Vector3.

Random ( Random rng ) : System.Vector3

Get a random position within the box.

Random ( Random rng, System.Vector3 &result ) : void

Get a random position within the box.

Relative ( Length minX, Length minY, Length minZ, Length sizeX, Length sizeY, Length sizeZ ) : Box3

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

Relative ( System.Vector3 min, System.Vector3 size ) : Box3

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

Relative ( Length minX, Length minY, Length minZ, Length sizeX, Length sizeY, Length sizeZ, Box3 &result ) : void

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

Relative ( System.Vector3 min, System.Vector3 size, Box3 &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box3.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box3.

Method Details

Box3() public method

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

Box3() public method

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

Distance() public method

Get the closest distance between this Box3 and the Vector3.
public Distance ( System.Vector3 point ) : Length
point System.Vector3
return Length

Intersect() public method

Get the intersection between a Box3 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 ( System.Vector3 point ) : Containment
point System.Vector3
return Containment

NearestPointTo() public method

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

NearestPointTo() public method

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

Overlaps() public method

Get whether this Box3 inclusively intersects with the Vector3.
public Overlaps ( System.Vector3 point ) : bool
point System.Vector3
return bool

Random() public method

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

Random() public method

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

Relative() public static method

Create a Box3 by providing the minimum extent and the size of each side.
public static Relative ( Length minX, Length minY, Length minZ, Length sizeX, Length sizeY, Length sizeZ ) : Box3
minX Length
minY Length
minZ Length
sizeX Length
sizeY Length
sizeZ Length
return Box3

Relative() public static method

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

Relative() public static method

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

Relative() public static method

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

ToString() public method

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

ToString() public method

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

Property Details

Max public_oe property

The maximum extents of the Box3.
public Vector3,System Max
return System.Vector3

Min public_oe property

The minimum extents of the Box3.
public Vector3,System Min
return System.Vector3

Zero public_oe static_oe property

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