# include "udf.h"
DEFINE_CG_MOTION(movewall, dt, vel, omega, time, dtime)
{
Thread *t;
/*define amplitude A and angular velocity w */
real vy,A=2,w=0.3;
vy=A*w;
if (!Data_Valid_P () )
return;
vy+=-A*w*w*sin(w*time)*dtime;
vel[1]=vy;
}
请大侠看看这个udf有错吗?导入使用编译型 模型就是不动 还请赐教!