import { BasePlugin } from '@tinoe/glb'; import { ApplyParams3D, Mesh, Scene, Script } from '@tinoe/glc'; import { CollisionSystem } from './CollisionSystem'; export declare class PhysicsPlugin extends BasePlugin { protected _bodyId: number; protected _collisionSystem: CollisionSystem; /** * 物理世界 */ protected _world: any; /** * 物理引擎所应用的场景 */ protected _scene: Scene; /** * 物理世界的刚体和Mesh的关系对应 */ protected _rigidBodyMap: Map; protected _updateScript: Script; protected _collisionEnabled: boolean; get world(): any; /** * 有geometry获取默认的shape type * @param geometry * @returns */ protected _guessDefaultRigidBodyShapeOptions(mesh: Mesh): { type: string; radius: number; width?: undefined; height?: undefined; depth?: undefined; } | { type: string; width: number; height: number; depth: number; radius?: undefined; } | { type: string; radius: number; height: number; width?: undefined; depth?: undefined; }; /** * 添加刚体 * @param mesh * @param options */ R: any; addRigidBody(mesh: Mesh, options: any): any; getRigidBodyByMesh(mesh: Mesh): any; getMeshByBody(body: any): Mesh; /** * 移除刚体 * @param body */ removeRigidBody(body: any): void; /** * 单步更新刚体 */ protected _updateRigidBody(): void; /** * 更新世界 */ protected _update: (deltaTime: number) => void; apply({ scene }: ApplyParams3D): void; destroy(): void; enableCollisionDetection(): void; addCollider(mesh: Mesh, options: any): any; }