Пример #1
0
		void						Camera::applyPreset(eCameraPresetType preset) {
			float					fov = 0.0f;

			setAspect(g_f3dCameraPresets[preset].sensor_width / g_f3dCameraPresets[preset].sensor_height);
			fov = 2.0f * (atanf(g_f3dCameraPresets[preset].sensor_width / (2.0f * g_f3dCameraPresets[preset].focal_len)));
			setFOV(fov);
		}
Пример #2
0
Camera::Camera() {
	setFOV(45.f);
	setPosition(glm::vec3(10.f, 10.f, 10.f));
	//lookAt(getPosition(),
	//	glm::vec3(0.f, 0.f, 0.f),
	//	glm::vec3(0.f, 1.f, 0.f));
	setRotation(glm::vec3(0.f, 0.f, 0.f));
}
Пример #3
0
LaserConfig::LaserConfig()  {
  setLaserType(UMKNOWN_PROXIMITY_SENSOR);
  setStartAngle(-0.5*M_PI);
  setFOV(M_PI);
  setAngularResolution(carmen_degrees_to_radians(1.0));
  setMaximumRange(81.9);
  setAccuracy(0.01);
  setRemissionMode(REMISSION_NONE);
}
//The complete constructor.
Camera::Camera(std::string name) : Actor(name)
{
    //Setting the camera to its default position, point of focus, and up 
    //direction.
    m_Transform->setPosition(Vector3(0, 0, 0));

    //Setting the field of view to 90 degrees.
    setFOV(90);
}
Пример #5
0
Node::Node()
{
	_rotation = Vector3f(0.0f, 0.0f, 0.0f);
	_scaling = Vector3f(1.0f, 1.0f, 1.0f);
	_translation = Vector3f(0.0f, 0.0f, 0.0f);
	setWinSize(winWidth, winHeight);
	setFOV(30.0f);
	setNearClippingPlane(1.0f);
	setFarClippingPlane(100.0f);
}
Пример #6
0
Camera::Camera(glm::vec3 position) : Transform(position)
{
	nearClipPlane = 1.f;
	farClipPlane = 5000.f;

	setFOV(90.f, window->width, window->height);
	setFirstPerson(true);

	viewMatrix = glm::mat4(1.f);
}
Пример #7
0
gxCamera::gxCamera():
	object3d(OBJECT3D_CAMERA_STRUCT)
{
	setFOV(45.0f);
	setNear(10.0f);
	setFar(10000.0f);
	setType(PERSPECTIVE_PROJECTION);
	updateLocalPositionf(0, 0, 300);

	perspectiveChanged();
}
Пример #8
0
void Camera::zoom(const long double &multiplier)
{
    if (std::abs(multiplier) < 0.000001L) {
        return;
    }
    
    long double zoom = std::pow(2.0L, multiplier);
    
    switch (m_projection) {
    case Parallel:
        m_zoom /= zoom;
        break;
    case Perspective:
        long double newFOV = m_fov - multiplier * degreeToRadian(1.0L);
        setFOV(newFOV);
        break;
    }
}