SharedNarrowSolver

Package: Libraries.Game.Collision.Narrowphase · Inherits from: Libraries.Language.Object

Actions

CollideBoxTriangle(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Box box, Libraries.Game.Collision.PhysicsPosition3D boxTransform, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a box item with a single triangle item, where the box is item A of the collision and the triangle is item B. It uses the box's triangle collider, which finds up to four contacts, such as one under each bottom corner of a box lying flat on the triangle. The collision's points are refreshed afterward.

Parameters

CollideBoxes(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Box itemA, Libraries.Game.Collision.PhysicsPosition3D transformA, Libraries.Game.Collision.Shapes.Box itemB, Libraries.Game.Collision.PhysicsPosition3D transformB, Libraries.Game.Collision.CollisionPointsResult3D result)

Parameters

CollideConvexConvex(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.CollisionShape3D itemA, Libraries.Game.Collision.PhysicsPosition3D transformA, Libraries.Game.Collision.Shapes.CollisionShape3D itemB, Libraries.Game.Collision.PhysicsPosition3D transformB, Libraries.Game.Collision.CollisionPointsResult3D result)

Parameters

CollideCylinderTriangle(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Cylinder cylinder, Libraries.Game.Collision.PhysicsPosition3D cylinderTransform, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a cylinder item with a single triangle item, where the cylinder is item A of the collision and the triangle is item B. It uses the cylinder's triangle collider, which finds up to four contacts for a cylinder standing on a cap, up to two for one lying on its side, and hands any other case to the general collision test, which finds one. The collision's points are refreshed afterward.

Parameters

CollideSphereTriangle(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Sphere sphere, Libraries.Game.Collision.PhysicsPosition3D sphereTransform, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a sphere item with a single triangle item, where the sphere is item A of the collision and the triangle is item B. It uses the sphere's triangle collider, which finds at most one contact, at the point on the triangle closest to the sphere's center. The collision's points are refreshed afterward.

Parameters

CollideSpheres(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Sphere itemA, Libraries.Game.Collision.PhysicsPosition3D transformA, Libraries.Game.Collision.Shapes.Sphere itemB, Libraries.Game.Collision.PhysicsPosition3D transformB, Libraries.Game.Collision.CollisionPointsResult3D result)

Parameters

CollideTriangle(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.Shapes.CollisionShape3D shape, Libraries.Game.Collision.PhysicsPosition3D shapeTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action tests any shape against a single triangle, with the triangle as item A of the collision. Spheres, boxes and cylinders use their own triangle colliders, and any other shape uses the general collision test. It does not refresh the collision's points. A concave shape, such as terrain, calls it once for each of its triangles that the shape might touch, then calls RefreshCollisionPoints on the result once at the end.

Parameters

CollideTriangleBox(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.Shapes.Box box, Libraries.Game.Collision.PhysicsPosition3D boxTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a single triangle item with a box item, where the triangle is item A of the collision and the box is item B. It uses the box's triangle collider, which finds up to four contacts, such as one under each bottom corner of a box lying flat on the triangle. The collision's points are refreshed afterward.

Parameters

CollideTriangleCylinder(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.Shapes.Cylinder cylinder, Libraries.Game.Collision.PhysicsPosition3D cylinderTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a single triangle item with a cylinder item, where the triangle is item A of the collision and the cylinder is item B. It uses the cylinder's triangle collider, which finds up to four contacts for a cylinder standing on a cap, up to two for one lying on its side, and hands any other case to the general collision test, which finds one. The collision's points are refreshed afterward.

Parameters

CollideTriangleSphere(Libraries.Game.Collision.LocalCollisionPoints3D collisionPoints, Libraries.Game.Collision.Shapes.Triangle triangle, Libraries.Game.Collision.PhysicsPosition3D triangleTransform, Libraries.Game.Collision.Shapes.Sphere sphere, Libraries.Game.Collision.PhysicsPosition3D sphereTransform, Libraries.Game.Collision.CollisionPointsResult3D result)

This action collides a single triangle item with a sphere item, where the triangle is item A of the collision and the sphere is item B. It uses the sphere's triangle collider, which finds at most one contact, at the point on the triangle closest to the sphere's center. The collision's points are refreshed afterward.

Parameters

PrepareShape(Libraries.Game.Collision.Shapes.CollisionShape3D shape)

This action prepares for a run of CollideTriangle calls with the same shape, such as the triangles of a terrain under one box, so the shape's fixed values are read once. Call ReleaseShape after the run.

Parameters

ReleaseShape()

This action ends a run of CollideTriangle calls started by PrepareShape.

Inherited Actions

3 actions from Libraries.Language.Object