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
RotatedCuboidf(Cuboidf)
public RotatedCuboidf(Cuboidf cuboid)
Parameters
cuboidCuboidf
RotatedCuboidf(Cuboidf, Vec3d)
public RotatedCuboidf(Cuboidf cuboid, Vec3d rotationCenter)
Parameters
RotatedCuboidf(Cuboidf, Vec3f)
public RotatedCuboidf(Cuboidf cuboid, Vec3f rotationCenter)
Parameters
RotatedCuboidf(Cuboidf, Vec3f, float[])
public RotatedCuboidf(Cuboidf cuboid, Vec3f rotationCenter, float[] quaternion)
Parameters
Properties
RotationCenter
public Vec3f RotationCenter { get; }
Property Value
Methods
Clone()
public RotatedCuboidf Clone()
Returns
Contains(double, double, double)
public bool Contains(double x, double y, double z)
Parameters
Returns
ContainsOrTouches(float, float, float)
public bool ContainsOrTouches(float x, float y, float z)
Parameters
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(RotatedCuboidf?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(RotatedCuboidf? other)
Parameters
otherRotatedCuboidfAn object to compare with this object.
Returns
GetAABB()
public Cuboidf GetAABB()
Returns
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
otherCuboidd
Returns
Intersects(Cuboidd, Vec3d)
public bool Intersects(Cuboidd other, Vec3d off)
Parameters
Returns
Intersects(Cuboidf)
public bool Intersects(Cuboidf other)
Parameters
otherCuboidf
Returns
Intersects(Cuboidf, double, double, double)
public override bool Intersects(Cuboidf other, double offsetx, double offsety, double offsetz)
Parameters
Returns
Intersects(Cuboidf, Vec3d)
public override bool Intersects(Cuboidf other, Vec3d off)
Parameters
Returns
IntersectsOrTouches(Cuboidd, Vec3d)
public bool IntersectsOrTouches(Cuboidd other, Vec3d off)
Parameters
Returns
IntersectsOrTouches(Cuboidf)
If the given cuboid intersects with this cuboid
public override bool IntersectsOrTouches(Cuboidf other)
Parameters
otherCuboidf
Returns
IntersectsOrTouches(Cuboidf, Vec3d)
public override bool IntersectsOrTouches(Cuboidf other, Vec3d off)
Parameters
Returns
IsRotated()
public override bool IsRotated()
Returns
OffsetCopy(float, float, float)
public RotatedCuboidf OffsetCopy(float x, float y, float z)
Parameters
Returns
OffsetCopy(IVec3)
public RotatedCuboidf OffsetCopy(IVec3 vec)
Parameters
vecIVec3
Returns
OffsetCopyDouble(double, double, double)
Returns a new cuboid offseted by given position
public override Cuboidd OffsetCopyDouble(double x, double y, double z)
Parameters
Returns
OffsetCopyDouble(IVec3)
public Cuboidd OffsetCopyDouble(IVec3 vec)
Parameters
vecIVec3
Returns
RotatedCopy(float, float, float, Vec3d)
public RotatedCuboidf RotatedCopy(float degX, float degY, float degZ, Vec3d origin)
Parameters
Returns
RotatedCopy(IVec3, Vec3d)
public RotatedCuboidf RotatedCopy(IVec3 vec, Vec3d origin)
Parameters
Returns
SetRotationCenter(Vec3f)
public RotatedCuboidf SetRotationCenter(Vec3f center)
Parameters
centerVec3f
Returns
SetRotationEuler(float, float, float)
public RotatedCuboidf SetRotationEuler(float degX, float degY, float degZ)
Parameters
Returns
SetRotationQuaternion(float[])
public RotatedCuboidf SetRotationQuaternion(float[] quaternion)
Parameters
quaternionfloat[]
Returns
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
fromCuboidfxfloatdirectionEnumPushDirection
Returns
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
fromCuboidfyfloatdirectionEnumPushDirection
Returns
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
fromCuboidfzfloatdirectionEnumPushDirection