Class: ModraUp::InputPoint
- Inherits:
-
Object
- Object
- ModraUp::InputPoint
Overview
Infers the pick point. Writes the position and snap type to ModraUp::View#inputpoint or InputPoint#pick. Returns the entity (including nested instances) associated with the pick position for #vertex / #edge / #face.
Class Method Summary # collapse
-
.new ⇒ ModraUp::InputPoint
Initialize an empty input point, or attach the endpoint to a model point.
Instance Method Summary # collapse
-
#==(other) ⇒ Boolean
Compare the positions of two input points, infer their types, and determine their geometric sources.
-
#transformation ⇒ Geom::Transformation
Transformation from local coordinates of picked entities to model coordinates; returns an identity transformation for the root level.
-
#instance_path ⇒ ModraUp::InstancePath, nil
Returns an independent copy of the current pick instance path; returns nil if there is no associated entity.
-
#pick(view, x, y) ⇒ Boolean
Infers a pick from screen coordinates; returns true only if a valid and changed entity is picked.
-
#position ⇒ Geom::Point3d
Model space position.
-
#valid? ⇒ Boolean
Returns whether the pick found a snap point.
-
#display? ⇒ Boolean
Should the inference mark be displayed.
-
#degrees_of_freedom ⇒ Integer
Remaining degrees of freedom: endpoint 0, line 1, face 2, not picked 3.
-
#tooltip ⇒ String
Adhesion types in English tooltips (Endpoint / On Face, etc.).
-
#depth ⇒ Integer
Provides the depth of the instance nested within the entity that contains the picked location.
-
#vertex ⇒ ModraUp::Vertex, nil
Pick the associated vertex.
-
#edge ⇒ ModraUp::Edge, nil
Pick the associated edge.
-
#face ⇒ ModraUp::Face, nil
Pick the associated face.
-
#clear ⇒ ModraUp::InputPoint
Clears the pick results.
-
#copy!(other) ⇒ ModraUp::InputPoint
Duplicates another input point.
-
#draw(view) ⇒ ModraUp::View
Draw a crosshair in ModraUp::Tool#draw.
Class Method Details
InputPoint.new ⇒ inputpointInputPoint.new(point_or_vertex) ⇒ inputpoint
Initialize an empty input point, or attach the endpoint to a model point.
Instance Method Details
#==(other) ⇒ Boolean
Compare the positions of two input points, infer their types, and determine their geometric sources.
#transformation ⇒ Geom::Transformation
Transformation from local coordinates of picked entities to model coordinates; returns an identity transformation for the root level.
#instance_path ⇒ ModraUp::InstancePath, nil
Returns an independent copy of the current pick instance path; returns nil if there is no associated entity.
inputpoint.pick(view, x, y) ⇒ Booleaninputpoint.pick(view, x, y, other) ⇒ Boolean
Infers a pick from screen coordinates; returns true only if a valid and changed entity is picked.
inputpoint.position ⇒ Geom::Point3d
Model space position.
inputpoint.valid? ⇒ Boolean
Returns whether the pick found a snap point.
inputpoint.display? ⇒ Boolean
Should the inference mark be displayed.
inputpoint.degrees_of_freedom ⇒ Integer
Remaining degrees of freedom: endpoint 0, line 1, face 2, not picked 3.
inputpoint.tooltip ⇒ String
Adhesion types in English tooltips (Endpoint / On Face, etc.).
inputpoint.depth ⇒ Integer
Provides the depth of the instance nested within the entity that contains the picked location.
inputpoint.vertex ⇒ ModraUp::Vertex, nil
Pick the associated vertex.
inputpoint.edge ⇒ ModraUp::Edge, nil
Pick the associated edge.
inputpoint.face ⇒ ModraUp::Face, nil
Pick the associated face.
inputpoint.clear ⇒ inputpoint
Clears the pick results.
inputpoint.copy!(other) ⇒ inputpoint
Duplicates another input point.
inputpoint.draw(view) ⇒ view
Draw a crosshair in ModraUp::Tool#draw.