src/etc/CharacterBounds.js
/**
	* Returns the current inverse matrix for the given bone. A cache system ensures, the inverse matrix
	* is computed only once per simulation step.
	*
	* @param {Bone} bone - The bone.
	* @return {Matrix4} The inverse matrix.
	*/
Returns the current inverse matrix for the given bone. A cache system ensures, the inverse matrix
is computed only once per simulation step.

@param {Bone} bone - The bone.
@return {Matrix4} The inverse matrix.
Returns the current inverse matrix for the given bone . A cache system ensures the inverse matrix is computed only once per simulation step . @param { Bone } bone - The bone . @return { Matrix4 } The inverse matrix .
_getInverseBoneMatrix( bone ) {
		const world = this.owner.world;
		const tick = world.tick;
		let entry = this._cache.get( bone );
		if ( entry === undefined ) {
			entry = { tick: tick, inverseBoneMatrix: new Matrix4().getInverse( bone.matrixWorld ) };
			this._cache.set( bone, entry );
		} else {
			if ( entry.tick < tick ) {
				entry.tick = tick;
				entry.inverseBoneMatrix.getInverse( bone.matrixWorld );
			} else {
				if ( world.debug ) {
					console.log( 'DIVE.CharacterBounds: Inverse matrix found in cache for bone.' );
				}
			}
		}
		return entry.inverseBoneMatrix;
	}
_getInverseBoneMatrix ( bone ) { const world = this . owner . world ; const tick = world . tick ; let entry = this . _cache . get ( bone ) ; if ( entry === undefined ) { entry = { tick : tick , inverseBoneMatrix : new Matrix4 ( ) . getInverse ( bone . matrixWorld ) } ; this . _cache . set ( bone , entry ) ; } else { if ( entry . tick < tick ) { entry . tick = tick ; entry . inverseBoneMatrix . getInverse ( bone . matrixWorld ) ; } else { if ( world . debug ) { console . log ( 'DIVE.CharacterBounds: Inverse matrix found in cache for bone.' ) ; } } } return entry . inverseBoneMatrix ; }
Returns the current inverse matrix for the given bone.
Returns the current inverse matrix for the given bone .
// since computing inverse matrices is expensive, do it only once per simulation step