Table of Contents

Class AABBIntersectionTest

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll
public class AABBIntersectionTest
Inheritance
AABBIntersectionTest
Inherited Members

Constructors

AABBIntersectionTest(IWorldIntersectionSupplier)

public AABBIntersectionTest(IWorldIntersectionSupplier blockSelectionTester)

Parameters

blockSelectionTester IWorldIntersectionSupplier

Fields

blockSelectionTester

public IWorldIntersectionSupplier blockSelectionTester

Field Value

IWorldIntersectionSupplier

hitOnBlockFace

public BlockFacing hitOnBlockFace

Field Value

BlockFacing

hitOnSelectionBox

public int hitOnSelectionBox

Field Value

int

hitPosition

public Vec3d hitPosition

Field Value

Vec3d

pos

public BlockPos pos

Field Value

BlockPos

ray

public Ray ray

Field Value

Ray

Methods

GetSelectedBlock(float, BlockFilter)

public BlockSelection GetSelectedBlock(float maxDistance, BlockFilter filter = null)

Parameters

maxDistance float
filter BlockFilter

Returns

BlockSelection

GetSelectedBlock(Vec3d, Vec3d, BlockFilter)

public BlockSelection GetSelectedBlock(Vec3d from, Vec3d to, BlockFilter filter = null)

Parameters

from Vec3d
to Vec3d
filter BlockFilter

Returns

BlockSelection

LoadRayAndPos(Line3D)

public void LoadRayAndPos(Line3D line3d)

Parameters

line3d Line3D

LoadRayAndPos(Ray)

public void LoadRayAndPos(Ray ray)

Parameters

ray Ray

RayInteresectWithCuboidSlabMethod(Cuboidd, Ray)

public static bool RayInteresectWithCuboidSlabMethod(Cuboidd b, Ray r)

Parameters

b Cuboidd
r Ray

Returns

bool

RayIntersectsBlockSelectionBox(BlockPos, BlockFilter)

public bool RayIntersectsBlockSelectionBox(BlockPos pos, BlockFilter filter)

Parameters

pos BlockPos
filter BlockFilter

Returns

bool

RayIntersectsWithCuboid(Cuboidd, ref BlockFacing, ref Vec3d)

public bool RayIntersectsWithCuboid(Cuboidd selectionBox, ref BlockFacing hitOnBlockFace, ref Vec3d hitPosition)

Parameters

selectionBox Cuboidd
hitOnBlockFace BlockFacing
hitPosition Vec3d

Returns

bool

RayIntersectsWithCuboid(Cuboidf, double, double, double)

public bool RayIntersectsWithCuboid(Cuboidf selectionBox, double posX, double posY, double posZ)

Parameters

selectionBox Cuboidf
posX double
posY double
posZ double

Returns

bool