Class MassSpringSurface
- java.lang.Object
-
- WildMagic.LibPhysics.ParticleSystem.ParticleSystem
-
- WildMagic.LibPhysics.ParticleSystem.MassSpringSurface
-
public class MassSpringSurface extends ParticleSystem
-
-
Field Summary
Fields Modifier and Type Field Description protected float[][]
mConstantsC
protected float[][]
mConstantsR
protected float[][]
mLengthsC
protected float[][]
mLengthsR
protected int
mNumCols
protected int
mNumColsM1
protected int
mNumRows
protected int
mNumRowsM1
-
Fields inherited from class WildMagic.LibPhysics.ParticleSystem.ParticleSystem
mDPTmp1, mDPTmp2, mDPTmp3, mDPTmp4, mDVTmp1, mDVTmp2, mDVTmp3, mDVTmp4, mHalfStep, mInvMasses, mMasses, mNumParticles, mPositions, mPositionsSave, mPTmp, mSixthStep, mStep, mVelocities, mVelocitiesSave, mVTmp
-
-
Constructor Summary
Constructors Constructor Description MassSpringSurface(int numRows, int numCols, float step)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3f
Acceleration(int i, float time, Vector3f[] positions, Vector3f[] velocities)
void
dispose()
Vector3f
ExternalAcceleration(int i, float time, Vector3f[] positions, Vector3f[] velocities)
float
GetConstantC(int row, int col)
float
GetConstantR(int row, int col)
protected void
GetCoordinates(int i, int[] row, int[] col)
protected int
GetIndex(int row, int col)
float
GetLengthC(int row, int col)
float
GetLengthR(int row, int col)
float
GetMass(int row, int col)
int
GetNumCols()
int
GetNumRows()
Vector3f
GetPosition(int row, int col)
Vector3f
GetVelocity(int row, int col)
void
SetConstantC(int row, int col, float c)
void
SetConstantR(int row, int col, float c)
void
SetLengthC(int row, int col, float c)
void
SetLengthR(int row, int col, float c)
void
SetMass(int row, int col, float mass)
void
SetPosition(int row, int col, Vector3f p)
void
SetVelocity(int row, int col, Vector3f v)
-
Methods inherited from class WildMagic.LibPhysics.ParticleSystem.ParticleSystem
GetMass, GetNumParticles, GetPosition, GetStep, GetVelocity, Positions, SetMass, SetPosition, SetStep, SetVelocity, UndoUpdate, Update, Velocities
-
-
-
-
Field Detail
-
mNumRows
protected int mNumRows
-
mNumCols
protected int mNumCols
-
mNumRowsM1
protected int mNumRowsM1
-
mNumColsM1
protected int mNumColsM1
-
mConstantsR
protected float[][] mConstantsR
-
mLengthsR
protected float[][] mLengthsR
-
mConstantsC
protected float[][] mConstantsC
-
mLengthsC
protected float[][] mLengthsC
-
-
Method Detail
-
dispose
public void dispose()
- Overrides:
dispose
in classParticleSystem
-
GetNumRows
public int GetNumRows()
-
GetNumCols
public int GetNumCols()
-
SetMass
public void SetMass(int row, int col, float mass)
-
GetMass
public float GetMass(int row, int col)
-
GetPosition
public Vector3f GetPosition(int row, int col)
-
SetPosition
public void SetPosition(int row, int col, Vector3f p)
-
GetVelocity
public Vector3f GetVelocity(int row, int col)
-
SetVelocity
public void SetVelocity(int row, int col, Vector3f v)
-
GetConstantR
public float GetConstantR(int row, int col)
-
SetConstantR
public void SetConstantR(int row, int col, float c)
-
GetConstantC
public float GetConstantC(int row, int col)
-
SetConstantC
public void SetConstantC(int row, int col, float c)
-
GetLengthR
public float GetLengthR(int row, int col)
-
SetLengthR
public void SetLengthR(int row, int col, float c)
-
GetLengthC
public float GetLengthC(int row, int col)
-
SetLengthC
public void SetLengthC(int row, int col, float c)
-
GetIndex
protected int GetIndex(int row, int col)
-
GetCoordinates
protected void GetCoordinates(int i, int[] row, int[] col)
-
Acceleration
public Vector3f Acceleration(int i, float time, Vector3f[] positions, Vector3f[] velocities)
- Specified by:
Acceleration
in classParticleSystem
-
-