public ObjectModificationGizmo(Controls controls, FPSCamera camera)
        {
            mControls = controls;
            mCamera = camera;

            mXPositionArm.ObjectID = mXPickingID;
            mYPositionArm.ObjectID = mYPickingID;
            mZPositionArm.ObjectID = mZPickingID;

            mXScaleArm.ObjectID = mXPickingID;
            mYScaleArm.ObjectID = mYPickingID;
            mZScaleArm.ObjectID = mZPickingID;

            mYawArm.ObjectID   = mXPickingID;
            mPitchArm.ObjectID = mYPickingID;
            mRollArm.ObjectID  = mZPickingID;

            IsDragging = false;
        }
示例#2
0
文件: Editor.cs 项目: thormme/Chimera
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            Content = new ContentManager(Services, "Content");

            GraphicsManager.CelShading = GraphicsManager.CelShaded.All;
            GraphicsManager.Outlining = GraphicsManager.Outlines.All;
            GraphicsManager.CastingShadows = true;
            GraphicsManager.EnableScreenPicking = true;
            GraphicsManager.WireframeRendering = GraphicsManager.Wireframe.Both;
            GraphicsManager.DebugVisualization = false;

            mCamera = new FPSCamera(GraphicsDevice.Viewport);
            mCamera.Position = new Vector3(28.0f, 25.0f, 29.0f);
            mCamera.Target = new Vector3(27.5f, 24.3f, 28.5f);
            mCamera.FarPlaneDistance = 1500;
            mCamera.NearPlaneDistance = 0.2f;
        }
示例#3
0
文件: Entity.cs 项目: thormme/Chimera
 public Entity(GraphicsDevice graphicsDevice, Controls controls, FPSCamera camera)
 {
     mGraphicsDevice = graphicsDevice;
     mControls = controls;
     mCamera = camera;
 }
示例#4
0
        public MapEditor(GraphicsDevice graphicsDevice, FPSCamera camera, ContentManager content, GameDeviceControl gameControl, EditorForm editorForm)
        {
            this.EditorForm = editorForm;
            this.HeightMapBrushPropertiesPane = editorForm.HeightMapBrushPropertiesForm;
            this.ObjectParameterPane = editorForm.ObjectParametersForm;
            this.ObjectPlacementPane = editorForm.ObjectPlacementPanel;
            this.TextureBrushPropertiesPane = editorForm.TextureBrushPropertiesForm;
            this.TextureLayerPane = editorForm.TextureLayerForm;
            this.TextureSelectionPane = editorForm.TextureSelectionForm;
            this.GizmoForm = editorForm.GizmoForm;
            mGraphics = graphicsDevice;
            mGameControl = gameControl;
            mCamera = camera;
            mDummyWorld = new DummyWorld(mControls);
            mEntity = new Entity(graphicsDevice, mControls, mCamera);
            mGizmo = new ObjectModificationGizmo(mControls, mCamera);
            InitializePanes();

            mTextureTransformShader = content.Load<Effect>("shaders/TextureTransform");

            NewHandler(this, EventArgs.Empty);
        }
示例#5
0
        private void BirdsEyeViewCommand(List<string> parameters)
        {
            if (GraphicsManager.BirdsEyeViewCamera != null)
            {
                GraphicsManager.BirdsEyeViewCamera = null;
            }
            else
            {
                FPSCamera birdsEyeViewCamera = new FPSCamera(Graphics.GraphicsDevice.Viewport);
                birdsEyeViewCamera.Position = new Vector3(0, 1000, 0);
                birdsEyeViewCamera.Target = new Vector3(1, 1, 1);

                GraphicsManager.BirdsEyeViewCamera = birdsEyeViewCamera;
            }
        }