the-world-engine
Version:
three.js based, unity like game engine for browser
123 lines (122 loc) • 3.66 kB
TypeScript
export class b2WheelJointDef extends b2JointDef {
constructor();
localAnchorA: b2Vec2;
localAnchorB: b2Vec2;
localAxisA: b2Vec2;
enableLimit: boolean;
lowerTranslation: number;
upperTranslation: number;
enableMotor: boolean;
maxMotorTorque: number;
motorSpeed: number;
stiffness: number;
damping: number;
Initialize(bA: any, bB: any, anchor: any, axis: any): void;
}
export class b2WheelJoint extends b2Joint {
constructor(def: any);
m_localAnchorA: b2Vec2;
m_localAnchorB: b2Vec2;
m_localXAxisA: b2Vec2;
m_localYAxisA: b2Vec2;
m_impulse: number;
m_motorImpulse: number;
m_springImpulse: number;
m_lowerImpulse: number;
m_upperImpulse: number;
m_translation: number;
m_lowerTranslation: any;
m_upperTranslation: any;
m_maxMotorTorque: any;
m_motorSpeed: any;
m_enableLimit: any;
m_enableMotor: any;
m_stiffness: any;
m_damping: any;
m_indexA: number;
m_indexB: number;
m_localCenterA: b2Vec2;
m_localCenterB: b2Vec2;
m_invMassA: number;
m_invMassB: number;
m_invIA: number;
m_invIB: number;
m_ax: b2Vec2;
m_ay: b2Vec2;
m_sAx: number;
m_sBx: number;
m_sAy: number;
m_sBy: number;
m_mass: number;
m_motorMass: number;
m_axialMass: number;
m_springMass: number;
m_bias: number;
m_gamma: number;
m_qA: b2Rot;
m_qB: b2Rot;
m_lalcA: b2Vec2;
m_lalcB: b2Vec2;
m_rA: b2Vec2;
m_rB: b2Vec2;
GetMotorSpeed(): any;
GetMaxMotorTorque(): any;
SetSpringFrequencyHz(hz: any): void;
GetSpringFrequencyHz(): any;
SetSpringDampingRatio(ratio: any): void;
GetSpringDampingRatio(): any;
InitVelocityConstraints(data: any): void;
SolveVelocityConstraints(data: any): void;
SolvePositionConstraints(data: any): boolean;
GetDefinition(def: any): any;
GetAnchorA(out: any): any;
GetAnchorB(out: any): any;
GetReactionForce(inv_dt: any, out: any): any;
GetReactionTorque(inv_dt: any): number;
GetLocalAnchorA(): b2Vec2;
GetLocalAnchorB(): b2Vec2;
GetLocalAxisA(): b2Vec2;
GetJointTranslation(): number;
GetJointLinearSpeed(): number;
GetJointAngle(): number;
GetJointAngularSpeed(): number;
GetPrismaticJointTranslation(): number;
GetPrismaticJointSpeed(): number;
GetRevoluteJointAngle(): number;
GetRevoluteJointSpeed(): number;
IsMotorEnabled(): any;
EnableMotor(flag: any): void;
SetMotorSpeed(speed: any): void;
SetMaxMotorTorque(force: any): void;
GetMotorTorque(inv_dt: any): number;
IsLimitEnabled(): any;
EnableLimit(flag: any): void;
GetLowerLimit(): any;
GetUpperLimit(): any;
SetLimits(lower: any, upper: any): void;
Dump(log: any): void;
Draw(draw: any): void;
}
export namespace b2WheelJoint {
const InitVelocityConstraints_s_d: b2Vec2;
const InitVelocityConstraints_s_P: b2Vec2;
const SolveVelocityConstraints_s_P: b2Vec2;
const SolvePositionConstraints_s_d: b2Vec2;
const SolvePositionConstraints_s_P: b2Vec2;
const Draw_s_pA: b2Vec2;
const Draw_s_pB: b2Vec2;
const Draw_s_axis: b2Vec2;
const Draw_s_c1: b2Color;
const Draw_s_c2: b2Color;
const Draw_s_c3: b2Color;
const Draw_s_c4: b2Color;
const Draw_s_c5: b2Color;
const Draw_s_lower: b2Vec2;
const Draw_s_upper: b2Vec2;
const Draw_s_perp: b2Vec2;
}
import { b2JointDef } from "./b2_joint.js";
import { b2Vec2 } from "../common/b2_math.js";
import { b2Joint } from "./b2_joint.js";
import { b2Rot } from "../common/b2_math.js";
import { b2Color } from "../common/b2_draw.js";