mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
New context menu in Geometry and Appearance Views: special handle (upper
left corner) with new icon and view-specific context menu on current source.
This commit is contained in:
@@ -156,6 +156,12 @@ void PickingVisitor::visit(Handles &n)
|
||||
float l = glm::length( glm::vec2(vec) );
|
||||
picked = glm::length( glm::vec2( 1.f + l, -1.f - l) - glm::vec2(P) ) < 1.5f * scale;
|
||||
}
|
||||
else if ( n.type() == Handles::MENU ){
|
||||
// the icon for restore is on the left top corner at (-0.12, 0.12) in scene coordinates
|
||||
glm::vec4 vec = glm::inverse(modelview_) * glm::vec4( 0.1f, 0.1f, 0.f, 0.f );
|
||||
float l = glm::length( glm::vec2(vec) );
|
||||
picked = glm::length( glm::vec2( -1.f - l, 1.f + l) - glm::vec2(P) ) < 1.5f * scale;
|
||||
}
|
||||
|
||||
if ( picked )
|
||||
// add this to the nodes picked
|
||||
|
||||
Reference in New Issue
Block a user