static EditorData() { // Force the UI to be created mEditorLogic = new EditorLogic(); mGlobalInstructionSets = new List <AnimationSequence>(); SpriteManager.Camera.Z = 40.0f; mCameraBounds = new CameraBounds(mSceneCamera); mBlockingScene = new Scene(); #region create the spriteArrays, InstructionGroupArray, and SpriteGridArray ActiveSprites = new SpriteList(); formationArray = new FormationArray(); #endregion // Add the properties that are going to be watched for InstructionSets CreateMembersWatching(); instructionPlayer = new InstructionPlayer(); //= SpriteManager.AddSprite("genGfx/targetBox.bmp", sprMan.AddLayer()); // currentSpriteMarker.fade = 150; // currentSpriteMarker.visible = false; rectangleSelector = new RectangleSelector(); }
public CameraBoundsViewModel(CameraBounds cameraBounds) { if (cameraBounds.Camera == null) { throw new ArgumentException("The CameraBounds expected by this object needs to use a Camera"); } mCameraBounds = cameraBounds; }
public ReactiveHud() { mCameraBounds = new CameraBounds(EditorData.BoundsCamera); mSplineMover = new SplineMover(); mCurrentSplinePointMarker = new SplinePointSelectionMarker(); mSelf = this; }
public ReactiveHud() { mCameraBounds = new CameraBounds(EditorData.BoundsCamera); mCurrentAxisAlignedRectangleHighlight = ShapeManager.AddAxisAlignedRectangle(); mCurrentAxisAlignedRectangleHighlight.Visible = false; mCurrentAxisAlignedCubeHighlight = ShapeManager.AddAxisAlignedRectangle(); mCurrentAxisAlignedCubeHighlight.Visible = false; mCurrentCircleHighlight = ShapeManager.AddAxisAlignedRectangle(); mCurrentCircleHighlight.Visible = false; mCurrentSphereHighlight = ShapeManager.AddAxisAlignedRectangle(); mCurrentSphereHighlight.Visible = false; mCrossHair = new Crosshair(); mCrossHair.Visible = false; float screensize = 5f; Vector3 forwardVector = MathFunctions.ForwardVector3; Matrix rotationMatrix = SpriteManager.Camera.RotationMatrix; MathFunctions.TransformVector(ref forwardVector, ref rotationMatrix); float planeDistance = Vector3.Dot(forwardVector, -SpriteManager.Camera.Position); float planeScreenHeight = 2f * planeDistance * (float)Math.Tan((double)SpriteManager.Camera.FieldOfView); float planeScreenWidth = planeScreenHeight / SpriteManager.Camera.FieldOfView; float width = screensize * planeScreenWidth / (float)SpriteManager.Camera.DestinationRectangle.Width; float height = screensize * planeScreenHeight / (float)SpriteManager.Camera.DestinationRectangle.Height; mNewPointPolygon = Polygon.CreateEquilateral(3, Math.Min(width, height), 0); //.3f, 0); mNewPointPolygon.Color = EditorProperties.NewPointPolygonColor; mPointText = TextManager.AddText(""); NewPointPolygonScale = 10 / SpriteManager.Camera.PixelsPerUnitAt(mNewPointPolygon.Z); }
static EditorData() { // Force the UI to be created mEditorLogic = new EditorLogic(); mGlobalInstructionSets = new List<AnimationSequence>(); SpriteManager.Camera.Z = 40.0f; mCameraBounds = new CameraBounds(mSceneCamera); mBlockingScene = new Scene(); #region create the spriteArrays, InstructionGroupArray, and SpriteGridArray ActiveSprites = new SpriteList(); formationArray = new FormationArray(); #endregion // Add the properties that are going to be watched for InstructionSets CreateMembersWatching(); instructionPlayer = new InstructionPlayer(); //= SpriteManager.AddSprite("genGfx/targetBox.bmp", sprMan.AddLayer()); // currentSpriteMarker.fade = 150; // currentSpriteMarker.visible = false; rectangleSelector = new RectangleSelector(); }