java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.Vertex
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstVertex
,AutoCloseable
,Comparable<JoltPhysicsObject>
Attributes of a particle, for use during the creation of a soft body. (native
type:
SoftBodySharedSettings::Vertex
)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the inverse mass.Copy the initial location.Copy the initial velocity.setInvMass
(float invMass) Alter the inverse mass.setPosition
(float x, float y, float z) Alter the initial location of the vertex.setPosition
(Float3 location) Alter the initial location of the vertex.setPosition
(Vec3Arg location) Alter the initial location of the vertex.setVelocity
(float x, float y, float z) Alter the initial location of the vertex.setVelocity
(Float3 velocity) Alter the initial velocity of the vertex.setVelocity
(Vec3Arg velocity) Alter the initial velocity of the vertex.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
Vertex
public Vertex()Instantiate a default vertex.
-
-
Method Details
-
setInvMass
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
Alter the initial location of the vertex. (native attribute: mPosition)- Parameters:
x
- the desired X coordinatey
- the desired Y coordinatez
- the desired Z coordinate- Returns:
- the modified settings, for chaining
-
setPosition
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
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
Alter the initial location of the vertex. (native attribute: mPosition)- Parameters:
x
- the desired X componenty
- the desired Y componentz
- the desired Z component- Returns:
- the modified settings, for chaining
-
setVelocity
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
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 interfaceConstVertex
- Returns:
- the inverse of the mass (in 1/kilograms)
-
getPosition
Copy the initial location. The vertex is unaffected. (native attribute: mPosition)- Specified by:
getPosition
in interfaceConstVertex
- Returns:
- a new location vector
-
getVelocity
Copy the initial velocity. The vertex is unaffected. (native attribute: mVelocity)- Specified by:
getVelocity
in interfaceConstVertex
- Returns:
- a new velocity vector (in meters per second)
-