标签:仿真 FEMFX 对象 timestep tetMesh FmTaskFuncStepVelocityRebuildBvh 软体 constraints
FmTaskFuncStepVelocityRebuildBvh
在 FEMFX/amd_femfx/src/Simulation/FEMFXSimulate.cpp 中定义,主要完成了仿真中(位置)速度的计算、bvh的更新等工作。
感觉该部分的主要内容为 FmTaskFuncTetMeshStepVelocityRebuildBvh
和 FmTaskFuncRbStepVelocityRebuildBvh
两部分。
其中,FmTaskFuncTetMeshStepVelocityRebuildBvh
中的内容为软体的计算。
注:软体也区分软体对象是否为 KINEMATIC 对象。(KINEMATIC 对象意味着该对象的运动是由外界驱动的,也就是说,根据外界输入,直接设定该对象的运动状态、轨迹)
主要内容为:
FmStepVelocityImplicitEuler(scene, tetMesh, solverData, gravityVector, kRayleighMassDamping, kRayleighStiffnessDamping, tetMesh->extForceSpeedLimit, timestep, scene->params.epsilonCg);
FmBuildHierarchy(tetMesh, timestep, aabbPadding);
FmAddDeformationConstraints(tetMesh, constraintsBuffer, timestep);
具体为:
FmStepVelocityImplicitEuler
为求解步骤:
// Take a simulation step using current dynamic state, external forces, constraints set in tetMeshState.
// Also resets vertex flag FM_VERT_FLAG_FRACTURED and tetQuatSum
FmBuildHierarchy
为建立等级:
// For CCD, must build after integration computes new velocities.
FmAddDeformationConstraints
为添加形变约束:
// Add constraints to prevent excessive deformation.
// Expects that unconstrained end-of-step velocities have been updated.
// There are up to three constraints per tetrahedron, and using the same 3D constraints and 3x3 Jacobian submatrices as for contacts and glue.
// This allows some benefit from SIMD but wastes space when fewer dimensions are needed.
// Reference: Perez et al., "Strain Limiting for Soft Finger Contact Simulation"
具体的内容,还要进一步分析。
另外,FmTaskFuncRbStepVelocityRebuildBvh
中基本就是计算刚体在无约束(重力作用)下的运动,计算速度、位置之类的,顺便把碰撞对象 aabb 等更新一下。
标签:仿真,FEMFX,对象,timestep,tetMesh,FmTaskFuncStepVelocityRebuildBvh,软体,constraints 来源: https://www.cnblogs.com/wghou09/p/12699520.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。