예제 #1
0
    /// <summary>Create this fixture in the simulation with a shape pointer you already have
    /// Note: Used for concave fixtures or fixtures with more than 8 vertices
    /// They are broken up into several fixtures </summary>
    protected override void InitialiseWithShape(IntPtr shape)
    {
        IntPtr fix = LPAPIFixture.AddFixture(body.GetPtr(), (int)Shapetype
                                             , shape
                                             , Density, actualFriction, actualRestitution, IsSensor, myIndex);

        LPAPIFixture.SetFixtureFilterData(fix, (Int16)CollisionGroupIndex, categoryBits, maskBits);

        SubPtrs.Add(fix);
    }
예제 #2
0
    /// <summary>Create this fixture in the simulation</summary>
    public virtual void Initialise(LPBody bod)
    {
        body    = bod;
        myIndex = body.AddFixture(this);
        GetPhysProps();

        IntPtr shape = GetShape();

        ThingPtr = LPAPIFixture.AddFixture(body.GetPtr(), (int)Shapetype
                                           , shape
                                           , Density, actualFriction, actualRestitution, IsSensor, myIndex);

        LPAPIFixture.SetFixtureFilterData(ThingPtr, (Int16)CollisionGroupIndex, categoryBits, maskBits);
    }