public IsometricCamera(Device device, Window window, Vector3D lookDirection) : base(device, window) { base.Position = -lookDirection; ResetZoom(); leftDirection = Vector3D.Normalize(Vector3D.Cross(lookDirection, -UpDirection)); }
public IsometricCamera(Device device, Window window) : base(device, window) { base.Position = -Vector3D.UnitY; ResetZoom(); leftDirection = Vector3D.Normalize(Vector3D.Cross(Vector3D.UnitY, -UpDirection)); }
public PathCamera(Device device, Window window, CameraPath path) : base(device, window) { if (path.ViewMatrices == null || path.ViewMatrices.Length < 2) throw new NoTrackSpecified(); viewMatrices = path.ViewMatrices; }
private Drawing SetupDrawing(Device device) { var mockDrawing = new Mock<Drawing>(device); mockDrawing.Setup( d => d.DrawVertices(It.IsAny<VerticesMode>(), It.IsAny<VertexPositionColor[]>())).Callback( (VerticesMode mode, VertexPositionColor[] vertices) => testResolver.NumberOfVerticesDrawn += vertices.Length); return testResolver.RegisterMock(mockDrawing.Object); }
public void CameraShouldBeAbleToHandleViewportChanges() { new Grid3D(new Size(5)); usedDevice = Resolve<Device>(); usedWindow = Resolve<Window>(); Matrix originalProjectionMatrix = usedDevice.CameraProjectionMatrix; usedWindow.ViewportPixelSize = new Size(400, 300); usedDevice.Set3DMode(); Assert.AreNotEqual(originalProjectionMatrix, usedDevice.CameraProjectionMatrix); }
public LevelEditorCamera(Device device, Window window) : base(device, window) { new Command(Command.Drag, (startPos, currentPos, isDragDone) => RotateByDrag(startPos, currentPos)).Add( new MouseDragTrigger(MouseButton.Right)); new Command(Command.Zoom, Zoom); //new Command(Command.Drag, // (startPos, currentPos, isDragDone) => PanByDrag(startPos, currentPos)).Add( // new MouseDragTrigger(MouseButton.Middle)); }
public LookAtCamera(Device device, Window window) : base(device, window) { // ReSharper disable DoNotCallOverridableMethodsInConstructor //Position = Vector3D.One * 3.0f; Position = DefaultPosition; Target = Vector3D.Zero; UpdatePosition(); new Command(Command.Zoom, Zoom); new Command(Command.MoveLeft, () => Move(-MoveSpeedPerSecond, 0)); new Command(Command.MoveRight, () => Move(MoveSpeedPerSecond, 0)); new Command(Command.MoveUp, () => Move(0, MoveSpeedPerSecond)); new Command(Command.MoveDown, () => Move(0, -MoveSpeedPerSecond)); new Command(Command.Drag, //ncrunch: no coverage start (startPos, currentPos, isDragDone) => RotateByDragCommand(currentPos, isDragDone)); //ncrunch: no coverage end }
public FreeCamera(Device device, Window window) : base(device, window) { Rotation = Quaternion.Identity; }
public OrthoCamera(Device device, Window window, ScreenSpace screenSpace) : base(device, window) { this.screenSpace = screenSpace; ZoomLevel = 1.0f; }
public PathCamera(Device device, Window window) : base(device, window) { viewMatrices = new Matrix[]{Matrix.Identity, Matrix.Identity}; }
public BillboardRenderer(Drawing drawing, Device device) { this.drawing = drawing; this.device = device; }
protected Drawing(Device device) { GraphicsDevice = device; }
protected Drawing(Device device) { this.device = device; }
public BackgroundUVUpdater(Device device) { this.device = device; }
public Particle3DRenderer(BatchRenderer3D renderer, Device device) { this.renderer = renderer; this.device = device; }
protected TargetedCamera(Device device, Window window) : base(device, window) {}