@box2d/debug-draw
Version:
Debug drawing helper for @box2d
55 lines • 1.92 kB
TypeScript
import { b2Color, b2Draw } from "../common/b2_draw";
import { b2Vec2, b2Transform, XY } from "../common/b2_math";
import { b2Readonly } from "../common/b2_readonly";
import { b2AABB, b2RayCastInput, b2RayCastOutput } from "./b2_collision";
import { b2DistanceProxy } from "./b2_distance";
import { b2MassData, b2Shape } from "./b2_shape";
/**
* A solid circle shape
*/
export declare class b2CircleShape extends b2Shape {
/** Position */
readonly m_p: b2Vec2;
constructor(radius?: number);
Set(position: XY, radius?: number): this;
/**
* Implement b2Shape.
*/
Clone(): b2CircleShape;
Copy(other: b2CircleShape): b2CircleShape;
/**
* @see b2Shape::GetChildCount
*/
GetChildCount(): number;
private static TestPoint_s_center;
private static TestPoint_s_d;
/**
* Implement b2Shape.
*/
TestPoint(transform: b2Readonly<b2Transform>, p: XY): boolean;
private static RayCast_s_position;
private static RayCast_s_s;
private static RayCast_s_r;
/**
* Implement b2Shape.
*
* @note because the circle is solid, rays that start inside do not hit because the normal is
* not defined. Collision Detection in Interactive 3D Environments by Gino van den Bergen
* From Section 3.1.2
* x = s + a * r
* norm(x) = radius
*/
RayCast(output: b2RayCastOutput, input: b2RayCastInput, transform: b2Readonly<b2Transform>, _childIndex: number): boolean;
private static ComputeAABB_s_p;
/**
* @see b2Shape::ComputeAABB
*/
ComputeAABB(aabb: b2AABB, transform: b2Readonly<b2Transform>, _childIndex: number): void;
/**
* @see b2Shape::ComputeMass
*/
ComputeMass(massData: b2MassData, density: number): void;
SetupDistanceProxy(proxy: b2DistanceProxy, _index: number): void;
Draw(draw: b2Draw, color: b2Color): void;
}
//# sourceMappingURL=b2_circle_shape.d.ts.map