C# Class Glare.Box3d

A three-dimensional box that uses Double elements.
Exibir arquivo Open project: Burton-Radons/Alexandria Class Usage Examples

Public Properties

Property Type Description
Max Vector3d
Min Vector3d
Zero Box3d

Public Methods

Method Description
Box3d ( Double minX, Double minY, Double minZ, Double maxX, Double maxY, Double maxZ ) : System

Create a Box3d by providing minimum and maximum extents.

Box3d ( Vector3d min, Vector3d max ) : System

Create a Box3d by providing minimum and maximum extents.

Distance ( Vector3d point ) : Double

Get the closest distance between this Box3d and the Vector3d.

Intersect ( Frustum frustum ) : Containment

Get the intersection between a Box3d and a Frustum.

Intersect ( Vector3d point ) : Containment

Get the intersection type between this box and the point.

NearestPointTo ( Vector3d point ) : Vector3d

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

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

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

Overlaps ( Vector3d point ) : bool

Get whether this Box3d inclusively intersects with the Vector3d.

Random ( Random rng ) : Vector3d

Get a random position within the box.

Random ( Random rng, Vector3d &result ) : void

Get a random position within the box.

Relative ( Double minX, Double minY, Double minZ, Double sizeX, Double sizeY, Double sizeZ ) : Box3d

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

Relative ( Vector3d min, Vector3d size ) : Box3d

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

Relative ( Double minX, Double minY, Double minZ, Double sizeX, Double sizeY, Double sizeZ, Box3d &result ) : void

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

Relative ( Vector3d min, Vector3d size, Box3d &result ) : void

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

ToString ( ) : string

Convert to a string representation of the Box3d.

ToString ( string format, IFormatProvider provider ) : string

Convert to a string representation of the Box3d.

Method Details

Box3d() public method

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

Box3d() public method

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

Distance() public method

Get the closest distance between this Box3d and the Vector3d.
public Distance ( Vector3d point ) : Double
point Vector3d
return Double

Intersect() public method

Get the intersection between a Box3d 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 ( Vector3d point ) : Containment
point Vector3d
return Containment

NearestPointTo() public method

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

NearestPointTo() public method

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

Overlaps() public method

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

Random() public method

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

Random() public method

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

Relative() public static method

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

Relative() public static method

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

Relative() public static method

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

Relative() public static method

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

ToString() public method

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

ToString() public method

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

Property Details

Max public_oe property

The maximum extents of the Box3d.
public Vector3d Max
return Vector3d

Min public_oe property

The minimum extents of the Box3d.
public Vector3d Min
return Vector3d

Zero public_oe static_oe property

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