Holding shift and clicking on a triangle will now select the triangle with a 2px white outline. Selecting anything else will unselect a selected triangle. Selected triangles show up in the property grid. Most Triangle properties have had the Browsable(false) attribute removed. Triangles now store their ParentEntity, which is assigned by the ModelEntity Triangles property setter. This is useful for the property grid to see what owns the triangle.
Preview of selected triangle
![image](https://github.com/rickomax/psxprev/assets/9752430/e4823ef0-88d2-4874-b42f-42a45b7ba10d)
Refactor changes
-selectmodel startup option now does nothing if a model is already selected when the scan finishes. Because changing the user's current selection is inconvenient.
_selectionSource is properly reset when SelectEntity is called for the currently-selected entity.
Set PreviewForm.KeyPreview to true so that Shift key modifier can be captured.
SelectEntity now takes a second argument bool focus, when set to false, the _selectionSource will be set to Click (which prevents focusing on the selection).
SelectEntity now allows null entity as an argument.
modelPropertyGrid updates have been moved to a new function UpdateModelPropertyGrid, which is now used in multiple places.
Changed Double.Epsilon comparison in GeomUtils.ProjectOnNormal to float.Epsilon, because it's impossible for a float to equal that value. Although currently using < Epsilon is the same as <= 0f.
Switched to using Math.Abs in GeomUtils.UnProject.
Main changes
This implements issue #87.
Holding shift and clicking on a triangle will now select the triangle with a 2px white outline. Selecting anything else will unselect a selected triangle. Selected triangles show up in the property grid. Most Triangle properties have had the
Browsable(false)
attribute removed. Triangles now store their ParentEntity, which is assigned by the ModelEntity Triangles property setter. This is useful for the property grid to see what owns the triangle.Preview of selected triangle
![image](https://github.com/rickomax/psxprev/assets/9752430/e4823ef0-88d2-4874-b42f-42a45b7ba10d)Refactor changes
-selectmodel
startup option now does nothing if a model is already selected when the scan finishes. Because changing the user's current selection is inconvenient._selectionSource
is properly reset when SelectEntity is called for the currently-selected entity.PreviewForm.KeyPreview
to true so that Shift key modifier can be captured.bool focus
, when set to false, the_selectionSource
will be set to Click (which prevents focusing on the selection).modelPropertyGrid
updates have been moved to a new functionUpdateModelPropertyGrid
, which is now used in multiple places.Double.Epsilon
comparison in GeomUtils.ProjectOnNormal tofloat.Epsilon
, because it's impossible for a float to equal that value. Although currently using< Epsilon
is the same as<= 0f
.