engine/particle/src/test/test_particle.cpp
// Velocity-less particle at the same position as the radial
Velocity-less particle at the same position as the radial
Velocity - less particle at the same position as the radial
TEST_F(ParticleTest, RadialEdgeCase)
{
    float dt = 1.0f;
    ASSERT_TRUE(LoadPrototype("mod_radial_edgecase.particlefxc", &m_Prototype));
    dmParticle::HInstance instance = dmParticle::CreateInstance(m_Context, m_Prototype, 0x0);
    uint16_t index = instance & 0xffff;
    dmParticle::Instance* i = m_Context->m_Instances[index];
    dmParticle::StartInstance(m_Context, instance);
    dmParticle::Update(m_Context, dt, 0x0);
    dmParticle::Particle* particle = &i->m_Emitters[0].m_Particles[0];
    ASSERT_EQ(1.0f, lengthSqr(particle->GetVelocity()));
    dmParticle::DestroyInstance(m_Context, instance);
}
TEST_F ( ParticleTest , RadialEdgeCase ) { float dt = 1.0f ; ASSERT_TRUE ( LoadPrototype ( " " , & m_Prototype ) ) ; dmParticle :: HInstance instance = dmParticle :: CreateInstance ( m_Context , m_Prototype , 0x0 ) ; uint16_t index = instance & 0xffff ; dmParticle :: Instance * i = m_Context -> m_Instances [ index ] ; dmParticle :: StartInstance ( m_Context , instance ) ; dmParticle :: Update ( m_Context , dt , 0x0 ) ; dmParticle :: Particle * particle = & i -> m_Emitters [ 0 ] . m_Particles [ 0 ] ; ASSERT_EQ ( 1.0f , lengthSqr ( particle -> GetVelocity ( ) ) ) ; dmParticle :: DestroyInstance ( m_Context , instance ) ; }
Velocity-less particle at the same position as the radial
Velocity - less particle at the same position as the radial