zoukankan      html  css  js  c++  java
  • FEMFX 仿真流程之 FmUpdateUnconstrained

    FmUpdateUnconstrained 是基于 FEMFX 仿真流程中的第一个重要环节,位于 FEMFX/amd_femfx/src/Simulation/FEMFXSimulate.cpp 中,在位于 AMD_FEMFC.h 的函数声明中,是这样解释该函数的内容的:

    // Rebuild meshes after fracture, solve end velocity without regard for constraints, and rebuild hierarchies.
    // If FM_ASYNC_THREADING and followTaskFunc non-NULL, this call will execute asynchronously, and may return before tasks are complete. 
    // These tasks will execute followTaskFunc with followTaskData (and index 0) when complete.
    void FmUpdateUnconstrained(FmScene* scene, float timestep, FmTaskFuncCallback followTaskFunc, void* followTaskData);
    

    翻译一下,大致包含了这么几部分内容:在产生碎片后重新建立网格对象(需要 new 一些新的 tetMesh 对象);在不考虑约束的情况下求解模型的(位置)、速度等;重新建立模型的等级信息;


    在函数 FmUpdateUnconstrained 中,主要实现的内容具体为:

    1、一些参数的计算和设置

    2、FmWakeIslandsChangedBetweenSteps(scene);

    解释:Complete waking of any islands marked between steps

    3、FmFindMeshConnectedComponents(scene);

    解释:// Recompute mesh connected components after any fracture in the last step.
    // This will create new tet mesh objects, and must be done before contact determination so that contact report tet and object ids are valid

    4、FmCollectTetMeshIds(scene);FmCollectRigidBodyIds(scene);

    解释:Make arrays of active and sleeping object ids

    5、写入了一些参数

    6、FmTaskFuncStepVelocityRebuildBvh

    该函数是通过如下形式执行的:

    FmTaskDataStepVelocityRebuildBvh taskData(scene, numTetMeshes, numRigidBodies);
    scene->taskSystemCallbacks.ParallelFor("ImplicitSolveBvhBuild", FmTaskFuncStepVelocityRebuildBvh, &taskData, numTasks);
    

    后面会补充一些详细的说明。

  • 相关阅读:
    css 移动端像素,rem适配详解
    css,图片和文字在父元素垂直居中,且图片和文字在中线对齐排列的几种方式
    css弹性盒子桃园三兄弟之:flexgrow、flexshrink、flexbasis详解
    less的基本使用
    css 利用flex居中对齐
    css 高度塌陷和外边距折叠问题详解,(BFC)
    HTML行内元素、块状元素、行内块状元素的区别
    css flex弹性布局学习总结
    shell学习笔记
    Ant入门教程
  • 原文地址:https://www.cnblogs.com/wghou09/p/12699354.html
Copyright © 2011-2022 走看看