import { B2Vec2, B2Transform, B2Sweep } from '../Common/b2Math'; import { B2Shape, B2MassData } from '../Collision/Shapes/b2Shape'; import { B2ContactEdge } from './Contacts/b2Contact'; import { B2JointEdge } from './Joints/b2Joint'; import { B2Fixture, B2FixtureDef } from './b2Fixture'; import { B2World } from './b2World'; export declare const enum B2BodyType { B2_unknown = -1, B2_staticBody = 0, B2_kinematicBody = 1, B2_dynamicBody = 2 } export declare class B2BodyDef { type: B2BodyType; position: B2Vec2; angle: number; linearVelocity: B2Vec2; angularVelocity: number; linearDamping: number; angularDamping: number; allowSleep: boolean; awake: boolean; fixedRotation: boolean; bullet: boolean; active: boolean; userData: any; gravityScale: number; } export declare class B2Body { m_type: B2BodyType; m_islandFlag: boolean; m_awakeFlag: boolean; m_autoSleepFlag: boolean; m_bulletFlag: boolean; m_fixedRotationFlag: boolean; m_activeFlag: boolean; m_toiFlag: boolean; m_islandIndex: number; m_xf: B2Transform; m_xf0: B2Transform; m_sweep: B2Sweep; m_linearVelocity: B2Vec2; m_angularVelocity: number; m_force: B2Vec2; m_torque: number; m_world: B2World; m_prev: B2Body; m_next: B2Body; m_fixtureList: B2Fixture; m_fixtureCount: number; m_jointList: B2JointEdge; m_contactList: B2ContactEdge; m_mass: number; m_invMass: number; m_I: number; m_invI: number; m_linearDamping: number; m_angularDamping: number; m_gravityScale: number; m_sleepTime: number; m_userData: any; constructor(bd: B2BodyDef, world: B2World); CreateFixture(a: B2FixtureDef | B2Shape, b?: number): B2Fixture; CreateFixtureDef(def: B2FixtureDef): B2Fixture; private static CreateFixtureShapeDensity_s_def; CreateFixtureShapeDensity(shape: B2Shape, density?: number): B2Fixture; DestroyFixture(fixture: B2Fixture): void; SetTransformVec(position: B2Vec2, angle: number): void; SetTransformXY(x: number, y: number, angle: number): void; SetTransform(xf: B2Transform): void; GetTransform(): B2Transform; GetPosition(): B2Vec2; SetPosition(position: B2Vec2): void; SetPositionXY(x: number, y: number): void; GetAngle(): number; SetAngle(angle: number): void; GetWorldCenter(): B2Vec2; GetLocalCenter(): B2Vec2; SetLinearVelocity(v: B2Vec2): void; GetLinearVelocity(): B2Vec2; SetAngularVelocity(w: number): void; GetAngularVelocity(): number; GetDefinition(bd: B2BodyDef): B2BodyDef; ApplyForce(force: B2Vec2, point: B2Vec2, wake?: boolean): void; ApplyForceToCenter(force: B2Vec2, wake?: boolean): void; ApplyTorque(torque: number, wake?: boolean): void; ApplyLinearImpulse(impulse: B2Vec2, point: B2Vec2, wake?: boolean): void; ApplyLinearImpulseToCenter(impulse: B2Vec2, wake?: boolean): void; ApplyAngularImpulse(impulse: number, wake?: boolean): void; GetMass(): number; GetInertia(): number; GetMassData(data: B2MassData): B2MassData; private static SetMassData_s_oldCenter; SetMassData(massData: B2MassData): void; private static ResetMassData_s_localCenter; private static ResetMassData_s_oldCenter; private static ResetMassData_s_massData; ResetMassData(): void; GetWorldPoint(localPoint: B2Vec2, out: B2Vec2): B2Vec2; GetWorldVector(localVector: B2Vec2, out: B2Vec2): B2Vec2; GetLocalPoint(worldPoint: B2Vec2, out: B2Vec2): B2Vec2; GetLocalVector(worldVector: B2Vec2, out: B2Vec2): B2Vec2; GetLinearVelocityFromWorldPoint(worldPoint: B2Vec2, out: B2Vec2): B2Vec2; GetLinearVelocityFromLocalPoint(localPoint: B2Vec2, out: B2Vec2): B2Vec2; GetLinearDamping(): number; SetLinearDamping(linearDamping: number): void; GetAngularDamping(): number; SetAngularDamping(angularDamping: number): void; GetGravityScale(): number; SetGravityScale(scale: number): void; SetType(type: B2BodyType): void; GetType(): B2BodyType; SetBullet(flag: boolean): void; IsBullet(): boolean; SetSleepingAllowed(flag: boolean): void; IsSleepingAllowed(): boolean; SetAwake(flag: boolean): void; IsAwake(): boolean; SetActive(flag: boolean): void; IsActive(): boolean; SetFixedRotation(flag: boolean): void; IsFixedRotation(): boolean; GetFixtureList(): B2Fixture; GetJointList(): B2JointEdge; GetContactList(): B2ContactEdge; GetNext(): B2Body; GetUserData(): any; SetUserData(data: any): void; GetWorld(): B2World; Dump(log: (format: string, ...args: any[]) => void): void; private static SynchronizeFixtures_s_xf1; SynchronizeFixtures(): void; SynchronizeTransform(): void; ShouldCollide(other: B2Body): boolean; ShouldCollideConnected(other: B2Body): boolean; Advance(alpha: number): void; }