Exemple #1
0
 /// <summary>
 /// Perform a physics world swept sphere test and return the closest hit.
 /// </summary>
 public void SphereCast(ref PhysicsRaycastResult result, Urho.Ray ray, float radius, float maxDistance, uint collisionMask)
 {
     Runtime.ValidateRefCounted(this);
     PhysicsWorld_SphereCast(handle, ref result, ref ray, radius, maxDistance, collisionMask);
 }
Exemple #2
0
 /// <summary>
 /// Perform a physics world segmented raycast and return the closest hit. Useful for big scenes with many bodies.
 /// </summary>
 public void RaycastSingleSegmented(ref PhysicsRaycastResult result, Urho.Ray ray, float maxDistance, float segmentDistance, uint collisionMask)
 {
     Runtime.ValidateRefCounted(this);
     PhysicsWorld_RaycastSingleSegmented(handle, ref result, ref ray, maxDistance, segmentDistance, collisionMask);
 }
Exemple #3
0
 internal static extern void PhysicsWorld_SphereCast(IntPtr handle, ref PhysicsRaycastResult result, ref Urho.Ray ray, float radius, float maxDistance, uint collisionMask);
Exemple #4
0
 internal static extern void PhysicsWorld_RaycastSingleSegmented(IntPtr handle, ref PhysicsRaycastResult result, ref Urho.Ray ray, float maxDistance, float segmentDistance, uint collisionMask);
Exemple #5
0
 /// <summary>
 /// Return whether or not the ray is inside geometry.
 /// </summary>
 public bool IsInside(Urho.Ray ray)
 {
     Runtime.ValidateRefCounted(this);
     return(Geometry_IsInside(handle, ref ray));
 }
Exemple #6
0
 internal static extern bool Geometry_IsInside(IntPtr handle, ref Urho.Ray ray);
Exemple #7
0
 /// <summary>
 /// Return ray hit distance or infinity if no hit. Requires raw data to be set. Optionally return hit normal and hit uv coordinates at intersect point.
 /// </summary>
 public float GetHitDistance(Urho.Ray ray, Vector3 *outNormal, Vector2 *outUV)
 {
     Runtime.ValidateRefCounted(this);
     return(Geometry_GetHitDistance(handle, ref ray, outNormal, outUV));
 }
Exemple #8
0
 internal static extern float Geometry_GetHitDistance(IntPtr handle, ref Urho.Ray ray, Vector3 *outNormal, Vector2 *outUV);