Class RotatableCube
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
A rotatable version of a cuboid.
public class RotatableCube : Cuboidf, IEquatable<Cuboidf>
- Inheritance
-
RotatableCube
- Implements
- Inherited Members
- Extension Methods
Examples
"selectionboxbytype": {
"*-up": {
"x1": 0,
"y1": 0,
"z1": 0,
"x2": 1,
"y2": 0.4,
"z2": 1
},
"*-north": {
"x1": 0,
"y1": 0,
"z1": 0,
"x2": 1,
"y2": 0.4,
"z2": 1,
"rotateZ": 90,
"rotateY": 270
},
...
},
Constructors
RotatableCube()
public RotatableCube()
RotatableCube(float, float, float, float, float, float)
public RotatableCube(float MinX, float MinY, float MinZ, float MaxX, float MaxY, float MaxZ)
Parameters
Fields
Origin
The origin point for the object to rotate around. Measured in meters from zero, not percent.
public Vec3d Origin
Field Value
RotateX
The cube's rotation around the X axis.
public float RotateX
Field Value
RotateY
The cube's rotation around the Y axis.
public float RotateY
Field Value
RotateZ
The cube's rotation around the Z axis.
public float RotateZ
Field Value
Methods
Clone()
public RotatableCube Clone()
Returns
RotatedCopy()
public Cuboidf RotatedCopy()
Returns
ToHitboxCuboidi(float, Vec3d)
public Cuboidi ToHitboxCuboidi(float rotateY, Vec3d origin = null)