Orthographic projection mode with dynamic near/far.
This commit is contained in:
parent
0834aff9f4
commit
e7947a2fd2
70 changed files with 2548 additions and 244 deletions
|
|
@ -33,6 +33,7 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.RenderOpenGl.OpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.GCodeVisualizer
|
||||
{
|
||||
|
|
@ -48,6 +49,10 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
private ColorVertexData[] colorVertexData;
|
||||
|
||||
private AxisAlignedBoundingBox boundingBox = AxisAlignedBoundingBox.Empty();
|
||||
|
||||
public AxisAlignedBoundingBox BoundingBox { get { return new AxisAlignedBoundingBox(boundingBox.MinXYZ, boundingBox.MaxXYZ); } }
|
||||
|
||||
/// <summary>
|
||||
/// Create a new VertexBuffer
|
||||
/// </summary>
|
||||
|
|
@ -136,6 +141,13 @@ namespace MatterHackers.GCodeVisualizer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
boundingBox = AxisAlignedBoundingBox.Empty();
|
||||
foreach (int i in indexData)
|
||||
{
|
||||
var v = colorData[i];
|
||||
boundingBox.ExpandToInclude(new Vector3Float(v.positionX, v.positionY, v.positionZ));
|
||||
}
|
||||
}
|
||||
|
||||
public void RenderRange(int offset, int count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue