Пример #1
0
void OpenglApplication::update( real_t dt )
{
    // update camera
    camera_control.update( dt );
    // update project
    project.update( dt );
}
Пример #2
0
void RaytracerApplication::update( real_t delta_time )
{
    if ( raytracing ) {
        // do part of the raytrace
        if ( !raytrace_finished ) {
            assert( buffer );
            raytrace_finished = raytracer.raytrace( buffer, &delta_time );
        }
    } else {
        // copy camera over from camera control (if not raytracing)
        camera_control.update( delta_time );
        scene.camera = camera_control.camera;
    }
}
Пример #3
0
void PhysicsApplication::update( real_t delta_time )
{
    // copy camera over from camera control (if not raytracing)
    camera_control.update( delta_time );
    scene.camera = camera_control.camera;

    static const size_t NUM_ITER = 20;

    // step the simulation
    if ( !pause ) {
        real_t step_size = delta_time / NUM_ITER;
        for ( size_t i = 0; i < NUM_ITER; i++ ) {
            scene.update( step_size * speed );
        }
    }
}
Пример #4
0
void GlslApplication::update( real_t dt )
{
    // update camera
    camera_control.update( dt );
}