import { Quaternion, Vector3, Layer } from "@galacean/engine"; import { IBoxColliderShape, ICapsuleColliderShape, ICharacterController, ICollision, IDynamicCollider, IFixedJoint, IHingeJoint, IPhysics, IPhysicsManager, IPhysicsMaterial, IPlaneColliderShape, ISphereColliderShape, ISpringJoint, IStaticCollider } from "@galacean/engine-design"; import { LiteCollider } from "./LiteCollider"; import { LitePhysicsMaterial } from "./LitePhysicsMaterial"; import { LitePhysicsScene } from "./LitePhysicsScene"; import { LitePhysicsManager } from "./LitePhysicsManager"; export declare class LitePhysics implements IPhysics { private _layerCollisionMatrix; /** * {@inheritDoc IPhysics.initialize } */ initialize(): Promise; /** * {@inheritDoc IPhysics.createPhysicsManager } */ createPhysicsManager(): IPhysicsManager; /** * {@inheritDoc IPhysics.createPhysicsScene } */ createPhysicsScene(physicsManager: LitePhysicsManager, onContactBegin?: (collision: ICollision) => void, onContactEnd?: (collision: ICollision) => void, onContactPersist?: (collision: ICollision) => void, onTriggerBegin?: (obj1: number, obj2: number) => void, onTriggerEnd?: (obj1: number, obj2: number) => void, onTriggerPersist?: (obj1: number, obj2: number) => void): LitePhysicsScene; /** * {@inheritDoc IPhysics.createStaticCollider } */ createStaticCollider(position: Vector3, rotation: Quaternion): IStaticCollider; /** * {@inheritDoc IPhysics.createDynamicCollider } */ createDynamicCollider(position: Vector3, rotation: Quaternion): IDynamicCollider; /** * {@inheritDoc IPhysics.createCharacterController } */ createCharacterController(): ICharacterController; /** * {@inheritDoc IPhysics.createPhysicsMaterial } */ createPhysicsMaterial(staticFriction: number, dynamicFriction: number, bounciness: number, frictionCombine: number, bounceCombine: number): IPhysicsMaterial; /** * {@inheritDoc IPhysics.createBoxColliderShape } */ createBoxColliderShape(uniqueID: number, size: Vector3, material: LitePhysicsMaterial): IBoxColliderShape; /** * {@inheritDoc IPhysics.createSphereColliderShape } */ createSphereColliderShape(uniqueID: number, radius: number, material: LitePhysicsMaterial): ISphereColliderShape; /** * {@inheritDoc IPhysics.createPlaneColliderShape } */ createPlaneColliderShape(uniqueID: number, material: LitePhysicsMaterial): IPlaneColliderShape; /** * {@inheritDoc IPhysics.createCapsuleColliderShape } */ createCapsuleColliderShape(uniqueID: number, radius: number, height: number, material: LitePhysicsMaterial): ICapsuleColliderShape; /** * {@inheritDoc IPhysics.createFixedJoint } */ createFixedJoint(collider: LiteCollider): IFixedJoint; /** * {@inheritDoc IPhysics.createHingeJoint } */ createHingeJoint(collider: LiteCollider): IHingeJoint; /** * {@inheritDoc IPhysics.createSpringJoint } */ createSpringJoint(collider: LiteCollider): ISpringJoint; /** * {@inheritDoc IPhysics.setColliderLayer } */ setColliderLayer(collider: LiteCollider, layer: Layer): void; /** * {@inheritDoc IPhysics.getColliderLayerCollision } */ getColliderLayerCollision(layer1: number, layer2: number): boolean; /** * {@inheritDoc IPhysics.setColliderLayerCollision } */ setColliderLayerCollision(layer1: number, layer2: number, collide: boolean): void; /** * {@inheritDoc IPhysics.destroy } */ destroy(): void; private _getColliderLayerIndex; }