MinieLibrary/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
/**
     * De-serialize this body from the specified importer, for example when
     * loading from a J3O file.
     *
     * @param importer (not null)
     * @throws IOException from the importer
     */
De-serialize this body from the specified importer, for example when
loading from a J3O file.

@param importer (not null)
@throws IOException from the importer
De - serialize this body from the specified importer for example when loading from a J3O file . @param importer ( not null ) @throws IOException from the importer
@Override
    public void read(JmeImporter importer) throws IOException {
        super.read(importer);
        InputCapsule capsule = importer.getCapsule(this);
        mass = capsule.readFloat(tagMass, 1f);
        rebuildRigidBody();
        setAngularVelocity((Vector3f) capsule.readSavable(tagAngularVelocity,
                translateIdentity));
        if (mass != massForStatic) {
            setKinematic(capsule.readBoolean(tagKinematic, false));
        }
        setLinearVelocity((Vector3f) capsule.readSavable(tagLinearVelocity,
                translateIdentity));
        applyCentralForce((Vector3f) capsule.readSavable(tagAppliedForce,
                translateIdentity));
        applyTorque((Vector3f) capsule.readSavable(tagAppliedTorque,
                translateIdentity));
        /*
         * Set force, torque, velocities, and kinematic flag
         * BEFORE readPcoProperties() because
         * those setters also affect deactivation time.
         */
        readPcoProperties(capsule);
        setContactResponse(capsule.readBoolean(tagContactResponse, true));
        setInverseInertiaLocal((Vector3f) capsule.readSavable(tagInverseInertia,
                scaleIdentity));
        setAngularFactor((Vector3f) capsule.readSavable(tagAngularFactor,
                scaleIdentity));
        setLinearFactor((Vector3f) capsule.readSavable(tagLinearFactor,
                scaleIdentity));
        setDamping(capsule.readFloat(tagLinearDamping, 0f),
                capsule.readFloat(tagAngularDamping, 0f));
        setSleepingThresholds(
                capsule.readFloat(tagLinearSleepingThreshold, 0.8f),
                capsule.readFloat(tagAngularSleepingThreshold, 1f));
        setProtectGravity(capsule.readBoolean(tagProtectGravity, false));
        setPhysicsLocation((Vector3f) capsule.readSavable(tagPhysicsLocation,
                translateIdentity));
        setPhysicsRotation((Matrix3f) capsule.readSavable(tagPhysicsRotation,
                matrixIdentity));
        readJoints(capsule);
    }
@ Override public void read ( JmeImporter importer ) throws IOException { super . read ( importer ) ; InputCapsule capsule = importer . getCapsule ( this ) ; mass = capsule . readFloat ( tagMass , 1f ) ; rebuildRigidBody ( ) ; setAngularVelocity ( ( Vector3f ) capsule . readSavable ( tagAngularVelocity , translateIdentity ) ) ; if ( mass != massForStatic ) { setKinematic ( capsule . readBoolean ( tagKinematic , false ) ) ; } setLinearVelocity ( ( Vector3f ) capsule . readSavable ( tagLinearVelocity , translateIdentity ) ) ; applyCentralForce ( ( Vector3f ) capsule . readSavable ( tagAppliedForce , translateIdentity ) ) ; applyTorque ( ( Vector3f ) capsule . readSavable ( tagAppliedTorque , translateIdentity ) ) ; /*
         * Set force, torque, velocities, and kinematic flag
         * BEFORE readPcoProperties() because
         * those setters also affect deactivation time.
         */ readPcoProperties ( capsule ) ; setContactResponse ( capsule . readBoolean ( tagContactResponse , true ) ) ; setInverseInertiaLocal ( ( Vector3f ) capsule . readSavable ( tagInverseInertia , scaleIdentity ) ) ; setAngularFactor ( ( Vector3f ) capsule . readSavable ( tagAngularFactor , scaleIdentity ) ) ; setLinearFactor ( ( Vector3f ) capsule . readSavable ( tagLinearFactor , scaleIdentity ) ) ; setDamping ( capsule . readFloat ( tagLinearDamping , 0f ) , capsule . readFloat ( tagAngularDamping , 0f ) ) ; setSleepingThresholds ( capsule . readFloat ( tagLinearSleepingThreshold , 0.8f ) , capsule . readFloat ( tagAngularSleepingThreshold , 1f ) ) ; setProtectGravity ( capsule . readBoolean ( tagProtectGravity , false ) ) ; setPhysicsLocation ( ( Vector3f ) capsule . readSavable ( tagPhysicsLocation , translateIdentity ) ) ; setPhysicsRotation ( ( Matrix3f ) capsule . readSavable ( tagPhysicsRotation , matrixIdentity ) ) ; readJoints ( capsule ) ; }
De-serialize this body from the specified importer, for example when
 loading from a J3O file.
De - serialize this body from the specified importer for example when loading from a J3O file .