mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
21cc4351c6
* add bouding capsule * add builtin capsule collider * add apater for capsule shape * fix circular dependency * fix typing * fix capsule_capsule algorithm * api doc tweaks * fix ci
26 lines
730 B
TypeScript
26 lines
730 B
TypeScript
import { ILifecycle } from './i-lifecycle'
|
|
import { IGroupMask } from './i-group-mask'
|
|
import { IVec3Like } from '../../core/math/type-define';
|
|
import { ColliderComponent, RigidBodyComponent } from '../../../exports/physics-framework';
|
|
|
|
export interface IBaseShape extends ILifecycle, IGroupMask {
|
|
readonly collider: ColliderComponent;
|
|
readonly attachedRigidBody: RigidBodyComponent | null;
|
|
material: any;
|
|
isTrigger: boolean;
|
|
center: IVec3Like;
|
|
}
|
|
|
|
export interface IBoxShape extends IBaseShape {
|
|
size: IVec3Like;
|
|
}
|
|
|
|
export interface ISphereShape extends IBaseShape {
|
|
radius: number;
|
|
}
|
|
|
|
export interface ICapsuleShape extends IBaseShape {
|
|
radius: number;
|
|
height: number;
|
|
direction: number;
|
|
} |