Raycast Gizmos visualizer  1.0
Kit.Physic.CapsuleOverlapData Struct Reference

Structure wrapper for CapsuleOverlap More...

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

Public Member Functions

 CapsuleOverlapData (Vector3 _point0, Vector3 _point1, float _radius)
 Prepare physics raycast parameters More...
 
Collider [] Overlap (Vector3 _point0, Vector3 _point1, float _radius, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Check the given capsule against the physics world and return all overlapping colliders. More...
 
Collider [] Overlap (int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Check the given capsule against the physics world and return all overlapping colliders. More...
 
int OverlapNonAlloc (Vector3 _point0, Vector3 _point1, float _radius, ref Collider[] results, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Check the given capsule against the physics world and return all overlapping colliders in the user-provided buffer. Same as Physics.OverlapCapsule but does not allocate anything on the managed heap. More...
 
int OverlapNonAlloc (ref Collider[] results, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal)
 Check the given capsule against the physics world and return all overlapping colliders in the user-provided buffer. Same as Physics.OverlapCapsule but does not allocate anything on the managed heap. More...
 
void DrawOverlapGizmos (ref Collider[] colliderResult, int validArraySize, Color color=default(Color), Color hitColor=default(Color))
 Provide vizualize information (Gizmos) More...
 
void Update (Vector3 _point0, Vector3 _point1, float _radius)
 Update parameters More...
 
void Reset ()
 Reset parameters More...
 
override string ToString ()
 Provide vizualize information (Gizmos) More...
 

Public Attributes

Vector3 point0
 The center of the sphere at the start of the capsule. More...
 
Vector3 point1
 The center of the sphere at the end of the capsule. More...
 
float radius
 The radius of the capsule. More...
 

Properties

static CapsuleOverlapData NONE [get]
 
int hitCount [get]
 hit count for last physics check. More...
 
bool hitted [get]
 hit result for last physics check. More...
 

Detailed Description

Structure wrapper for CapsuleOverlap

Constructor & Destructor Documentation

◆ CapsuleOverlapData()

Kit.Physic.CapsuleOverlapData.CapsuleOverlapData ( Vector3  _point0,
Vector3  _point1,
float  _radius 
)

Prepare physics raycast parameters

Parameters
_point0The center of the sphere at the start of the capsule.
_point1The center of the sphere at the end of the capsule.
_radiusThe radius of the capsule.

Member Function Documentation

◆ DrawOverlapGizmos()

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

Provide vizualize information (Gizmos)

Parameters
colormain color of Gizmos
hitColorhit color of Gizmos

Implements Kit.Physic.IOverlapStruct.

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

◆ Overlap() [1/2]

Collider [] Kit.Physic.CapsuleOverlapData.Overlap ( Vector3  _point0,
Vector3  _point1,
float  _radius,
int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Check the given capsule against the physics world and return all overlapping colliders.

Parameters
_point0The center of the sphere at the start of the capsule.
_point1The center of the sphere at the end of the capsule.
_radiusThe radius of the capsule.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a capsule.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
Collider[] Colliders touching or inside the capsule.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapCapsule.html

◆ Overlap() [2/2]

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

Check the given capsule against the physics world and return all overlapping colliders.

Parameters
layerMaskA Layer mask that is used to selectively ignore colliders when casting a capsule.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
Collider[] Colliders touching or inside the capsule.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapCapsule.html

◆ OverlapNonAlloc() [1/2]

int Kit.Physic.CapsuleOverlapData.OverlapNonAlloc ( Vector3  _point0,
Vector3  _point1,
float  _radius,
ref Collider []  results,
int  layerMask = Physics.DefaultRaycastLayers,
QueryTriggerInteraction  queryTriggerInteraction = QueryTriggerInteraction.UseGlobal 
)

Check the given capsule against the physics world and return all overlapping colliders in the user-provided buffer. Same as Physics.OverlapCapsule but does not allocate anything on the managed heap.

Parameters
_point0The center of the sphere at the start of the capsule.
_point1The center of the sphere at the end of the capsule.
_radiusThe radius of the capsule.
resultsThe buffer to store the results into.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a capsule.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
int The amount of entries written to the buffer.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapCapsuleNonAlloc.html

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

◆ OverlapNonAlloc() [2/2]

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

Check the given capsule against the physics world and return all overlapping colliders in the user-provided buffer. Same as Physics.OverlapCapsule but does not allocate anything on the managed heap.

Parameters
resultsThe buffer to store the results into.
layerMaskA Layer mask that is used to selectively ignore colliders when casting a capsule.
queryTriggerInteractionSpecifies whether this query should hit Triggers.
Returns
int The amount of entries written to the buffer.
See also
https://docs.unity3d.com/ScriptReference/Physics.OverlapCapsuleNonAlloc.html

◆ Reset()

void Kit.Physic.CapsuleOverlapData.Reset ( )

Reset parameters

Implements Kit.Physic.IRayStructBase.

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

◆ ToString()

override string Kit.Physic.CapsuleOverlapData.ToString ( )

Provide vizualize information (Gizmos)

Implements Kit.Physic.IRayStructBase.

◆ Update()

void Kit.Physic.CapsuleOverlapData.Update ( Vector3  _point0,
Vector3  _point1,
float  _radius 
)

Update parameters

Parameters
_origin
_orientation
_halfExtends

Member Data Documentation

◆ point0

Vector3 Kit.Physic.CapsuleOverlapData.point0

The center of the sphere at the start of the capsule.

◆ point1

Vector3 Kit.Physic.CapsuleOverlapData.point1

The center of the sphere at the end of the capsule.

◆ radius

float Kit.Physic.CapsuleOverlapData.radius

The radius of the capsule.

Property Documentation

◆ hitCount

int Kit.Physic.CapsuleOverlapData.hitCount
get

hit count for last physics check.

◆ hitted

bool Kit.Physic.CapsuleOverlapData.hitted
get

hit result for last physics check.

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

◆ NONE

CapsuleOverlapData Kit.Physic.CapsuleOverlapData.NONE
staticget

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