@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
86 lines (84 loc) • 6.01 kB
TypeScript
/**
* Creates object attributes used to create a physics object.
*
*/
import { StringParam } from './../../params/String';
import { FloatParam } from './../../params/Float';
import { IntegerParam } from './../../params/Integer';
import { PhysicsRBDColliderType, PhysicsRBDType } from './../../../core/physics/PhysicsAttribute';
import { TypedSopNode } from './_Base';
import { CoreGroup } from '../../../core/geometry/Group';
import { SizeComputationMethod } from '../../operations/sop/PhysicsRBDAttributes';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { BaseCoreObject } from '../../../core/geometry/entities/object/BaseCoreObject';
import { Vector3 } from 'three';
import { Vector3Param } from '../../params/Vector3';
import { BooleanParam } from '../../params/Boolean';
import { SopType } from '../../poly/registers/nodes/types/Sop';
import { CoreObjectType, ObjectContent } from '../../../core/geometry/ObjectContent';
export declare const BORDER_RADIUS_AVAILABLE: PhysicsRBDColliderType[];
declare class PhysicsRBDAttributesSopParamsConfig extends NodeParamsConfig {
main: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
/** @param Rigid body type */
RBDType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param collider type */
colliderType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param Rigid body type */
sizeMethod: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param border radius */
borderRadius: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param sizes */
sizes: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR3>;
/** @param sizes */
size: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param radius */
radius: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param half height */
height: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param heightField rows */
rows: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param heightField cols */
cols: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param density */
density: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param friction */
friction: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param restitution */
restitution: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param linear damping (affects velocity) */
linearDamping: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param angular damping (affects rotations) */
angularDamping: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param linear velocity */
linearVelocity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR3>;
/** @param angular velocity */
angularVelocity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR3>;
/** @param gravity Scale */
gravityScale: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param can sleep */
canSleep: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
details: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
/** @param add id */
addId: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param id */
id: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
}
export declare class PhysicsRBDAttributesSopNode extends TypedSopNode<PhysicsRBDAttributesSopParamsConfig> {
readonly paramsConfig: PhysicsRBDAttributesSopParamsConfig;
static type(): SopType;
protected initializeNode(): void;
setRBDType(RBDtype: PhysicsRBDType): void;
RBDType(): PhysicsRBDType;
setColliderType(colliderType: PhysicsRBDColliderType): void;
colliderType(): PhysicsRBDColliderType;
setSizeMethod(sizeMethod: SizeComputationMethod): void;
sizeMethod(): SizeComputationMethod;
cook(inputCoreGroups: CoreGroup[]): Promise<void>;
protected _applyColliderType<T extends CoreObjectType>(colliderType: PhysicsRBDColliderType, sizeMethod: SizeComputationMethod, coreObjects: BaseCoreObject<T>[], //BaseCoreObject<CoreObjectType>[],
promises: Array<Promise<void>>): void;
protected _computeStringParam<T extends CoreObjectType>(param: StringParam, coreObjects: BaseCoreObject<T>[], applyMethod: (object: ObjectContent<CoreObjectType>, value: string) => void): Promise<void>;
protected _computeVector3Param(vectorParam: Vector3Param, coreObjects: BaseCoreObject<CoreObjectType>[], applyMethod: (object: ObjectContent<CoreObjectType>, value: Vector3) => void): Promise<void>;
protected _computeNumberParam(param: FloatParam | IntegerParam, coreObjects: BaseCoreObject<CoreObjectType>[], applyMethod: (object: ObjectContent<CoreObjectType>, value: number) => void): Promise<void>;
protected _computeBooleanParam(param: BooleanParam, coreObjects: BaseCoreObject<CoreObjectType>[], applyMethod: (object: ObjectContent<CoreObjectType>, value: boolean) => void): Promise<void>;
}
export {};