import { AmmoWorld } from '.'; import { Vec3, AnyObject } from '../physics'; import { AmmoRigidBody } from './RigidBody'; import { AmmoSoftBodyOptions } from './interface'; export declare class AmmoSoftBody { private _world; protected _body: AnyObject; get instance(): AnyObject; private get _ammo(); private get _tempVector(); private get _tempVector2(); private get _tempVector3(); private get _tempVector4(); private get _softBodyHelpers(); constructor(world: AmmoWorld, options: AmmoSoftBodyOptions); private _init; private _createSoftBody; private _createVolume; private _getBtVectorPositon; private _createCloth; private _createRope; appendAnchor({ to, node, influence, collision, }: { to: AmmoRigidBody; node: number; influence?: number; collision?: boolean; }): void; setAngularVelocity(value: Vec3): void; setLinearVelocity(value: Vec3): void; /** * Sets pressure inside a soft body impostor * Cloth and rope must remain 0 pressure * @param body * @param value */ setPressure(value: number): void; /** * stiffness value from 0 to 1 * @param body * @param value */ setStiffness(value: number): void; setPositionIterations(positionIterations: number): void; setVelocityIterations(velocityIterations: number): void; setMass(value: number): void; setFriction(value: number): void; setRestitution(value: number): void; getAttributes(): { positions: Float32Array; normals: Float32Array; }; /** * Sleeps the physics body and stops it from being active * @param impostor impostor to sleep */ sleep(): void; /** * Activates the physics body * @param impostor impostor to activate */ awake(): void; }