internal Transform3Drawer() : base(GearsetSettings.Instance.LineDrawerConfig) { _vectors = new Vector3Drawer(); Children.Add(_vectors); }
internal Transform3Drawer() : base(GearsetSettings.Instance.LineDrawerConfig) { _vectors = new Vector3Drawer(); Children.Add(_vectors); }
/// <summary> /// Initializes componenets that work in all platforms. /// </summary> void InitializeForAllPlatforms() { GearsetResources.Content = new ResourceContentManager(GearsetResources.Game.Services, Resource1.ResourceManager); // Graphics device stuff. GearsetResources.Effect = new BasicEffect(GearsetResources.Device); GearsetResources.Effect2D = new BasicEffect(GearsetResources.Device); GearsetResources.SpriteBatch = new SpriteBatch(GearsetResources.Device); var projection = Matrix.CreateOrthographicOffCenter(0, _game.GraphicsDevice.Viewport.Width, _game.GraphicsDevice.Viewport.Height, 0, 0, 1); var halfScreenOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0); GearsetResources.Effect2D.View = halfScreenOffset * projection; GearsetResources.Effect2D.Projection = Matrix.Identity; GearsetResources.Effect2D.World = Matrix.Identity; GearsetResources.Effect2D.VertexColorEnabled = true; GearsetResources.Keyboard = new KeyboardComponent(); BoundingBoxHelper.Initialize(); Vector3Drawer = new Vector3Drawer(); Components.Add(Vector3Drawer); Vector2Drawer = new Vector2Drawer(); Components.Add(Vector2Drawer); Transform3Drawer = new Transform3Drawer(); Components.Add(Transform3Drawer); SphereDrawer = new SphereDrawer(); Components.Add(SphereDrawer); BoxDrawer = new BoxDrawer(); Components.Add(BoxDrawer); SolidBoxDrawer = new SolidBoxDrawer(); Components.Add(SolidBoxDrawer); TreeView = new TreeView(); Components.Add(TreeView); Marker = new Marker(); Components.Add(Marker); LineDrawer = new LineDrawer(); Components.Add(LineDrawer); Labeler = new Labeler(); Components.Add(Labeler); #if WINDOWS Profiler = new WindowsProfiler(); #else this.Profiler = new Profiler(); #endif Components.Add(Profiler); _game.GraphicsDevice.DeviceReset += GraphicsDevice_DeviceReset; }