Files
cocos4/cocos/physics/spec/i-physics-shape.ts
T
jiaxin.lai a4af34630f integrate trimesh shape of ammo & cannon (#6232)
* stash

* cannon impl

* ammo mesh collider

* finish ammo mesh collider

* cannon trimesh shape

* tweaks

* tweaks

* tweaks

* update @cocos/ammo &  @cocos/cannon

* fix ci

* naming norm

* use config object

* renaming

* naming norm

* naming norm

* tweaks

* stash

* stash

* stash

* add error map

* export impl

* update package-lock

* export impl of world

* tweaks
2020-03-15 19:41:16 +08:00

37 lines
1.1 KiB
TypeScript

/**
* @hidden
*/
import { ILifecycle } from './i-lifecycle'
import { IGroupMask } from './i-group-mask'
import { IVec3Like } from '../../core/math/type-define';
import { ColliderComponent, RigidBodyComponent, PhysicMaterial } from '../../../exports/physics-framework';
import { Mesh } from '../../core';
export interface IBaseShape extends ILifecycle, IGroupMask {
readonly impl: any;
readonly collider: ColliderComponent;
readonly attachedRigidBody: RigidBodyComponent | null;
initialize (v: ColliderComponent): void;
setMaterial: (v: PhysicMaterial | null) => void;
setAsTrigger: (v: boolean) => void;
setCenter: (v: IVec3Like) => void;
}
export interface IBoxShape extends IBaseShape {
setSize: (v: IVec3Like) => void;
}
export interface ISphereShape extends IBaseShape {
setRadius: (v: number) => void;
}
export interface ICapsuleShape extends IBaseShape {
setRadius: (v: number) => void;
setHeight: (v: number) => void;
setDirection: (v: number) => void;
}
export interface ITrimeshShape extends IBaseShape {
setMesh: (v: Mesh | null) => void;
}