Raycast Gizmos visualizer  1.0
Kit.Physic.BoxOverlapData Struct Reference

Structure wrapper for OverlapBox More...

Inheritance diagram for Kit.Physic.BoxOverlapData:
Kit.Physic.IOverlapStruct Kit.Physic.IRayStructBase

Public Member Functions

 BoxOverlapData (Vector3 _origin, Vector3 _halfExtends, Quaternion _orientation)
 Prepare physics raycast parameters More...
 
Collider [] Overlap (Vector3 _origin, Vector3 _halfExtends, Quaternion _orientation, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Find all colliders touching or inside of the given box. More...
 
Collider [] Overlap (int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Find all colliders touching or inside of the given box. More...
 
int OverlapNonAlloc (Vector3 _origin, Vector3 _halfExtends, Quaternion _orientation, ref Collider[] results, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Find all colliders touching or inside of the given box, and store them into the buffer. More...
 
int OverlapNonAlloc (ref Collider[] results, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Find all colliders touching or inside of the given box, and store them into the buffer. More...
 
void DrawOverlapGizmos (ref Collider[] colliderResult, int validArraySize, Color color=default(Color), Color hitColor=default(Color))
 Provide vizualize information (Gizmos) More...
 
void Update (Vector3 _origin, Vector3 _halfExtends, Quaternion _orientation)
 Update parameters More...
 
void Reset ()
 Reset parameters More...
 
override string ToString ()
 Provide vizualize information (Gizmos) More...
 

Public Attributes

Vector3 origin
 Center of the box. More...
 
Vector3 halfExtends
 Half of the size of the box in each dimension. More...
 
Quaternion orientation
 Rotation of the box. More...
 

Properties

static BoxOverlapData NONE [get]
 
int hitCount [get]
 hit count from last physics check. More...
 
bool hitted [get]
 bool, True if last physics result are hit. More...
 

Detailed Description

Structure wrapper for OverlapBox

Constructor & Destructor Documentation

◆ BoxOverlapData()

Kit.Physic.BoxOverlapData.BoxOverlapData ( Vector3  _origin,
Vector3  _halfExtends,
Quaternion  _orientation 
)

Prepare physics raycast parameters

Parameters
_originCenter of the box.
_orientation
_halfExtends

Member Function Documentation

◆ DrawOverlapGizmos()

void Kit.Physic.BoxOverlapData.DrawOverlapGizmos ( ref Collider []  colliderResult,
int  validArraySize,
Color  color = default(Color),
Color  hitColor = default(Color) 
)

Provide vizualize information (Gizmos)

Parameters
colliderResultThe cached array of collider result.
validArraySizeThe cached hit count from result.
colormain color of Gizmos
hitColorhit color of Gizmos

Implements Kit.Physic.IOverlapStruct.

Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().

◆ Overlap() [1/2]

Collider [] Kit.Physic.BoxOverlapData.Overlap ( Vector3  _origin,
Vector3  _halfExtends,
Quaternion  _orientation,
int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Find all colliders touching or inside of the given box.

Parameters
_originCenter of the box.
_halfExtendsHalf of the size of the box in each dimension.
_orientationRotation of the box.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a ray.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
Returns an array with all colliders touching or inside the sphere.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapBox.html

◆ Overlap() [2/2]

Collider [] Kit.Physic.BoxOverlapData.Overlap ( int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Find all colliders touching or inside of the given box.

Parameters
layerMaskA Layer mask that is used to selectively ignore colliders when casting a ray.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
Returns an array with all colliders touching or inside the sphere.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapBox.html

◆ OverlapNonAlloc() [1/2]

int Kit.Physic.BoxOverlapData.OverlapNonAlloc ( Vector3  _origin,
Vector3  _halfExtends,
Quaternion  _orientation,
ref Collider []  results,
int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Find all colliders touching or inside of the given box, and store them into the buffer.

Parameters
_originCenter of the box.
_halfExtendsHalf of the size of the box in each dimension.
_orientationRotation of the box.
resultsThe buffer to store the results in.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a ray.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
int The amount of colliders stored in results.

https://docs.unity3d.com/ScriptReference/Physics.OverlapBoxNonAlloc.html

Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().

◆ OverlapNonAlloc() [2/2]

int Kit.Physic.BoxOverlapData.OverlapNonAlloc ( ref Collider []  results,
int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Find all colliders touching or inside of the given box, and store them into the buffer.

Parameters
resultsThe buffer to store the results in.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a ray.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
int The amount of colliders stored in results.

https://docs.unity3d.com/ScriptReference/Physics.OverlapBoxNonAlloc.html

◆ Reset()

void Kit.Physic.BoxOverlapData.Reset ( )

Reset parameters

Implements Kit.Physic.IRayStructBase.

Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().

◆ ToString()

override string Kit.Physic.BoxOverlapData.ToString ( )

Provide vizualize information (Gizmos)

Implements Kit.Physic.IRayStructBase.

◆ Update()

void Kit.Physic.BoxOverlapData.Update ( Vector3  _origin,
Vector3  _halfExtends,
Quaternion  _orientation 
)

Update parameters

Parameters
_origin
_halfExtends
_orientation

Member Data Documentation

◆ halfExtends

Vector3 Kit.Physic.BoxOverlapData.halfExtends

Half of the size of the box in each dimension.

◆ orientation

Quaternion Kit.Physic.BoxOverlapData.orientation

Rotation of the box.

◆ origin

Vector3 Kit.Physic.BoxOverlapData.origin

Center of the box.

Property Documentation

◆ hitCount

int Kit.Physic.BoxOverlapData.hitCount
get

hit count from last physics check.

◆ hitted

bool Kit.Physic.BoxOverlapData.hitted
get

bool, True if last physics result are hit.

Referenced by Kit.Physic.RaycastHelper.CheckPhysic().

◆ NONE

BoxOverlapData Kit.Physic.BoxOverlapData.NONE
staticget

The documentation for this struct was generated from the following file: