TempleOSCDV4.06.ISO
This commit is contained in:
1 parent
6fe38d2d9d
commit
b632ab9a4f
261 files changed
+6282
-5801
No files matched your search
+6
-6
@@ -190,7 +190,7 @@ public CSpring *SpringFind(CMathODE *ode,F64 x,F64 y,F64 z=0)
|
||||
}
|
||||
|
||||
public U0 MassOrSpringFind(
|
||||
CMathODE *ode,CMass **result_mass,CSpring **result_spring,
|
||||
CMathODE *ode,CMass **res_mass,CSpring **res_spring,
|
||||
F64 x,F64 y,F64 z=0)
|
||||
{//Find spring or mass nearest x,y,z.
|
||||
CMass *tempm,*best_mass=NULL;
|
||||
@@ -219,8 +219,8 @@ public U0 MassOrSpringFind(
|
||||
}
|
||||
temps=temps->next;
|
||||
}
|
||||
if (result_mass) *result_mass =best_mass;
|
||||
if (result_spring) *result_spring=best_spring;
|
||||
if (res_mass) *res_mass =best_mass;
|
||||
if (res_spring) *res_spring=best_spring;
|
||||
}
|
||||
|
||||
public CMass *MassFindNum(CMathODE *ode,I64 num)
|
||||
@@ -263,7 +263,7 @@ U0 ODECalcSprings(CMathODE *ode)
|
||||
} else {
|
||||
e1=temps->end1;
|
||||
e2=temps->end2;
|
||||
d=D3Norm(D3Sub(&e2->state->x,&e1->state->x,&p));
|
||||
d=D3Norm(D3Sub(&p,&e2->state->x,&e1->state->x));
|
||||
temps->displacement=d-temps->rest_len;
|
||||
temps->f=temps->displacement*temps->const;
|
||||
if (temps->f>0 && temps->flags&SSF_NO_TENSION)
|
||||
@@ -297,7 +297,7 @@ U0 ODECalcDrag(CMathODE *ode)
|
||||
if (ode->drag_v3)
|
||||
d+=dd*ode->drag_v3;
|
||||
D3SubEqu(&tempm->DstateDt->DxDt,
|
||||
D3Mul(d*tempm->drag_profile_factor,&tempm->state->DxDt,&p));
|
||||
D3Mul(&p,d*tempm->drag_profile_factor,&tempm->state->DxDt));
|
||||
}
|
||||
tempm=tempm->next;
|
||||
}
|
||||
@@ -501,7 +501,7 @@ F64 ode_alloced_factor=0.75;
|
||||
U0 ODEsUpdate(CTask *task)
|
||||
{/* This routine is called by the $LK,"window mgr",A="FF:::/Adam/Gr/GrScreen.CPP,ODEsUpdate"$ on a continuous
|
||||
basis to allow real-time simulation. It is intended
|
||||
to provide results good enough for games. It uses a runge-kutta
|
||||
to provide ress good enough for games. It uses a runge-kutta
|
||||
integrator which is a better algorithm than doing it with Euler.
|
||||
|
||||
It is adaptive step-sized, so it slows down when an important
|
||||
|
||||
Reference in new issue
Block a user