Esempio n. 1
0
        private void PullParticlesFromGPU(IntPtr solverPtr, FlexContainer cnt, Flex.Memory memory)
        {
            Flex.GetParticles(m_solverPtr, m_cntr.m_particlesHndl.AddrOfPinnedObject(), m_cntr.m_particlesCount, memory);
            Flex.GetVelocities(m_solverPtr, m_cntr.m_velocitiesHndl.AddrOfPinnedObject(), m_cntr.m_particlesCount, memory);
            Flex.GetPhases(m_solverPtr, m_cntr.m_phasesHndl.AddrOfPinnedObject(), m_cntr.m_particlesCount, memory);

            Flex.GetSmoothParticles(m_solverPtr, m_cntr.m_smoothedParticlesHndl.AddrOfPinnedObject(), m_cntr.m_particlesCount, memory);
            Flex.GetNormals(m_solverPtr, m_cntr.m_normalsHndl.AddrOfPinnedObject(), m_cntr.m_particlesCount, memory);
            Flex.GetDensities(m_solverPtr, m_cntr.m_densitiesHndl.AddrOfPinnedObject(), memory);
            Flex.GetBounds(m_solverPtr, ref m_minBounds, ref m_maxBounds, memory);

            if (m_cntr.m_shapeCoefficients.Length > 0)
            {
                Flex.GetRigidTransforms(m_solverPtr, m_cntr.m_shapeRotationHndl.AddrOfPinnedObject(), m_cntr.m_shapeTranslationsHndl.AddrOfPinnedObject(), memory);
            }
        }