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[][]mConstantsCprotected float[][]mConstantsRprotected float[][]mLengthsCprotected float[][]mLengthsRprotected intmNumColsprotected intmNumColsM1protected intmNumRowsprotected intmNumRowsM1-
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 Vector3fAcceleration(int i, float time, Vector3f[] positions, Vector3f[] velocities)voiddispose()Vector3fExternalAcceleration(int i, float time, Vector3f[] positions, Vector3f[] velocities)floatGetConstantC(int row, int col)floatGetConstantR(int row, int col)protected voidGetCoordinates(int i, int[] row, int[] col)protected intGetIndex(int row, int col)floatGetLengthC(int row, int col)floatGetLengthR(int row, int col)floatGetMass(int row, int col)intGetNumCols()intGetNumRows()Vector3fGetPosition(int row, int col)Vector3fGetVelocity(int row, int col)voidSetConstantC(int row, int col, float c)voidSetConstantR(int row, int col, float c)voidSetLengthC(int row, int col, float c)voidSetLengthR(int row, int col, float c)voidSetMass(int row, int col, float mass)voidSetPosition(int row, int col, Vector3f p)voidSetVelocity(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:
disposein 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:
Accelerationin classParticleSystem
-
-