Exemple #1
0
        void UpdateSolver()
        {
            m_particleData.container    = this;
            m_particleData.particleData = FlexExt.MapParticleData(m_containerHandle);
            UpdateBuffer(m_particleData.particleData);

#if UNITY_EDITOR
            if (m_showTimers)
            {
                Flex.GetTimers(m_solverHandle, ref m_timers);
            }
#endif
            FlexExt.UpdateInstances(m_containerHandle);

            UpdateDrawFluid(m_particleData);

            UpdateDetectShapes(m_particleData);

            m_fluidIndexCount = 0;
            if (onFlexUpdate != null)
            {
                onFlexUpdate(m_particleData);
            }

            FlexExt.UnmapParticleData(m_containerHandle);

#if UNITY_EDITOR
            FlexExt.TickContainer(m_containerHandle, Time.fixedDeltaTime, m_substepCount, m_showTimers);
#else
            FlexExt.TickContainer(m_containerHandle, Time.fixedDeltaTime, m_substepCount);
#endif
        }