Table of Contents

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

MinX float
MinY float
MinZ float
MaxX float
MaxY float
MaxZ float

Fields

Origin

The origin point for the object to rotate around. Measured in meters from zero, not percent.

public Vec3d Origin

Field Value

Vec3d

RotateX

The cube's rotation around the X axis.

public float RotateX

Field Value

float

RotateY

The cube's rotation around the Y axis.

public float RotateY

Field Value

float

RotateZ

The cube's rotation around the Z axis.

public float RotateZ

Field Value

float

Methods

Clone()

public RotatableCube Clone()

Returns

RotatableCube

RotatedCopy()

public Cuboidf RotatedCopy()

Returns

Cuboidf

ToHitboxCuboidi(float, Vec3d)

public Cuboidi ToHitboxCuboidi(float rotateY, Vec3d origin = null)

Parameters

rotateY float
origin Vec3d

Returns

Cuboidi