private void AddSecurityCamera(Viewport viewport, ProjectionParameters projectionParameters) { Transform3D transform = new Transform3D(new Vector3(50, 10, 10), Vector3.Zero, Vector3.Zero, -Vector3.UnitX, Vector3.UnitY); Camera3D camera3D = new Camera3D("security camera 1", ActorType.Camera, transform, projectionParameters, viewport); camera3D.AttachController(new SecurityCameraController("scc1", ControllerType.Security, 15, 2, Vector3.UnitX)); this.cameraManager.Add(camera3D); }
private void AddFlightCamera(Viewport viewport, ProjectionParameters projectionParameters) { Transform3D transform = new Transform3D(new Vector3(0, 10, 30), Vector3.Zero, Vector3.Zero, -Vector3.UnitZ, Vector3.UnitY); Camera3D camera3D = new Camera3D("flight camera 1", ActorType.Camera, transform, projectionParameters, viewport); camera3D.AttachController(new FlightCameraController("flight camera controller 1", ControllerType.Flight, AppData.CameraMoveKeys_Alt1, AppData.CameraMoveSpeed, AppData.CameraStrafeSpeed, AppData.CameraRotationSpeed, this.inputManagerParameters, this.screenCentre)); this.cameraManager.Add(camera3D); }
private void AddRailCamera(Viewport viewport, ProjectionParameters projectionParameters) { //doesnt matter where the camera starts because we reset immediately inside the RailController Transform3D transform = Transform3D.Zero; Camera3D camera3D = new Camera3D("rail camera 1", ActorType.Camera, transform, projectionParameters, viewport); camera3D.AttachController(new RailController("rc1", ControllerType.Rail, this.drivableModelObject, this.railDictionary["battlefield 1"])); this.cameraManager.Add(camera3D); }
private void AddTrack3DCamera(Viewport viewport, ProjectionParameters projectionParameters) { //doesnt matter where the camera starts because we reset immediately inside the Transform3DCurveController Transform3D transform = Transform3D.Zero; Camera3D camera3D = new Camera3D("curve camera 1", ActorType.Camera, transform, projectionParameters, viewport); camera3D.AttachController(new Track3DController("tcc1", ControllerType.Track, this.track3DDictionary["push forward 1"], PlayStatusType.Play)); this.cameraManager.Add(camera3D); }
private void AddThirdPersonCamera(Viewport viewport, ProjectionParameters projectionParameters) { Transform3D transform = Transform3D.Zero; Camera3D camera3D = new Camera3D("third person camera 1", ActorType.Camera, transform, projectionParameters, viewport); camera3D.AttachController(new ThirdPersonController("tpcc1", ControllerType.ThirdPerson, this.drivableModelObject, AppData.CameraThirdPersonDistance, AppData.CameraThirdPersonScrollSpeedDistanceMultiplier, AppData.CameraThirdPersonElevationAngleInDegrees, AppData.CameraThirdPersonScrollSpeedElevationMultiplier, LerpSpeed.Slow, LerpSpeed.VerySlow, this.inputManagerParameters)); this.cameraManager.Add(camera3D); }
private void AddMainAndPipCamera(Viewport viewport, ProjectionParameters projectionParameters) { Camera3D camera3D = null; Transform3D transform = null; //security camera transform = new Transform3D(new Vector3(0, 40, 0), Vector3.Zero, Vector3.One, -Vector3.UnitY, Vector3.UnitZ); int width = 240; int height = 180; int xPos = this.resolution.X - width - 10; Viewport pipViewport = new Viewport(xPos, 10, width, height); camera3D = new Camera3D("sc1", ActorType.Camera, transform, projectionParameters, pipViewport, 0.8f); camera3D.AttachController(new SecurityCameraController("scc1", ControllerType.Security, 15, 2, Vector3.UnitX)); this.cameraManager.Add(camera3D); //1st person transform = new Transform3D( new Vector3(0, 10, 100), Vector3.Zero, Vector3.One, -Vector3.UnitZ, Vector3.UnitY); camera3D = new Camera3D("fpc1", ActorType.Camera, transform, projectionParameters, viewport, 0.4f); camera3D.AttachController(new FirstPersonCameraController( "fpcc1", ControllerType.FirstPerson, AppData.CameraMoveKeys, AppData.CameraMoveSpeed, AppData.CameraStrafeSpeed, AppData.CameraRotationSpeed, this.inputManagerParameters, this.screenCentre)); //put controller later! this.cameraManager.Add(camera3D); }