DEFINE_CG_MOTION宏【注释版】
线速度是通过物体上的x方向的力平衡达到的。表达形式为:

此处v为速度,F为外力,m为质量。使用显示欧拉格式表达t时刻速度为:

源代码:
#include "udf.h"
static real v_prev = 0.0;
DEFINE_CG_MOTION(moving_body, dt, vel, omega, time, dtime)
{
}
线速度是通过物体上的x方向的力平衡达到的。表达形式为:

此处v为速度,F为外力,m为质量。使用显示欧拉格式表达t时刻速度为:

源代码:
#include "udf.h"
static real v_prev = 0.0;
DEFINE_CG_MOTION(moving_body, dt, vel, omega, time, dtime)
{
}