123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import type { Nullable } from "../../types";
- import type { Observer } from "../../Misc/observable";
- import type { Vector3 } from "../../Maths/math.vector";
- import type { Mesh } from "../../Meshes/mesh";
- import type { Node } from "../../node";
- import type { PhysicsImpostor } from "./physicsImpostor";
- declare module "../../Meshes/abstractMesh" {
- /**
- *
- */
- interface AbstractMesh {
- /** @internal */
- _physicsImpostor: Nullable<PhysicsImpostor>;
- /**
- * Gets or sets impostor used for physic simulation
- * @see https://doc.babylonjs.com/features/featuresDeepDive/physics
- */
- physicsImpostor: Nullable<PhysicsImpostor>;
- /**
- * Gets the current physics impostor
- * @see https://doc.babylonjs.com/features/featuresDeepDive/physics
- * @returns a physics impostor or null
- */
- getPhysicsImpostor(): Nullable<PhysicsImpostor>;
- /** Apply a physic impulse to the mesh
- * @param force defines the force to apply
- * @param contactPoint defines where to apply the force
- * @returns the current mesh
- * @see https://doc.babylonjs.com/features/featuresDeepDive/physics/usingPhysicsEngine
- */
- applyImpulse(force: Vector3, contactPoint: Vector3): AbstractMesh;
- /**
- * Creates a physic joint between two meshes
- * @param otherMesh defines the other mesh to use
- * @param pivot1 defines the pivot to use on this mesh
- * @param pivot2 defines the pivot to use on the other mesh
- * @param options defines additional options (can be plugin dependent)
- * @returns the current mesh
- * @see https://www.babylonjs-playground.com/#0BS5U0#0
- */
- setPhysicsLinkWith(otherMesh: Mesh, pivot1: Vector3, pivot2: Vector3, options?: any): AbstractMesh;
- /** @internal */
- _disposePhysicsObserver: Nullable<Observer<Node>>;
- }
- }
|