File:addBox2D\Dynamics\Joints\b2FrictionJointDef.js
- //################################################################################################//
- //################################################################################################//
- // //
- // ██████ ██ ██ ██ ██ ██ ██ █████ ████ //
- // ██ ██ ██ ██ ██ ██ ██ //
- // ██ ████ ██ █████ █████ ██ █████ █████ ██ █████ ██ █████ █████ ██ ██ █████ ██ //
- // █████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ █████ ██ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ ██ █████ ████ ██ █████ ██ ██ █████ █████ ██ ██ ██ ████ █████ █████ ██ //
- // //
- //################################################################################################//
- //################################################################################################//
- // CLASS CONSTRUCTOR
- /**
- * Friction joint definition.
- *
- * Class constructor function
- * @class b2FrictionJointDef
- * @constructor
- * @module Joints
- */
- function b2FrictionJointDef() {
- /**
- * Invokes parent class constructor function reference.
- */
- this.constructor( b2Joint.e_frictionJoint );
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // //
- // ██████ ██ ██ //
- // ██ ██ ██ //
- // ██ ██ ████ █████ █████ █████ ████ █████ ██ █████ █████ //
- // ██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ ██ ██ ██ ██ █████ ██ ██ ██ █████ █████ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ █████ █████ █████ ██ ████ ██ █████ █████ //
- // ██ //
- // ██ //
- // //
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // property DECLARATIONS
- /**
- * The local anchor point relative to bodyA's origin.
- *
- * @public
- * @property localAnchorA
- * @type {b2Vec2}
- */
- this.localAnchorA = new b2Vec2;
- /**
- * The local anchor point relative to bodyB's origin.
- *
- * @public
- * @property localAnchorB
- * @type {b2Vec2}
- */
- this.localAnchorB = new b2Vec2;
- // property INITIALISATIONS
- /**
- * @public
- * @property type
- * @type {int}
- * @default b2Joint.e_frictionJoint
- */
- // @this.constructor( b2Joint.e_frictionJoint ) above.
- /**
- * The maximum friction force in N.
- *
- * @public
- * @property maxForce
- * @type {float}
- * @default 0.0
- */
- this.maxForce = 0.0;
- /**
- * The maximum friction torque in N-m.
- *
- * @public
- * @property maxTorque
- * @type {float}
- * @default 0.0
- */
- this.maxTorque = 0.0;
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // //
- // ██ ██ ██ ██ //
- // ██ ██ ██ //
- // ██ █████ █████ █████ ████ ██ █████ █████ █████ █████ █████ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ ██ ██ ██ █████ ██ ██ ██ █████ ██ ██ ██ █████ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ ██ ██ ██ █████ ██ ██ ████ █████ ██ ██ █████ █████ //
- // //
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- } b2FrictionJointDef.prototype = p = new b2JointDef; Box2D.b2FrictionJointDef = b2FrictionJointDef;
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // //
- // ██ ██ ██ ██ ██ //
- // ███ ███ ██ ██ ██ //
- // ███████ █████ █████ █████ █████ █████ █████ //
- // ██ █ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ █████ ██ ██ ██ ██ ██ ██ ██ █████ //
- // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ //
- // ██ ██ █████ ████ ██ ██ █████ █████ █████ //
- // //
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // INSTANCE METHODS
- /**
- * @public
- * @method initialize
- * @param {b2Body} bodyA
- * @param {b2Body} bodyB
- * @param {b2Vec2} anchor
- * @return {void}
- */
- p.initialize = function ( bodyA, bodyB, anchor ) {
- this.bodyA = bodyA;
- this.bodyB = bodyB;
- this.bodyA.getLocalPoint( anchor, this.localAnchorA );
- this.bodyB.getLocalPoint( anchor, this.localAnchorB );
- };