mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Implementation of vertical crop (2 axis projection manipulation in frame
buffer). Cleanup of UI for appearance view.
This commit is contained in:
@@ -170,6 +170,23 @@ void PickingVisitor::visit(Handles &n)
|
||||
}
|
||||
|
||||
|
||||
void PickingVisitor::visit(Symbol& n)
|
||||
{
|
||||
// discard if not visible or if not exactly one point given for picking
|
||||
if ((!n.visible_ && !force_) || points_.size() != 1)
|
||||
return;
|
||||
|
||||
// apply inverse transform to the point of interest
|
||||
glm::vec4 P = glm::inverse(modelview_) * glm::vec4( points_[0], 1.f );
|
||||
|
||||
// test bounding box for picking from a single point
|
||||
if ( n.bbox().contains( glm::vec3(P)) ) {
|
||||
// add this to the nodes picked
|
||||
nodes_.push_back( std::pair(&n, glm::vec2(P)) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PickingVisitor::visit(Scene &n)
|
||||
{
|
||||
n.root()->accept(*this);
|
||||
|
||||
Reference in New Issue
Block a user