All Implemented Interfaces:
ConstJoltPhysicsObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class Vertex extends JoltPhysicsObject
Attributes of a particle, for use during the creation of a soft body. (native type: SoftBodySharedSettings::Vertex)
  • Constructor Details

    • Vertex

      public Vertex()
      Instantiate a default vertex.
  • Method Details

    • getInvMass

      public float getInvMass()
      Return the inverse mass. The vertex is unaffected. (native attribute: mInvMass)
      Returns:
      the inverse of the mass (in 1/kilograms)
    • getPosition

      public Float3 getPosition()
      Copy the initial location. The vertex is unaffected. (native attribute: mPosition)
      Returns:
      a new location vector
    • getVelocity

      public Float3 getVelocity()
      Copy the initial velocity. The vertex is unaffected. (native attribute: mVelocity)
      Returns:
      a new velocity vector (in meters per second)
    • setInvMass

      public void setInvMass(float invMass)
      Alter the inverse mass. (native attribute: mInvMass)
      Parameters:
      invMass - the desired inverse mass (in 1/kilograms, default=1)
    • setPosition

      public void setPosition(Float3 location)
      Alter the initial location of the vertex. (native attribute: mPosition)
      Parameters:
      location - the desired location (not null, unaffected default=(0,0,0))
    • setPosition

      public void setPosition(Vec3Arg location)
      Alter the initial location of the vertex. (native attribute: mPosition)
      Parameters:
      location - the desired location (not null, unaffected default=(0,0,0))
    • setVelocity

      public void setVelocity(Float3 velocity)
      Alter the initial velocity of the vertex. (native attribute: mVelocity)
      Parameters:
      velocity - the desired velocity (in meters per second, not null, unaffected default=(0,0,0))
    • setVelocity

      public void setVelocity(Vec3Arg velocity)
      Alter the initial velocity of the vertex. (native attribute: mVelocity)
      Parameters:
      velocity - the desired velocity (in meters per second, not null, unaffected, default=(0,0,0))