TrueSync: TrueSync.TSPhysics2D Class Reference

TrueSync

TrueSync.TSPhysics2D Class Reference

Helpers for 2D physics. More...

Public Types

enum  TSCapsuleDirection2D { VERTICAL, HORIZONTAL }
 

Static Public Member Functions

static TSCollider2D OverlapCircle (TSVector2 point, FP radius, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a circular area. Returns null if there is none. More...
 
static TSCollider2D[] OverlapCircleAll (TSVector2 point, FP radius, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns all TSCollider2D within a circular area. Returns null if there is none. More...
 
static object _OverlapArea (TSVector2 pointA, TSVector2 pointB, Physics2D.BodySpecialSensor sensorType, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More...
 
static TSCollider2D OverlapArea (TSVector2 pointA, TSVector2 pointB, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More...
 
static TSCollider2D[] OverlapAreaAll (TSVector2 pointA, TSVector2 pointB, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns all TSCollider2D within a rectangular area. Returns null if there is none. More...
 
static TSCollider2D OverlapPoint (TSVector2 point, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a small circular area. Returns null if there is none. More...
 
static TSCollider2D[] OverlapPointAll (TSVector2 point, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns all TSCollider2D within a small circular area. Returns null if there is none. More...
 
static TSCollider2D OverlapBox (TSVector2 point, TSVector2 size, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a box area. Returns null if there is none. More...
 
static TSCollider2D[] OverlapBoxAll (TSVector2 point, TSVector2 size, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns all TSCollider2D within a box area. Returns null if there is none. More...
 
static TSCollider2D OverlapCapsule (TSVector2 point, TSVector2 size, TSCapsuleDirection2D direction, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns the first TSCollider2D within a capsule area. Returns null if there is none. More...
 
static TSCollider2D[] OverlapCapsuleAll (TSVector2 point, TSVector2 size, TSCapsuleDirection2D direction, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Returns all TSCollider2D within a capsule area. Returns null if there is none. More...
 
static object _CircleCast (TSVector2 origin, FP radius, TSVector2 direction, FP distance, Physics2D.BodySpecialSensor sensorType, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 
static TSRaycastHit2D CircleCast (TSVector2 origin, FP radius, TSVector2 direction, FP distance, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Cast a circle and returns a TSRaycastHit2D with information about the first TSCollider2D found. Returns null if there is none. More...
 
static TSRaycastHit2D[] CircleCastAll (TSVector2 origin, FP radius, TSVector2 direction, FP distance, int layerMask=UnityEngine.Physics.DefaultRaycastLayers)
 Cast a circle and returns an array TSRaycastHit2D with information about all TSCollider2D found. Returns null if there is none. More...
 
static TSRaycastHit2D Raycast (TSVector2 origin, TSVector2 direction, FP distance)
 
static TSRaycastHit2D[] RaycastAll (TSVector2 origin, TSVector2 direction, FP distance)
 

Detailed Description

Helpers for 2D physics.

Definition at line 9 of file TSPhysics2D.cs.

Member Function Documentation

static object TrueSync.TSPhysics2D._OverlapArea ( TSVector2  pointA,
TSVector2  pointB,
Physics2D.BodySpecialSensor  sensorType,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a rectangular area. Returns null if there is none.

Parameters
pointATop-left corner of the rectangle.
radiusBottom-right corner of the rectangle.
layerMaskUnity's layer mask to filter objects.

Definition at line 88 of file TSPhysics2D.cs.

static TSRaycastHit2D TrueSync.TSPhysics2D.CircleCast ( TSVector2  origin,
FP  radius,
TSVector2  direction,
FP  distance,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Cast a circle and returns a TSRaycastHit2D with information about the first TSCollider2D found. Returns null if there is none.

Parameters
originOrigin of the circle in world space.
radiusRadius of the circle.
directionDirection TSVector2 of the cast.
distanceMax distance to reach.
layerMaskUnity's layer mask to filter objects.

Definition at line 269 of file TSPhysics2D.cs.

static TSRaycastHit2D [] TrueSync.TSPhysics2D.CircleCastAll ( TSVector2  origin,
FP  radius,
TSVector2  direction,
FP  distance,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Cast a circle and returns an array TSRaycastHit2D with information about all TSCollider2D found. Returns null if there is none.

Parameters
originOrigin of the circle in world space.
radiusRadius of the circle.
directionDirection TSVector2 of the cast.
distanceMax distance to reach.
layerMaskUnity's layer mask to filter objects.

Definition at line 282 of file TSPhysics2D.cs.

static TSCollider2D TrueSync.TSPhysics2D.OverlapArea ( TSVector2  pointA,
TSVector2  pointB,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a rectangular area. Returns null if there is none.

Parameters
pointATop-left corner of the rectangle.
radiusBottom-right corner of the rectangle.
layerMaskUnity's layer mask to filter objects.

Definition at line 109 of file TSPhysics2D.cs.

static TSCollider2D [] TrueSync.TSPhysics2D.OverlapAreaAll ( TSVector2  pointA,
TSVector2  pointB,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns all TSCollider2D within a rectangular area. Returns null if there is none.

Parameters
pointATop-left corner of the rectangle.
radiusBottom-right corner of the rectangle.
layerMaskUnity's layer mask to filter objects.

Definition at line 120 of file TSPhysics2D.cs.

static TSCollider2D TrueSync.TSPhysics2D.OverlapBox ( TSVector2  point,
TSVector2  size,
FP  angle,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a box area. Returns null if there is none.

Parameters
pointCenter of the box in world space.
sizeSize of the box.
angleRotation angle in degrees of the box.
layerMaskUnity's layer mask to filter objects.

Definition at line 159 of file TSPhysics2D.cs.

static TSCollider2D [] TrueSync.TSPhysics2D.OverlapBoxAll ( TSVector2  point,
TSVector2  size,
FP  angle,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns all TSCollider2D within a box area. Returns null if there is none.

Parameters
pointCenter of the box in world space.
sizeSize of the box.
angleRotation angle in degrees of the box.
layerMaskUnity's layer mask to filter objects.

Definition at line 171 of file TSPhysics2D.cs.

static TSCollider2D TrueSync.TSPhysics2D.OverlapCapsule ( TSVector2  point,
TSVector2  size,
TSCapsuleDirection2D  direction,
FP  angle,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a capsule area. Returns null if there is none.

Parameters
pointCenter of the capsule in world space.
sizeSize of the capsule.
directionIf it is a vertical or horizontal capsule.
angleRotation angle in degrees of the capsule.
layerMaskUnity's layer mask to filter objects.

Definition at line 201 of file TSPhysics2D.cs.

static TSCollider2D [] TrueSync.TSPhysics2D.OverlapCapsuleAll ( TSVector2  point,
TSVector2  size,
TSCapsuleDirection2D  direction,
FP  angle,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns all TSCollider2D within a capsule area. Returns null if there is none.

Parameters
pointCenter of the capsule in world space.
sizeSize of the capsule.
directionIf it is a vertical or horizontal capsule.
angleRotation angle in degrees of the capsule.
layerMaskUnity's layer mask to filter objects.

Definition at line 214 of file TSPhysics2D.cs.

static TSCollider2D TrueSync.TSPhysics2D.OverlapCircle ( TSVector2  point,
FP  radius,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a circular area. Returns null if there is none.

Parameters
pointCenter of the circle in world space.
radiusRadius of the circle.
layerMaskUnity's layer mask to filter objects.

Definition at line 66 of file TSPhysics2D.cs.

static TSCollider2D [] TrueSync.TSPhysics2D.OverlapCircleAll ( TSVector2  point,
FP  radius,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns all TSCollider2D within a circular area. Returns null if there is none.

Parameters
pointCenter of the circle in world space.
radiusRadius of the circle.
layerMaskUnity's layer mask to filter objects.

Definition at line 77 of file TSPhysics2D.cs.

static TSCollider2D TrueSync.TSPhysics2D.OverlapPoint ( TSVector2  point,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns the first TSCollider2D within a small circular area. Returns null if there is none.

Parameters
pointCenter of the point in world space.
layerMaskUnity's layer mask to filter objects.

Definition at line 130 of file TSPhysics2D.cs.

static TSCollider2D [] TrueSync.TSPhysics2D.OverlapPointAll ( TSVector2  point,
int  layerMask = UnityEngine.Physics.DefaultRaycastLayers 
)
static

Returns all TSCollider2D within a small circular area. Returns null if there is none.

Parameters
pointCenter of the point in world space.
layerMaskUnity's layer mask to filter objects.

Definition at line 140 of file TSPhysics2D.cs.


The documentation for this class was generated from the following file:
Generated by   doxygen 1.8.11