/// <summary> /// Performs a raycast as with Raycast, finding the first intersecting shape. /// </summary> /// <returns>Returns the colliding shape shape, or null if not found.</returns> public B2Fixture RaycastOne(B2Vec2 point1, B2Vec2 point2) { return null; }
public static B2PolygonShape AsEdge(B2Vec2 v1, B2Vec2 v2) { return null; }
/// <summary> /// Build vertices to represent a vector. /// </summary> public static B2PolygonShape AsVector(B2Vec2[] vertices, int count) { return null; }
public void SetAsEdge(B2Vec2 v1, B2Vec2 v2) { }
/// <summary> /// Build vertices to represent a vector. /// </summary> public void SetAsVector(B2Vec2[] vertices, int count) { }
#endregion Constructors #region Methods /// <summary> /// Apply a force at a world point. If the force is not /// applied at the center of mass, it will generate a torque and /// affect the angular velocity. This wakes up the body. /// </summary>
public override float ComputeSubmergedArea(B2Vec2 normal, float offset, B2Transform xf, out B2Vec2 c) { c = new B2Vec2(0,0); return 0; }
/// <summary> /// Test a point for containment in this shape. This only works for convex shapes. /// </summary> /// <param name="xf">The shape world transform.</param> /// <param name="p">A point in world coordinates.</param> /// <returns></returns> public abstract bool TestPoint(B2Transform xf, B2Vec2 p);
} public float GetLinearDamping() { return 0; } /// <summary> /// Get the linear velocity of the center of mass.
/// <summary> /// Set this based on the position vector and a rotation matrix. /// </summary> /// <param name="position"></param> /// <param name="R"></param> public void Initialize(B2Vec2 position, B2Mat22 rotation) { }
/// <summary> /// Compute the volume and centroid of this shape intersected with a half plane. /// </summary> /// <param name="normal">Normal the surface normal.</param> /// <param name="offset">Offset the surface offset along normal.</param> /// <param name="xf">The shape transform.</param> /// <param name="c">Returns the centroid.</param> /// <returns>The total volume less than offset along normal.</returns> public abstract float ComputeSubmergedArea(B2Vec2 normal, float offset, B2Transform xf, out B2Vec2 c);
/// <summary> /// Construct using a position vector and a rotation matrix. /// </summary> /// <param name="position"></param> /// <param name="R"></param> public B2Transform(B2Vec2 position, B2Mat22 rotation) { }
/// <summary> /// Test a point for containment in this fixture. This only works for convex shapes. /// </summary> public bool TestPoint(B2Vec2 p) { return false; }
/// <summary> /// Construct a world object. /// </summary> /// <param name="gravity">The world gravity vector.</param> /// <param name="doSleep">Improve performance by not simulating inactive bodies.</param> public B2World(B2Vec2 gravity, bool doSleep) { }
/// Compute the mass properties from the attached shapes. You typically call this /// after adding all the shapes. If you add or remove shapes later, you may want /// to call this again. Note that this changes the center of mass position. /// </summary> public void SetMassFromShapes() { } /// <summary> /// Set the world body origin position. /// </summary> /// <param name="position">The new position of the body.</param> public void SetPosition(B2Vec2 position)
/// <returns>Return the linear velocity of the center of mass.</returns> public B2Vec2 GetLinearVelocity() { return null; } /// <summary> /// Get the world velocity of a local point. /// </summary>
public const short e_bulletFlag = 0x0008; public const short e_fixedRotationFlag = 0x0010; public const short e_islandFlag = 0x0001; #endregion Fields #region Constructors internal B2Body(B2BodyDef bd, B2World world) {
/// <param name="worldPoint">A point in world coordinates.</param> /// <returns>The world velocity of a point.</returns> public B2Vec2 GetLinearVelocityFromWorldPoint(B2Vec2 worldPoint) { return null; } /// <summary> /// Get the local position of the center of mass.
public void SetLocalPosition(B2Vec2 p) { }
/// <returns></returns> public B2Vec2 GetLocalCenter() { return null; } /// <summary> /// Gets a local point relative to the body's origin given a world point. /// </summary>
/// <summary> /// Copy vertices. This assumes the vertices define a convex polygon. /// It is assumed that the exterior is the the right of each edge. /// </summary> public void SetAsArray(B2Vec2[] vertices, int count) { }
/// </summary> /// <returns></returns> public B2World GetWorld() { return null; } /// <summary> /// Get the world position of the center of a.
/// <summary> /// Build vertices to represent an oriented box. /// </summary> /// <param name="hx">The half-width</param> /// <param name="hy">The half-height.</param> /// <param name="center">The center.</param> /// <param name="angle">The angle in radians.</param> public void SetAsOrientedBox(float hx, float hy, B2Vec2 center, float angle) { }
/// <returns></returns> public B2Vec2 GetWorldCenter() { return null; } /// <summary> /// Get the world coordinates of a point given the local coordinates. /// </summary>
public override bool TestPoint(B2Transform xf, B2Vec2 p) { return false; }
/// <summary> /// Should this body be treated like a bullet for continuous collision detection? /// </summary> /// <param name="flag"></param> public void SetBullet(bool flag) { }
/// <summary> /// Build vertices to represent an oriented box. /// </summary> /// <param name="hx">The half-width</param> /// <param name="hy">The half-height.</param> /// <param name="center">The center.</param> /// <param name="angle">The angle in radians.</param> public static B2PolygonShape AsOrientedBox(float hx, float hy, B2Vec2 center, float angle) { return null; }
/// The inertia tensor is assumed to be relative to the center of mass. /// </summary> /// <param name="massData">The mass properties.</param> public void SetMass(B2MassData massData) { }
public static B2Vec2 ComputeCentroid(B2Vec2[] vs, int count) { return null; }
/// <summary> /// Query the world for all shapes that intersect a given segment. You provide a shap /// pointer buffer of specified size. The number of shapes found is returned, and the buffer /// is filled in order of intersection. /// </summary> public int Raycast(Action callback, B2Vec2 point1, B2Vec2 point2) { return 0; }