Struct BoundingBoxExt
- Namespace
- Stride.Core.Mathematics
- Assembly
- Stride.Core.Mathematics.dll
Represents an axis-aligned bounding box in three dimensional space that store only the Center and Extent.
[DataContract]
public struct BoundingBoxExt : IEquatable<BoundingBoxExt>
- Implements
- Inherited Members
Constructors
BoundingBoxExt(BoundingBox)
Initializes a new instance of the BoundingBoxExt struct.
public BoundingBoxExt(BoundingBox box)
Parameters
box
BoundingBoxThe box.
BoundingBoxExt(Vector3, Vector3)
Initializes a new instance of the BoundingBoxExt struct.
public BoundingBoxExt(Vector3 minimum, Vector3 maximum)
Parameters
minimum
Vector3The minimum vertex of the bounding box.
maximum
Vector3The maximum vertex of the bounding box.
Fields
Center
The center of this bounding box.
public Vector3 Center
Field Value
Empty
A BoundingBoxExt which represents an empty space.
public static readonly BoundingBoxExt Empty
Field Value
Extent
The extent of this bounding box.
public Vector3 Extent
Field Value
Properties
Maximum
Gets the maximum.
public Vector3 Maximum { get; }
Property Value
- Vector3
The maximum.
Minimum
Gets the minimum.
public Vector3 Minimum { get; }
Property Value
- Vector3
The minimum.
Methods
Equals(BoundingBoxExt)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(BoundingBoxExt other)
Parameters
other
BoundingBoxExtAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Merge(ref readonly BoundingBoxExt, ref readonly BoundingBoxExt, out BoundingBoxExt)
Constructs a BoundingBoxExt that is as large as the total combined area of the two specified boxes.
public static void Merge(ref readonly BoundingBoxExt value1, ref readonly BoundingBoxExt value2, out BoundingBoxExt result)
Parameters
value1
BoundingBoxExtThe first box to merge.
value2
BoundingBoxExtThe second box to merge.
result
BoundingBoxExtWhen the method completes, contains the newly constructed bounding box.
Transform(Matrix)
Transform this Bounding box
public void Transform(Matrix world)
Parameters
world
MatrixThe transform to apply to the bounding box.
Operators
operator ==(BoundingBoxExt, BoundingBoxExt)
Implements the ==.
public static bool operator ==(BoundingBoxExt left, BoundingBoxExt right)
Parameters
left
BoundingBoxExtThe left.
right
BoundingBoxExtThe right.
Returns
- bool
The result of the operator.
explicit operator BoundingBoxExt(BoundingBox)
Performs an explicit conversion from BoundingBox to BoundingBoxExt.
public static explicit operator BoundingBoxExt(BoundingBox boundingBox)
Parameters
boundingBox
BoundingBoxThe bounding box.
Returns
- BoundingBoxExt
The result of the conversion.
explicit operator BoundingBox(BoundingBoxExt)
Performs an explicit conversion from BoundingBoxExt to BoundingBox.
public static explicit operator BoundingBox(BoundingBoxExt bbExt)
Parameters
bbExt
BoundingBoxExtThe bb ext.
Returns
- BoundingBox
The result of the conversion.
operator !=(BoundingBoxExt, BoundingBoxExt)
Implements the !=.
public static bool operator !=(BoundingBoxExt left, BoundingBoxExt right)
Parameters
left
BoundingBoxExtThe left.
right
BoundingBoxExtThe right.
Returns
- bool
The result of the operator.