C# Class ManicDigger.Collisions.Intersection

Mostrar archivo Open project: GlennMR/800Craft-Client

Public Methods

Method Description
BoxTriangles ( Vector3 a, Vector3 b ) : IEnumerable
BoxTrianglesAndSides ( Vector3 a, Vector3 b ) : IEnumerable
CheckLineBox ( Box3D box, Line3D line, Vector3 &hit ) : bool

Warning: randomly returns incorrect hit position (back side of box).

CheckLineBox ( Vector3 B1, Vector3 B2, Vector3 L1, Vector3 L2, Vector3 &Hit ) : bool
CheckLineBoxExact ( Line3D line, Box3D box ) : BlockPosSide?
RayTriangle ( Line3D R, Triangle3D T, Vector3 &I ) : int

Private Methods

Method Description
GetIntersection ( float fDst1, float fDst2, Vector3 P1, Vector3 P2, Vector3 &Hit ) : bool
InBox ( Vector3 Hit, Vector3 B1, Vector3 B2, int Axis ) : bool
Interpolate ( Vector3 a, Vector3 b, float f ) : Vector3
PointInBox ( Vector3 v, Box3D node ) : bool
dot ( Vector3 u, Vector3 v ) : float

Method Details

BoxTriangles() public static method

public static BoxTriangles ( Vector3 a, Vector3 b ) : IEnumerable
a Vector3
b Vector3
return IEnumerable

BoxTrianglesAndSides() public static method

public static BoxTrianglesAndSides ( Vector3 a, Vector3 b ) : IEnumerable
a Vector3
b Vector3
return IEnumerable

CheckLineBox() public static method

Warning: randomly returns incorrect hit position (back side of box).
public static CheckLineBox ( Box3D box, Line3D line, Vector3 &hit ) : bool
box Box3D
line Line3D
hit Vector3
return bool

CheckLineBox() public static method

public static CheckLineBox ( Vector3 B1, Vector3 B2, Vector3 L1, Vector3 L2, Vector3 &Hit ) : bool
B1 Vector3
B2 Vector3
L1 Vector3
L2 Vector3
Hit Vector3
return bool

CheckLineBoxExact() public static method

public static CheckLineBoxExact ( Line3D line, Box3D box ) : BlockPosSide?
line Line3D
box Box3D
return BlockPosSide?

RayTriangle() public static method

public static RayTriangle ( Line3D R, Triangle3D T, Vector3 &I ) : int
R Line3D
T Triangle3D
I Vector3
return int