void Clock::Start(void)
{
	time = millis();
	
	Serial.print("Resetando tempo:");
	Serial.println(GetTimeSeconds());
}
Beispiel #2
0
F64 Timer::GetTimeMilliseconds() const
{
	return GetTimeSeconds() * F64(MB_SECONDS_TO_MILLISECONDS);
}
Beispiel #3
0
float GenDeformScale( const glm::vec3& position, const shaderInfo_t* shader )
{
    // The solution here is also snagged from the Q3 engine.
    if ( !shader )
        return 0.0f;

    switch ( shader->deformCmd )
    {
    case VERTEXDEFORM_CMD_WAVE:
    {
        switch ( shader->deformFn )
        {
        case VERTEXDEFORM_FUNC_TRIANGLE:
        {
            // Distribute the "weight" of the tessellation spread across the length of the vertex position vector, where the vertex's tail is located at the world origin.
            float offset =
                shader->deformParms.data.wave.phase + ( position.x + position.y + position.z ) * shader->deformParms.data.wave.spread;

            return DEFORM_CALC_TABLE( deformCache.triTable, shader->deformParms.data.wave.base, offset, GetTimeSeconds(), shader->deformParms.data.wave.frequency,
                                      shader->deformParms.data.wave.amplitude );
        }
        break;
        default:
            break;
        }
    }
    break;

    default:
        MLOG_WARNING( "Non-implemented vertex deform command specified." );
        break;
    }

    return 0.0f;
}