Can click on IObjec3DControls
This commit is contained in:
parent
ac3ade78af
commit
f166728aa1
5 changed files with 33 additions and 12 deletions
|
|
@ -85,6 +85,11 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
|
||||
public void Draw(DrawGlContentEventArgs e)
|
||||
{
|
||||
GLHelper.Render(shape, color, ShapeMatrix(), RenderTypes.Shaded);
|
||||
}
|
||||
|
||||
private Matrix4X4 ShapeMatrix()
|
||||
{
|
||||
var worldPosition = getPosition().Transform(owner.Matrix);
|
||||
double distBetweenPixelsWorldSpace = context.World.GetWorldUnitsPerScreenPixelAtPosition(worldPosition);
|
||||
|
|
@ -92,13 +97,12 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
var offset = Matrix4X4.CreateTranslation(getPosition());
|
||||
|
||||
var cubeMatrix = scale * owner.Matrix * offset;
|
||||
|
||||
GLHelper.Render(shape, color, cubeMatrix, RenderTypes.Shaded);
|
||||
return cubeMatrix;
|
||||
}
|
||||
|
||||
public ITraceable GetTraceable()
|
||||
{
|
||||
return new Transform(collisionVolume, owner.Matrix);
|
||||
return new Transform(collisionVolume, ShapeMatrix());
|
||||
}
|
||||
|
||||
public void OnMouseDown(Mouse3DEventArgs mouseEvent3D)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue