public class MultiBodyModel
extends java.lang.Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.util.ArrayList<Body> |
bodies
物体を格納するリスト
|
Cube3D |
bounds
モデル境界を表す
Cube3D |
static double[] |
C1
Runge - Kutta 法の係数 1
|
static double[] |
C2
Runge - Kutta 法の係数 2
|
static ConstraintComparator |
CONST_COMPARATOR
拘束条件の比較オブジェクト
|
protected Vector3D |
g
重力加速度ベクトル
|
static LabelComparator |
LABEL_COMPARATOR
ラベルの比較オブジェクト
|
protected DefaultMatrixSolver |
matrix
質量・拘束マトリックス
|
protected java.util.ArrayList<RigidConstraint> |
rigids
剛拘束条件を格納するリスト
|
protected int |
size
マトリックス・ベクトルのサイズ
|
protected java.util.ArrayList<Constraint> |
springs
柔拘束条件を格納するリスト
|
protected Position[][] |
tempPos
Runge-Kutta 法ステップのデータ
|
protected Time |
time
時間
|
protected Vector |
vector
荷重ベクトル
|
| コンストラクタと説明 |
|---|
MultiBodyModel()
多体系データモデルを構築する
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addBody(Body body)
物体を追加する
|
void |
addConstraint(RigidConstraint constraint)
剛拘束条件を追加する
|
void |
addSpring(Spring spring)
柔拘束条件を追加する
|
protected static void |
addVector(Tuple3D v1,
Tuple3D v2,
double coef)
ベクトルに値を加える
|
void |
clear()
データを消去する
|
protected void |
createMatrixVector(int step)
質量・拘束マトリックスおよび荷重ベクトルを作成する
|
Body |
getBody(int index)
物体を返す
|
int |
getBodyCount()
物体の数を返す
|
Cube3D |
getBounds()
モデル境界を返す
|
RigidConstraint |
getConstraint(int index)
剛拘束条件を返す
|
int |
getConstraintCount()
剛拘束条件の数を返す
|
protected Position |
getPosition(int index,
int step)
Runge-Kutta 法ステップのデータを返す
|
Constraint |
getSpring(int index)
柔拘束条件を返す
|
int |
getSpringCount()
柔拘束条件の数を返す
|
Time |
getTime()
時間を返す
|
void |
init()
モデルを初期化する
|
void |
initPosition()
位置情報を初期状態に戻す
|
void |
next()
次のステップを計算する
|
void |
reNumbering()
節点ポインタを設定する
|
protected void |
setAcc(Vector a,
int step)
加速度を設定する
|
void |
setBaumgarte(double alpha,
double beta)
バウムガルテの安定化パラメータを設定する
|
protected void |
setBounds()
モデル境界を設定する
|
void |
setDt(double dt)
時間刻み幅を設定する
|
protected void |
setGcPosition()
重心位置・速度を設定する
|
void |
setGravity(Vector3D g)
重力加速度を設定する
|
protected void |
setInitPosition()
初期位置情報を設定する
|
protected void |
setSize()
マトリックス・ベクトルのサイズを設定する
|
protected void |
setTempPosition()
Runge-Kutta 法ステップのデータを設定する
|
protected void |
setTempPosition(double dt,
int step)
Runge-Kutta 法ステップのデータを設定する
|
protected void |
update(double dt)
データを更新する
|
public static final double[] C1
public static final double[] C2
public static final LabelComparator LABEL_COMPARATOR
public static final ConstraintComparator CONST_COMPARATOR
protected java.util.ArrayList<Body> bodies
protected java.util.ArrayList<RigidConstraint> rigids
protected java.util.ArrayList<Constraint> springs
protected int size
protected DefaultMatrixSolver matrix
protected Vector vector
protected Position[][] tempPos
public Cube3D bounds
Cube3Dprotected Time time
protected Vector3D g
public Cube3D getBounds()
public Time getTime()
public void setDt(double dt)
dt - 時間刻み幅public void setGravity(Vector3D g)
g - 重力加速度ベクトルpublic int getBodyCount()
public Body getBody(int index)
index - 物体のインデックスpublic void addBody(Body body)
body - 物体public int getConstraintCount()
public RigidConstraint getConstraint(int index)
index - 拘束条件のインデックスpublic void addConstraint(RigidConstraint constraint)
constraint - 拘束条件public int getSpringCount()
public Constraint getSpring(int index)
index - 拘束条件のインデックスpublic void addSpring(Spring spring)
spring - 拘束条件public void setBaumgarte(double alpha,
double beta)
alpha - バウムガルテの安定化パラメータαbeta - バウムガルテの安定化パラメータβpublic void clear()
public void init()
public void reNumbering()
protected void setSize()
protected void setTempPosition()
protected void setGcPosition()
protected void setInitPosition()
protected void setBounds()
public void initPosition()
public void next()
throws MatrixSolveException
MatrixSolveException - 連立方程式の解が求まらないときprotected void setTempPosition(double dt,
int step)
dt - 時間刻み幅step - Runge - Kutta 法のステップprotected void createMatrixVector(int step)
step - Runge - Kutta 法のステップprotected Position getPosition(int index, int step)
index - 物体のインデックスstep - Runge - Kutta 法のステップprotected void setAcc(Vector a, int step)
a - 加速度ベクトルstep - Runge - Kutta 法のステップprotected void update(double dt)
dt - 時間刻み幅