-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added roughly mirrored algorithm for automesh #121
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
af492c4
Added 'To 2D' options to 1D parameter.
seagetch 8e50d98
parameter: minor fix to avoid potential crash.
seagetch d344152
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch dc4a919
parameters: conversion from 1D parameters to 2D handled value mapping…
seagetch 9e526c6
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch 500d3be
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch 7e07985
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch 9401cd9
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch f21c45d
Automesh implementation. (still WIP)
seagetch d5eebbb
Added implementation of automesh (WIP)
seagetch da789b9
Fix dub.sdl file to use public dependency.
seagetch d355eff
Updated dub.sdl to use libmir/dcv.
seagetch 2647b7e
Merge branch 'main' of https://github.com/Inochi2D/inochi-creator int…
seagetch 7014ae9
Added "roughly mirrored" algorithm for automesh.
seagetch 6c95340
automesh: Added configuration options.
seagetch 466436b
automesh: adjustSpeed for configuration options.
seagetch 19fda5d
Added presets, and updated configuration options.
seagetch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ import bindbc.opengl; | |
|
||
private { | ||
IncMeshEditor editor; | ||
AutoMeshProcessor[] autoMeshProcessors = [ | ||
new ContourAutoMeshProcessor() | ||
]; | ||
AutoMeshProcessor activeProcessor = null; | ||
} | ||
|
||
void incViewportVertexInspector(Drawable node) { | ||
|
@@ -97,10 +101,27 @@ void incViewportVertexOptions() { | |
|
||
igBeginGroup(); | ||
if (igButton("")) { | ||
auto processor = new ContourAutoMeshProcessor; | ||
editor.mesh = processor.autoMesh(editor.getTarget(), editor.getMesh(), editor.mirrorHoriz, 0, editor.mirrorVert, 0); | ||
if (!activeProcessor) | ||
activeProcessor = autoMeshProcessors[0]; | ||
editor.mesh = activeProcessor.autoMesh(editor.getTarget(), editor.getMesh(), editor.mirrorHoriz, 0, editor.mirrorVert, 0); | ||
editor.refreshMesh(); | ||
} | ||
if (incBeginDropdownMenu("AUTOMESH_SETTINGS")) { | ||
if (!activeProcessor) | ||
activeProcessor = autoMeshProcessors[0]; | ||
activeProcessor.configure(); | ||
|
||
// Button which bakes some auto generated content | ||
// In this case, a mesh is baked from the triangulation. | ||
if (igButton(__("Bake"),ImVec2(incAvailableSpace().x, 0))) { | ||
editor.mesh = activeProcessor.autoMesh(editor.getTarget(), editor.getMesh(), editor.mirrorHoriz, 0, editor.mirrorVert, 0); | ||
editor.refreshMesh(); | ||
} | ||
incTooltip(_("Bakes the auto mesh.")); | ||
|
||
incEndDropdownMenu(); | ||
} | ||
incTooltip(_("Triangulation Options")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tooltip should probably be removed, and be called "Auto Meshing Options" |
||
incTooltip(_("Auto Meshing (Experimental)")); | ||
igEndGroup(); | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "Distance between vertices"