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

public class SVertex extends JoltPhysicsObject implements ConstSVertex
A single vertex used to simulate a strand of hair. (native type: HairSettings::SVertex)
  • Constructor Details

    • SVertex

      public SVertex()
      Instantiate a default vertex.
    • SVertex

      public SVertex(ConstFloat3 location, float inverseMass)
      Instantiate a vertex with the specified location and inverse mass.
      Parameters:
      location - the desired coordinates (not null, unaffected, default=(0,0,0))
      inverseMass - the inverse of the desired mass (default=1)
  • Method Details

    • setInvMass

      public void setInvMass(float inverseMass)
      Alter the mass. (native attribute: mInvMass)
      Parameters:
      inverseMass - the inverse of the desired mass (default=1)
    • setPosition

      public void setPosition(ConstFloat3 location)
      Alter the initial location of the vertex in its modeled pose. (native attribute: mPosition)
      Parameters:
      location - the desired coordinates (not null, unaffected, default=(0,0,0))
    • setPosition

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

      public Float4 getBishop()
      Copy the bishop frame of the strand in its modeled pose, computed by init(). The vertex is unaffected. (native attribute: mBishop)
      Specified by:
      getBishop in interface ConstSVertex
      Returns:
      a new vector
    • getInvMass

      public float getInvMass()
      Return the inverse of the mass. The vertex is unaffected. (native attribute: mInvMass)
      Specified by:
      getInvMass in interface ConstSVertex
      Returns:
      the value
    • getLength

      public float getLength()
      Return the initial distance between this vertex from the next one in the unloaded strand, computed by init(). The vertex is unaffected. (native attribute: mLength)
      Specified by:
      getLength in interface ConstSVertex
      Returns:
      the distance
    • getOmega0

      public Float4 getOmega0()
      Copy the rotation between the previous rod and this one in the unloaded strand, computed by init(). The vertex is unaffected. (native attribute: mOmega0)
      Specified by:
      getOmega0 in interface ConstSVertex
      Returns:
      a new vector
    • getPosition

      public Float3 getPosition()
      Copy the initial location of the vertex in its modeled pose. The vertex is unaffected. (native attribute: mPosition)
      Specified by:
      getPosition in interface ConstSVertex
      Returns:
      a new vector
    • getStrandFraction

      public float getStrandFraction()
      Return the fraction of the way along the strand, computed by init(). The vertex is unaffected. (native attribute: mStrandFraction)
      Specified by:
      getStrandFraction in interface ConstSVertex
      Returns:
      the fractional distance (0=start, 1=end)