[This is preliminary documentation and is subject to change.]

Determines whether or not the two points are within range of each other based on a xz-plane radius and a y-axis height.

Namespace: org.critterai
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static bool IsInRange(
	Vector3 a,
	Vector3 b,
	float radius,
	float height
)
Public Shared Function IsInRange ( _
	a As Vector3, _
	b As Vector3, _
	radius As Single, _
	height As Single _
) As Boolean
public:
static bool IsInRange(
	Vector3 a, 
	Vector3 b, 
	float radius, 
	float height
)

Parameters

a
Vector3
Point A.
b
Vector3
Point B.
radius
Single
The allowed radius on the xz-plane.
height
Single
The allowed y-axis delta.

Return Value

True if the two vectors are within the xz-radius and y-height of each other.

Remarks

Essentially, one point defines the centroid of the cylinder and the other is tested for inclusion. The height test is (Math.Abs(deltaY) < height)

See Also