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

public class Vertex extends JoltPhysicsObject implements ConstVertex
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

    • setInvMass

      public Vertex setInvMass(float invMass)
      Alter the inverse mass. (native attribute: mInvMass)
      Parameters:
      invMass - the desired inverse mass (in 1/kilograms, default=1)
      Returns:
      the modified settings, for chaining
    • setPosition

      public Vertex setPosition(float x, float y, float z)
      Alter the initial location of the vertex. (native attribute: mPosition)
      Parameters:
      x - the desired X coordinate
      y - the desired Y coordinate
      z - the desired Z coordinate
      Returns:
      the modified settings, for chaining
    • setPosition

      public Vertex 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))
      Returns:
      the modified settings, for chaining
    • setPosition

      public Vertex 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))
      Returns:
      the modified settings, for chaining
    • setVelocity

      public Vertex setVelocity(float x, float y, float z)
      Alter the initial location of the vertex. (native attribute: mPosition)
      Parameters:
      x - the desired X component
      y - the desired Y component
      z - the desired Z component
      Returns:
      the modified settings, for chaining
    • setVelocity

      public Vertex 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))
      Returns:
      the modified settings, for chaining
    • setVelocity

      public Vertex 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))
      Returns:
      the modified settings, for chaining
    • getInvMass

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

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

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