import { Vertex3D } from '../math/vertex3d'; import { CollisionEvent } from '../physics/collision-event'; import { Ball } from '../vpt/ball/ball'; import { Table } from '../vpt/table/table'; import { TimerOnOff } from '../vpt/timer/timer-on-off'; import { IEmulator } from './iemulator'; import { PinInput } from './pin-input'; import { IBallCreationPosition, Player } from './player'; export declare class PlayerPhysics { readonly balls: Ball[]; gravity: Vertex3D; timeMsec: number; recordContacts: boolean; contacts: CollisionEvent[]; activeBall?: Ball; activeBallBC?: Ball; swapBallCollisionHandling: boolean; lastPlungerHit: number; ballControl: boolean; bcTarget?: Vertex3D; isPaused: boolean; private readonly table; private readonly pinInput; private readonly movers; private readonly flipperMovers; private readonly hitObjects; private readonly hitObjectsDynamic; private hitPlayfield; private hitTopGlass; private meshAsPlayfield; private hitOcTreeDynamic; private hitOcTree; private hitTimers; private minPhysLoopTime; private lastFlipTime; private lastTimeUsec; private lastFrameDuration; private cFrames; private lastFpsTime; private fps; private fpsAvg; private fpsCount; private curPhysicsFrameTime; private nextPhysicsFrameTime; private startTimeUsec; private physPeriod; private activeBallDebug?; readonly changedHitTimers: TimerOnOff[]; private scriptPeriod; emu?: IEmulator; /** * Player physics are instantiated in the Player's constructor. * @param table * @param pinInput */ constructor(table: Table, pinInput: PinInput); /** * This is called in the player's init(). */ init(): void; private indexTableElements; private initOcTree; physicsSimulateCycle(dTime: number): void; /** * Updates the physics engine. * * Call this before rendering each frame. * * @param time Absolute time in milliseconds * @return Number of executed cycles */ updatePhysics(time?: number): number; updateVelocities(): void; createBall(ballCreator: IBallCreationPosition, player: Player, radius?: number, mass?: number): Ball; destroyBall(ball: Ball): void; private now; setGravity(slopeDeg: number, strength: number): void; }