Struct Cuboid
Represents a cuboid in 3D space, which uses single-precision floating-point numbers for its coordinates.
Implements
Namespace: X10D.Drawing
Assembly: X10D.dll
Syntax
public struct Cuboid : IEquatable<Cuboid>
Constructors
| Improve this Doc View SourceCuboid(Single, Single, Single, Single, Single, Single)
Initializes a new instance of the Cuboid struct.
Declaration
public Cuboid(float centerX, float centerY, float centerZ, float width, float height, float depth)
Parameters
Type | Name | Description |
---|---|---|
System.Single | centerX | The center X coordinate. |
System.Single | centerY | The center Y coordinate. |
System.Single | centerZ | The center Z coordinate. |
System.Single | width | The width. |
System.Single | height | The height. |
System.Single | depth | The depth. |
Cuboid(Single, Single, Single, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the Cuboid struct.
Declaration
public Cuboid(float centerX, float centerY, float centerZ, float width, float height, float depth, float yaw, float pitch, float roll)
Parameters
Type | Name | Description |
---|---|---|
System.Single | centerX | The center X coordinate. |
System.Single | centerY | The center Y coordinate. |
System.Single | centerZ | The center Z coordinate. |
System.Single | width | The width. |
System.Single | height | The height. |
System.Single | depth | The depth. |
System.Single | yaw | The yaw. |
System.Single | pitch | The pitch. |
System.Single | roll | The roll. |
Cuboid(Vector3, Vector3)
Initializes a new instance of the Cuboid struct.
Declaration
public Cuboid(in Vector3 center, in Vector3 size)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center point. |
Vector3 | size | The size. |
Cuboid(Vector3, Vector3, Quaternion)
Initializes a new instance of the Cuboid struct.
Declaration
public Cuboid(in Vector3 center, in Vector3 size, in Quaternion orientation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center point. |
Vector3 | size | The size. |
Quaternion | orientation | The orientation of the cuboid. |
Cuboid(Vector3, Vector3, Vector3)
Initializes a new instance of the Cuboid struct.
Declaration
public Cuboid(in Vector3 center, in Vector3 size, in Vector3 orientation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center point. |
Vector3 | size | The size. |
Vector3 | orientation | The orientation of the cuboid. |
Fields
| Improve this Doc View SourceCuboid
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Cuboid
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Cuboid
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Cuboid
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Cuboid
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Cube
A cube. That is, a cuboid whose size is the same in all three dimensions.
Declaration
public static readonly Cuboid Cube
Field Value
Type | Description |
---|---|
Cuboid | A cube with the size (1, 1, 1). |
Empty
The empty cuboid. That is, a cuboid whose size is zero.
Declaration
public static readonly Cuboid Empty
Field Value
Type | Description |
---|---|
Cuboid |
Properties
| Improve this Doc View SourceBackBottomLeft
Gets the back-bottom-right corner of the box, in world space.
Declaration
public Vector3 BackBottomLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-right corner. |
BackBottomRight
Gets the back-bottom-right corner of the box, in world space.
Declaration
public Vector3 BackBottomRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-right corner. |
BackTopLeft
Gets the back-bottom-left corner of the box, in world space.
Declaration
public Vector3 BackTopLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-left corner. |
BackTopRight
Gets the back-bottom-right corner of the box, in world space.
Declaration
public Vector3 BackTopRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-right corner. |
Center
Gets the center point of the cuboid.
Declaration
public Vector3 Center { get; }
Property Value
Type | Description |
---|---|
Vector3 | The center point. |
FrontBottomLeft
Gets the front-bottom-left corner of the box, in world space.
Declaration
public Vector3 FrontBottomLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-bottom-left corner. |
FrontBottomRight
Gets the front-bottom-right corner of the box, in world space.
Declaration
public Vector3 FrontBottomRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-bottom-right corner. |
FrontTopLeft
Gets the front-top-left corner of the box, in world space.
Declaration
public Vector3 FrontTopLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-top-left corner. |
FrontTopRight
Gets the front-top-right corner of the box, in world space.
Declaration
public Vector3 FrontTopRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-top-right corner. |
LocalBackBottomLeft
Gets the back-bottom-left corner of the box, in local space.
Declaration
public Vector3 LocalBackBottomLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-left corner. |
LocalBackBottomRight
Gets the back-bottom-right corner of the box, in local space.
Declaration
public Vector3 LocalBackBottomRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-bottom-right corner. |
LocalBackTopLeft
Gets the back-top-left corner of the box, in local space.
Declaration
public Vector3 LocalBackTopLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-top-left corner. |
LocalBackTopRight
Gets the back-top-right corner of the box, in local space.
Declaration
public Vector3 LocalBackTopRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The back-top-right corner. |
LocalFrontBottomLeft
Gets the front-bottom-left corner of the box, in local space.
Declaration
public Vector3 LocalFrontBottomLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-bottom-left corner. |
LocalFrontBottomRight
Gets the front-bottom-right corner of the box, in local space.
Declaration
public Vector3 LocalFrontBottomRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-bottom-right corner. |
LocalFrontTopLeft
Gets the front-top-left corner of the box, in local space.
Declaration
public Vector3 LocalFrontTopLeft { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-top-left corner. |
LocalFrontTopRight
Gets the front-top-right corner of the box, in local space.
Declaration
public Vector3 LocalFrontTopRight { get; }
Property Value
Type | Description |
---|---|
Vector3 | The front-top-right corner. |
Orientation
Gets the orientation of this cuboid.
Declaration
public Quaternion Orientation { get; }
Property Value
Type | Description |
---|---|
Quaternion | The orientation. |
Size
Gets the size of the cuboid.
Declaration
public Vector3 Size { get; }
Property Value
Type | Description |
---|---|
Vector3 | The size. |
Volume
Gets the volume of this cuboid.
Declaration
public float Volume { get; }
Property Value
Type | Description |
---|---|
System.Single | The volume. |
Methods
| Improve this Doc View SourceEquals(Nullable<Object>)
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Cuboid)
Returns a value indicating whether this instance and another instance are equal.
Declaration
public bool Equals(Cuboid other)
Parameters
Type | Name | Description |
---|---|---|
Cuboid | other | The instance with which to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if this instance and |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Operators
| Improve this Doc View SourceEquality(Cuboid, Cuboid)
Returns a value indicating whether two instances of Cuboid are not equal.
Declaration
public static bool operator ==(Cuboid left, Cuboid right)
Parameters
Type | Name | Description |
---|---|---|
Cuboid | left | The first instance. |
Cuboid | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Inequality(Cuboid, Cuboid)
Returns a value indicating whether two instances of Cuboid are not equal.
Declaration
public static bool operator !=(Cuboid left, Cuboid right)
Parameters
Type | Name | Description |
---|---|---|
Cuboid | left | The first instance. |
Cuboid | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if |