UxrMathUtils.IsBoxInsideBox Method (Vector3, Quaternion, Vector3, Vector3, Vector3, Vector3, Quaternion, Vector3, Vector3, Vector3, Vector3)

Checks if box1 is completely (all corners) inside box2

Namespace: UltimateXR.Core.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static bool IsBoxInsideBox(
	Vector3 box1Position,
	Quaternion box1Rotation,
	Vector3 box1Scale,
	Vector3 box1Center,
	Vector3 box1Size,
	Vector3 box2Position,
	Quaternion box2Rotation,
	Vector3 box2Scale,
	Vector3 box2Center,
	Vector3 box2Size,
	Vector3 margin = default
)

Parameters

 

box1Position
Type: Vector3
Position of box1
box1Rotation
Type: Quaternion
Rotation of box1
box1Scale
Type: Vector3
Scale of box1
box1Center
Type: Vector3
Center of box1 in its own local coordinates
box1Size
Type: Vector3
Size of box1 in its own local coordinates
box2Position
Type: Vector3
Position of box2
box2Rotation
Type: Quaternion
Rotation of box2
box2Scale
Type: Vector3
Scale of box2
box2Center
Type: Vector3
Center of box2 in its own local coordinates
box2Size
Type: Vector3
Size of box2 in its own local coordinates
margin (Optional)
Type: Vector3
Allowed margin for each x, y, z component

Return Value

Type: Boolean
True if all corners of box1 are inside box2 plus margin

See Also

Reference

UxrMathUtils Class
IsBoxInsideBox Overload
UltimateXR.Core.Math Namespace