Beispiel #1
0
 /// <summary>
 /// Returns the edges of a cube that has the size of the <see cref="PlotModel"/>'s bounds.
 /// </summary>
 /// <returns></returns>
 public GraphicsBase.Point[] BoundsCube()
 {
     GraphicsBase.Point[] cube = new GraphicsBase.Point[8];
     cube[0].x = model.x0;   cube[0].y = model.y0;   cube[0].z = model.z0;
     cube[1].x = model.x1;   cube[1].y = model.y0;   cube[1].z = model.z0;
     cube[2].x = model.x1;   cube[2].y = model.y1;   cube[2].z = model.z0;
     cube[3].x = model.x0;   cube[3].y = model.y1;   cube[3].z = model.z0;
     cube[4].x = model.x0;   cube[4].y = model.y0;   cube[4].z = model.z1;
     cube[5].x = model.x1;   cube[5].y = model.y0;   cube[5].z = model.z1;
     cube[6].x = model.x1;   cube[6].y = model.y1;   cube[6].z = model.z1;
     cube[7].x = model.x0;   cube[7].y = model.y1;   cube[7].z = model.z1;
     return(cube);
 }
Beispiel #2
0
 /// <summary>
 /// Returns the device coordinates of a world cooridnates Point.
 /// </summary>
 public PointF DeviceCoordinate(GraphicsBase.Point world)
 {
     return(new PointF(Model.x.DeviceCoordinate(world.x, Bounds.Width) + Bounds.X,
                       Model.y.DeviceCoordinate(world.y, Bounds.Height) + Bounds.Y));
 }