Adjust depth clip according to distance
{
const GL::Vector3 &pos = camera.get_position();
const GL::Vector3 &look = camera.get_look_direction();
+ float dist = get_distance();
+ float low = designer.get_layout().get_catalogue().get_gauge()*5;
+ if(dist+delta<low)
+ delta = low-dist;
camera.set_position(GL::Vector3(pos.x-look.x*delta, pos.y-look.y*delta, pos.z-look.z*delta));
+ dist += delta;
+ camera.set_depth_clip(dist*0.02, dist*50);
}
void CameraController::rotate(float angle)