Skip to content

Commit

Permalink
gizmos: add grid thickness
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Oct 29, 2024
1 parent 549ff8a commit 3c8da73
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Gizmo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ type GizmoI interface {

var _ Widget = &GizmoWidget{}

// GizmoWidget implement ImGuizmo features.
// GizmoWidget implements ImGuizmo features.
// It is designed just like PlotWidget.
// This structure provides an "area" where you can put Gizmos (see (*GizmoWidget).Gizmos).
// If you wnat to have more understanding about what is going on here, read this:

Check failure on line 23 in Gizmo.go

View workflow job for this annotation

GitHub Actions / Lint

`wnat` is a misspelling of `want` (misspell)
// https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ (DISCLAIMER: giu authors are not responsible if you get mad or something!)
// TODO: grid thickness
// https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ (DISCLAIMER: giu authors are not responsible if you go mad or something!)
// TODO: Manipulate mode and operation
// TODO: ViewManipulate
// TODO: ProjectionMatrix edition (see https://github.com/jbowtie/glm-go)
Expand Down Expand Up @@ -86,6 +85,12 @@ func Grid() *GridGizmo {
}
}

// Thickness sets a thickness of grid lines.
func (g *GridGizmo) Thickness(t float32) *GridGizmo {
g.thickness = t
return g
}

// Gizmo implements GizmoI interface.
func (g *GridGizmo) Gizmo(view, projection *HumanReadableMatrix) {
imguizmo.DrawGrid(
Expand Down

0 comments on commit 3c8da73

Please sign in to comment.