Documentation of 'jsci.physics.RigidBody3D' Java class
RigidBody3D
jsci.physics

Class RigidBody3D

  • All Implemented Interfaces:
    java.io.Serializable


    public class RigidBody3D
    extends ClassicalParticle3D
    The RigidBody3D class provides an object for encapsulating rigid bodies that live in 3D.
    See Also:
    Serialized Form
    • Constructor Detail

      • RigidBody3D

        public RigidBody3D()
        Constructs a rigid body.
    • Method Detail

      • setMomentOfInertia

        public void setMomentOfInertia(double MoI)
        Sets the moment of inertia.
      • getMomentOfInertia

        public double getMomentOfInertia()
        Returns the moment of inertia.
      • setAngles

        public void setAngles(double angleX,
                              double angleY,
                              double angleZ)
        Sets the angles (orientation) of this body.
        Parameters:
        angleX - an angle in radians.
        angleY - an angle in radians.
        angleZ - an angle in radians.
      • getXAngle

        public double getXAngle()
        Returns the x-axis angle of this body.
        Returns:
        an angle in radians.
      • getYAngle

        public double getYAngle()
        Returns the y-axis angle of this body.
        Returns:
        an angle in radians.
      • getZAngle

        public double getZAngle()
        Returns the z-axis angle of this body.
        Returns:
        an angle in radians.
      • setAngularVelocity

        public void setAngularVelocity(double angleXVel,
                                       double angleYVel,
                                       double angleZVel)
      • getXAngularVelocity

        public double getXAngularVelocity()
      • getYAngularVelocity

        public double getYAngularVelocity()
      • getZAngularVelocity

        public double getZAngularVelocity()
      • setAngularMomentum

        public void setAngularMomentum(double angleXMom,
                                       double angleYMom,
                                       double angleZMom)
      • getXAngularMomentum

        public double getXAngularMomentum()
      • getYAngularMomentum

        public double getYAngularMomentum()
      • getZAngularMomentum

        public double getZAngularMomentum()
      • energy

        public double energy()
        Returns the kinetic and rotational energy.
        Overrides:
        energy in class ClassicalParticle3D
      • move

        public ClassicalParticle3D move(double dt)
        Evolves this particle forward according to its kinematics. This method changes the particle's position and orientation.
        Overrides:
        move in class ClassicalParticle3D
        Returns:
        this.
      • rotate

        public RigidBody3D rotate(double dt)
        Evolves this particle forward according to its rotational kinematics. This method changes the particle's orientation.
        Returns:
        this.
      • angularAccelerate

        public RigidBody3D angularAccelerate(double ax,
                                             double ay,
                                             double az,
                                             double dt)
        Accelerates this particle. This method changes the particle's angular velocity. It is additive, that is angularAccelerate(a1, dt).angularAccelerate(a2, dt) is equivalent to angularAccelerate(a1+a2, dt).
        Returns:
        this.
      • applyTorque

        public RigidBody3D applyTorque(double tx,
                                       double ty,
                                       double tz,
                                       double dt)
        Applies a torque to this particle. This method changes the particle's angular velocity. It is additive, that is applyTorque(T1, dt).applyTorque(T2, dt) is equivalent to applyTorque(T1+T2, dt).
        Returns:
        this.
      • applyForce

        public RigidBody3D applyForce(double fx,
                                      double fy,
                                      double fz,
                                      double x,
                                      double y,
                                      double z,
                                      double dt)
        Applies a force acting at a point away from the centre of mass. Any resultant torques are also applied. This method changes the particle's angular velocity.
        Parameters:
        x - x-coordinate from centre of mass.
        y - y-coordinate from centre of mass.
        z - z-coordinate from centre of mass.
        Returns:
        this.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.