Class RotatedCuboidd
- Namespace
- Vintagestory.API.MathTools
- Assembly
- VintagestoryAPI.dll
public class RotatedCuboidd : Cuboidd, IEquatable<Cuboidd>, IRotatedCuboid<double, RotatedCuboidd>, IEquatable<RotatedCuboidd>
- Inheritance
-
RotatedCuboidd
- Implements
- Inherited Members
- Extension Methods
Constructors
RotatedCuboidd()
public RotatedCuboidd()
RotatedCuboidd(double, double, double, double, double, double)
public RotatedCuboidd(double x1, double y1, double z1, double x2, double y2, double z2)
Parameters
RotatedCuboidd(Cuboidd)
public RotatedCuboidd(Cuboidd cuboid)
Parameters
cuboidCuboidd
RotatedCuboidd(Cuboidd, Vec3d)
public RotatedCuboidd(Cuboidd cuboid, Vec3d rotationCenter)
Parameters
RotatedCuboidd(Cuboidd, Vec3d, double[])
public RotatedCuboidd(Cuboidd cuboid, Vec3d rotationCenter, double[] quaternion)
Parameters
RotatedCuboidd(RotatedCuboidf, double, double, double)
public RotatedCuboidd(RotatedCuboidf source, double offsetX, double offsetY, double offsetZ)
Parameters
sourceRotatedCuboidfoffsetXdoubleoffsetYdoubleoffsetZdouble
Properties
RotationCenterDouble
public Vec3d RotationCenterDouble { get; }
Property Value
Methods
Clone()
Creates a copy of the cuboid
public override RotatedCuboidd Clone()
Returns
Contains(double, double, double)
public bool Contains(double x, double y, double 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(RotatedCuboidd?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(RotatedCuboidd? other)
Parameters
otherRotatedCuboiddAn object to compare with this object.
Returns
GetAABB()
public Cuboidd GetAABB()
Returns
GetAABB(Cuboidd)
Writes the world-space axis-aligned bounds of this cuboid into the supplied result.
public Cuboidd GetAABB(Cuboidd result)
Parameters
resultCuboidd
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetRotationMatrix()
public double[] GetRotationMatrix()
Returns
- double[]
GetRotationQuaternion()
public double[] GetRotationQuaternion()
Returns
- double[]
Intersects(Cuboidd)
If the given cuboid intersects with this cuboid
public override bool Intersects(Cuboidd other)
Parameters
otherCuboidd
Returns
Intersects(Cuboidd, Vec3d)
public bool Intersects(Cuboidd other, Vec3d off)
Parameters
Returns
Intersects(Cuboidf)
If the given cuboid intersects with this cuboid
public override 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)
If the given cuboid intersects with this cuboid
public override bool Intersects(Cuboidf other, Vec3d off)
Parameters
Returns
IntersectsOrTouches(Cuboidd)
If the given cuboid intersects with this cuboid
public override bool IntersectsOrTouches(Cuboidd other)
Parameters
otherCuboidd
Returns
IntersectsOrTouches(Cuboidd, Vec3d)
public bool IntersectsOrTouches(Cuboidd other, Vec3d off)
Parameters
Returns
IntersectsOrTouches(Cuboidf, double, double, double)
If the given cuboid intersects with this cuboid
public override bool IntersectsOrTouches(Cuboidf other, double offsetX, double offsetY, double offsetZ)
Parameters
Returns
IntersectsOrTouches(Cuboidf, Vec3d)
If the given cuboid intersects with this cuboid
public override bool IntersectsOrTouches(Cuboidf other, Vec3d off)
Parameters
Returns
IsRotated()
public override bool IsRotated()
Returns
OffsetCopy(double, double, double)
public RotatedCuboidd OffsetCopy(double x, double y, double z)
Parameters
Returns
OffsetCopy(IVec3)
public RotatedCuboidd OffsetCopy(IVec3 vec)
Parameters
vecIVec3
Returns
Set(double, double, double, double, double, double)
public RotatedCuboidd Set(double x1, double y1, double z1, double x2, double y2, double z2)
Parameters
Returns
Set(double, double, double, double, double, double, Vec3d, double[])
Copies the supplied bounds and rotation into this cuboid while retaining its reusable collision state.
public RotatedCuboidd Set(double x1, double y1, double z1, double x2, double y2, double z2, Vec3d rotationCenter, double[] quaternion)
Parameters
x1doubley1doublez1doublex2doubley2doublez2doublerotationCenterVec3dquaterniondouble[]
Returns
SetRotationCenter(Vec3d)
public RotatedCuboidd SetRotationCenter(Vec3d center)
Parameters
centerVec3d
Returns
SetRotationEuler(double, double, double)
public RotatedCuboidd SetRotationEuler(double degX, double degY, double degZ)
Parameters
Returns
SetRotationQuaternion(double[])
public RotatedCuboidd SetRotationQuaternion(double[] quaternion)
Parameters
quaterniondouble[]
Returns
pushOutX(Cuboidd, double, ref EnumPushDirection)
Returns a new x coordinate that's ensured to be outside this cuboid. Used for collision detection.
public override double pushOutX(Cuboidd from, double x, ref EnumPushDirection direction)
Parameters
fromCuboiddxdoubledirectionEnumPushDirection
Returns
pushOutY(Cuboidd, double, ref EnumPushDirection)
Returns a new y coordinate that's ensured to be outside this cuboid. Used for collision detection.
public override double pushOutY(Cuboidd from, double y, ref EnumPushDirection direction)
Parameters
fromCuboiddydoubledirectionEnumPushDirection
Returns
pushOutZ(Cuboidd, double, ref EnumPushDirection)
Returns a new z coordinate that's ensured to be outside this cuboid. Used for collision detection.
public override double pushOutZ(Cuboidd from, double z, ref EnumPushDirection direction)
Parameters
fromCuboiddzdoubledirectionEnumPushDirection