import type { Matrix, Vector3 } from "@babylonjs/core/Maths/math.vector"; import type { DeepImmutable, Nullable } from "@babylonjs/core/types"; import type { IBulletWasmInstance } from "./bulletWasmInstance"; import { MotionType } from "./motionType"; import type { PhysicsShape } from "./physicsShape"; /** * RigidBodyConstructionInfoList stores the construction information for multiple rigid bodies in a single buffer */ export declare class RigidBodyConstructionInfoList { private readonly _wasmInstance; private readonly _uint32Ptr; private readonly _float32Ptr; private readonly _uint8Ptr; private readonly _uint16Ptr; private readonly _inner; /** * Creates a new RigidBodyConstructionInfoList * @param wasmInstance The BulletWasmInstance to use */ constructor(wasmInstance: IBulletWasmInstance, count: number); /** * Disposes the RigidBodyConstructionInfoList */ dispose(): void; /** * @internal */ get ptr(): number; /** * The number of rigid body construction info */ get count(): number; /** * @internal */ getPtr(n: number): number; private _nullCheck; /** * Get the shape of the rigid body at index n * @param n The index of the rigid body * @return The shape of the rigid body */ getShape(n: number): Nullable; /** * Set the shape of the rigid body at index n * @param n The index of the rigid body * @param value The shape of the rigid body */ setShape(n: number, value: Nullable): void; /** * Get the initial transform of the rigid body at index n * @param n The index of the rigid body * @param result The matrix to store the result * @returns The initial transform of the rigid body */ getInitialTransformToRef(n: number, result: Matrix): Matrix; /** * Set the initial transform of the rigid body at index n * @param n The index of the rigid body * @param value The initial transform of the rigid body */ setInitialTransform(n: number, value: DeepImmutable): void; /** * Get the motion type of the rigid body at index n * @param n The index of the rigid body * @returns The motion type of the rigid body */ getMotionType(n: number): MotionType; /** * Set the motion type of the rigid body at index n * @param n The index of the rigid body * @param value The motion type of the rigid body * @returns The motion type of the rigid body */ setMotionType(n: number, value: MotionType): void; /** * Get the mass of the rigid body at index n * @param n The index of the rigid body * @returns The mass of the rigid body */ getMass(n: number): number; /** * Set the mass of the rigid body at index n * @param n The index of the rigid body * @param value The mass of the rigid body */ setMass(n: number, value: number): void; /** * Get the local inertia of the rigid body at index n * @param n The index of the rigid body * @param result The vector to store the result * @returns The local inertia of the rigid body */ getLocalInertiaToRef(n: number, result: Vector3): Nullable; /** * Set the local inertia of the rigid body at index n * * If the local inertia is not set, it will be calculated from the shape * @param n The index of the rigid body * @param value The local inertia of the rigid body */ setLocalInertia(n: number, value: Nullable>): void; /** * Get linear damping of the rigid body at index n * @param n The index of the rigid body * @returns The linear damping of the rigid body */ getLinearDamping(n: number): number; /** * Set linear damping of the rigid body at index n * @param n The index of the rigid body * @param value The linear damping of the rigid body */ setLinearDamping(n: number, value: number): void; /** * Get angular damping of the rigid body at index n * @param n The index of the rigid body * @returns The angular damping of the rigid body */ getAngularDamping(n: number): number; /** * Set angular damping of the rigid body at index n * @param n The index of the rigid body * @param value The angular damping of the rigid body */ setAngularDamping(n: number, value: number): void; /** * Get friction of the rigid body at index n * @param n The index of the rigid body * @returns The friction of the rigid body */ getFriction(n: number): number; /** * Set friction of the rigid body at index n * @param n The index of the rigid body * @param value The friction of the rigid body */ setFriction(n: number, value: number): void; /** * Get restitution of the rigid body at index n * @param n The index of the rigid body * @returns The restitution of the rigid body */ getRestitution(n: number): number; /** * Set restitution of the rigid body at index n * @param n The index of the rigid body * @param value The restitution of the rigid body */ setRestitution(n: number, value: number): void; /** * Get linear sleeping threshold of the rigid body at index n * @param n The index of the rigid body * @returns The linear sleeping threshold of the rigid body */ getLinearSleepingThreshold(n: number): number; /** * Set linear sleeping threshold of the rigid body at index n * @param n The index of the rigid body * @param value The linear sleeping threshold of the rigid body */ setLinearSleepingThreshold(n: number, value: number): void; /** * Get angular sleeping threshold of the rigid body at index n * @param n The index of the rigid body * @returns The angular sleeping threshold of the rigid body */ getAngularSleepingThreshold(n: number): number; /** * Set angular sleeping threshold of the rigid body at index n * @param n The index of the rigid body * @param value The angular sleeping threshold of the rigid body */ setAngularSleepingThreshold(n: number, value: number): void; /** * Get collision group of the rigid body at index n * * collision group is stored as 16-bit unsigned integer * @param n The index of the rigid body * @return The collision group of the rigid body */ getCollisionGroup(n: number): number; /** * Set collision group of the rigid body at index n * * collision group is stored as 16-bit unsigned integer * @param n The index of the rigid body * @param value The collision group of the rigid body */ setCollisionGroup(n: number, value: number): void; /** * Get collision mask of the rigid body at index n * * collision mask is stored as 16-bit unsigned integer * @param n The index of the rigid body * @return The collision mask of the rigid body */ getCollisionMask(n: number): number; /** * Set collision mask of the rigid body at index n * * collision mask is stored as 16-bit unsigned integer * @param n The index of the rigid body * @param value The collision mask of the rigid body */ setCollisionMask(n: number, value: number): void; /** * Get additional damping of the rigid body at index n * @param n The index of the rigid body * @returns The additional damping of the rigid body */ getAdditionalDamping(n: number): boolean; /** * Set additional damping of the rigid body at index n * @param n The index of the rigid body * @param value The additional damping of the rigid body */ setAdditionalDamping(n: number, value: boolean): void; /** * Get no contact response of the rigid body at index n * @param n The index of the rigid body * @returns The no contact response of the rigid body */ getNoContactResponse(n: number): boolean; /** * Set no contact response of the rigid body at index n * @param n The index of the rigid body * @param value The no contact response of the rigid body */ setNoContactResponse(n: number, value: boolean): void; /** * Get disable deactivation of the rigid body at index n * @param n The index of the rigid body * @returns The disable deactivation of the rigid body */ getDisableDeactivation(n: number): boolean; /** * Set disable deactivation of the rigid body at index n * @param n The index of the rigid body * @param value The disable deactivation of the rigid body */ setDisableDeactivation(n: number, value: boolean): void; }