/// <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); }
/// <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); }
internal static extern void PhysicsWorld_SphereCast(IntPtr handle, ref PhysicsRaycastResult result, ref Urho.Ray ray, float radius, float maxDistance, uint collisionMask);
internal static extern void PhysicsWorld_RaycastSingleSegmented(IntPtr handle, ref PhysicsRaycastResult result, ref Urho.Ray ray, float maxDistance, float segmentDistance, uint collisionMask);
/// <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)); }
internal static extern bool Geometry_IsInside(IntPtr handle, ref Urho.Ray ray);
/// <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)); }
internal static extern float Geometry_GetHitDistance(IntPtr handle, ref Urho.Ray ray, Vector3 *outNormal, Vector2 *outUV);