Exemple #1
0
 /// <summary>Create this particle group 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)
 {
     SubPtrs.Add(LPAPIParticleGroups.CreateParticleGroup(sys.GetPtr(), getPartNum(), getGroupNum(), 0f, Strenght, AngularVelocity
                                                         , LinearVelocity.x, LinearVelocity.y
                                                         , shape
                                                         , (int)(_Color.r * 255f), (int)(_Color.g * 255f), (int)(_Color.b * 255f), (int)(_Color.a * 255f)
                                                         , Stride, LifeTime, UserData)
                 );
 }
Exemple #2
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);
    }