Table of Contents

Class RotatedCuboidf

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll
public class RotatedCuboidf : Cuboidf, IEquatable<Cuboidf>, IRotatedCuboid<float, RotatedCuboidf>, IEquatable<RotatedCuboidf>
Inheritance
RotatedCuboidf
Implements
Inherited Members
Extension Methods

Constructors

RotatedCuboidf()

public RotatedCuboidf()

RotatedCuboidf(float, float, float, float, float, float)

public RotatedCuboidf(float x1, float y1, float z1, float x2, float y2, float z2)

Parameters

x1 float
y1 float
z1 float
x2 float
y2 float
z2 float

RotatedCuboidf(Cuboidf)

public RotatedCuboidf(Cuboidf cuboid)

Parameters

cuboid Cuboidf

RotatedCuboidf(Cuboidf, Vec3d)

public RotatedCuboidf(Cuboidf cuboid, Vec3d rotationCenter)

Parameters

cuboid Cuboidf
rotationCenter Vec3d

RotatedCuboidf(Cuboidf, Vec3f)

public RotatedCuboidf(Cuboidf cuboid, Vec3f rotationCenter)

Parameters

cuboid Cuboidf
rotationCenter Vec3f

RotatedCuboidf(Cuboidf, Vec3f, float[])

public RotatedCuboidf(Cuboidf cuboid, Vec3f rotationCenter, float[] quaternion)

Parameters

cuboid Cuboidf
rotationCenter Vec3f
quaternion float[]

Properties

RotationCenter

public Vec3f RotationCenter { get; }

Property Value

Vec3f

Methods

Clone()

public RotatedCuboidf Clone()

Returns

RotatedCuboidf

Contains(double, double, double)

public bool Contains(double x, double y, double z)

Parameters

x double
y double
z double

Returns

bool

ContainsOrTouches(float, float, float)

public bool ContainsOrTouches(float x, float y, float z)

Parameters

x float
y float
z float

Returns

bool

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(RotatedCuboidf?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(RotatedCuboidf? other)

Parameters

other RotatedCuboidf

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetAABB()

public Cuboidf GetAABB()

Returns

Cuboidf

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetRotationMatrix()

public float[] GetRotationMatrix()

Returns

float[]

GetRotationQuaternion()

public float[] GetRotationQuaternion()

Returns

float[]

Intersects(Cuboidd)

public bool Intersects(Cuboidd other)

Parameters

other Cuboidd

Returns

bool

Intersects(Cuboidd, Vec3d)

public bool Intersects(Cuboidd other, Vec3d off)

Parameters

other Cuboidd
off Vec3d

Returns

bool

Intersects(Cuboidf)

public bool Intersects(Cuboidf other)

Parameters

other Cuboidf

Returns

bool

Intersects(Cuboidf, double, double, double)

public override bool Intersects(Cuboidf other, double offsetx, double offsety, double offsetz)

Parameters

other Cuboidf
offsetx double
offsety double
offsetz double

Returns

bool

Intersects(Cuboidf, Vec3d)

public override bool Intersects(Cuboidf other, Vec3d off)

Parameters

other Cuboidf
off Vec3d

Returns

bool

IntersectsOrTouches(Cuboidd, Vec3d)

public bool IntersectsOrTouches(Cuboidd other, Vec3d off)

Parameters

other Cuboidd
off Vec3d

Returns

bool

IntersectsOrTouches(Cuboidf)

If the given cuboid intersects with this cuboid

public override bool IntersectsOrTouches(Cuboidf other)

Parameters

other Cuboidf

Returns

bool

IntersectsOrTouches(Cuboidf, Vec3d)

public override bool IntersectsOrTouches(Cuboidf other, Vec3d off)

Parameters

other Cuboidf
off Vec3d

Returns

bool

IsRotated()

public override bool IsRotated()

Returns

bool

OffsetCopy(float, float, float)

public RotatedCuboidf OffsetCopy(float x, float y, float z)

Parameters

x float
y float
z float

Returns

RotatedCuboidf

OffsetCopy(IVec3)

public RotatedCuboidf OffsetCopy(IVec3 vec)

Parameters

vec IVec3

Returns

RotatedCuboidf

OffsetCopyDouble(double, double, double)

Returns a new cuboid offseted by given position

public override Cuboidd OffsetCopyDouble(double x, double y, double z)

Parameters

x double
y double
z double

Returns

Cuboidd

OffsetCopyDouble(IVec3)

public Cuboidd OffsetCopyDouble(IVec3 vec)

Parameters

vec IVec3

Returns

Cuboidd

RotatedCopy(float, float, float, Vec3d)

public RotatedCuboidf RotatedCopy(float degX, float degY, float degZ, Vec3d origin)

Parameters

degX float
degY float
degZ float
origin Vec3d

Returns

RotatedCuboidf

RotatedCopy(IVec3, Vec3d)

public RotatedCuboidf RotatedCopy(IVec3 vec, Vec3d origin)

Parameters

vec IVec3
origin Vec3d

Returns

RotatedCuboidf

SetRotationCenter(Vec3f)

public RotatedCuboidf SetRotationCenter(Vec3f center)

Parameters

center Vec3f

Returns

RotatedCuboidf

SetRotationEuler(float, float, float)

public RotatedCuboidf SetRotationEuler(float degX, float degY, float degZ)

Parameters

degX float
degY float
degZ float

Returns

RotatedCuboidf

SetRotationQuaternion(float[])

public RotatedCuboidf SetRotationQuaternion(float[] quaternion)

Parameters

quaternion float[]

Returns

RotatedCuboidf

pushOutX(Cuboidf, float, ref EnumPushDirection)

Returns a new x coordinate that's ensured to be outside this cuboid. Used for collision detection.

public override double pushOutX(Cuboidf from, float x, ref EnumPushDirection direction)

Parameters

from Cuboidf
x float
direction EnumPushDirection

Returns

double

pushOutY(Cuboidf, float, ref EnumPushDirection)

Returns a new y coordinate that's ensured to be outside this cuboid. Used for collision detection.

public override double pushOutY(Cuboidf from, float y, ref EnumPushDirection direction)

Parameters

from Cuboidf
y float
direction EnumPushDirection

Returns

double

pushOutZ(Cuboidf, float, ref EnumPushDirection)

Returns a new z coordinate that's ensured to be outside this cuboid. Used for collision detection.

public override double pushOutZ(Cuboidf from, float z, ref EnumPushDirection direction)

Parameters

from Cuboidf
z float
direction EnumPushDirection

Returns

double