public ModelBoundingBox(GraphicsDevice graphicsDevice, Camera camera, bool viewBody) { this.graphicsDevice = graphicsDevice; boundingBoxBuffer = new BoundingBoxBuffer(graphicsDevice); boundingBoxBuffer.Parent = this; axisLines = new AxisLines(); axisLines.Parent = this; this.camera = camera; camera.Attach(axisLines); debugDrawer = new DebugDrawer(graphicsDevice, camera); debugDrawer.Color = Color.LightGreen; this.viewBody = viewBody; }
private void CreateAxisBoundingBox() { axisBoundingBoxes = new BoundingBox[3] { new BoundingBox(axisVertices[0].Position - xxOffset, axisVertices[0].Position + xOffset + xxOffset), new BoundingBox(axisVertices[0].Position - yyOffset, axisVertices[0].Position + yOffset + yyOffset), new BoundingBox(axisVertices[0].Position - zzOffset, axisVertices[0].Position + zOffset + zzOffset) }; for (int i = 0; i < 3; i++) { axisBoundingBoxBuffers[i] = new BoundingBoxBuffer(parent.GraphicsDevice); axisBoundingBoxBuffers[i].BoundingBox = axisBoundingBoxes[i]; } }