Class SoEllipseScreenDrawer
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.nodes.SoNode
com.openinventor.inventor.drawers.SoScreenDrawer
com.openinventor.inventor.drawers.SoPolyLineScreenDrawer
com.openinventor.inventor.drawers.SoEllipseScreenDrawer
- All Implemented Interfaces:
SafeDisposable
Interactively draw an ellipse in normalized screen space.
This class can be used to interactively draw an ellipse on screen.
When the ellipse is finished, an event is raised to notify the application (see SoPolyLineScreenDrawer.onFinish
). Points are returned as normalized coordinates in the range -1..1, which is conveniently the default view volume for an SoOrthographicCamera
node.
The line color is specified by the color
field in the parent class SoPolyLineScreenDrawer
.
Please see SoPolyLineScreenDrawer
for general notes and code example.
Ellipse specific notes:
- The ellipse can be specified by the 2 corners of its bounding box (default) or by its center and one corner of its bounding box (see
CreationMethod
). - The
simplificationThreshold
field does not apply to this node. The number of points in the ellipse is specified using thenbPoint
field. - The
isClosed
field does apply to this node (but false is not very useful). - If user finishes an ellipse, then the next click will automatically clear the polyline (begin a new ellipse).
- SbEventHandlers:
- OnStart : Triggered on LeftMouseDown input event.
- OnMove : Triggered on MouseMove input events (after Start).
- OnFinish : Triggered on LeftMouseUp input event.
- Press and drag left mouse to draw the ellipse.
- Release to finish the ellipse.
- Press Escape to cancel construction of the ellipse.
File format/default:
EllipseScreenDrawer {
point | [] |
color | 1 0 0 |
simplificationThreshold | 0 |
isClosed | true |
method | CORNER_CORNER |
nbPoint | 16 |
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Methods to create ellipse.Nested classes/interfaces inherited from class com.openinventor.inventor.drawers.SoPolyLineScreenDrawer
SoPolyLineScreenDrawer.EventArg
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionMethod to create ellipse.final SoSFUInt32
Number of points in generated ellipse.Fields inherited from class com.openinventor.inventor.drawers.SoPolyLineScreenDrawer
color, doCCW, isClosed, linePattern, linePatternScaleFactor, lineWidth, onFinish, onMove, onStart, point, simplificationThreshold
Fields inherited from class com.openinventor.inventor.drawers.SoScreenDrawer
sceneGraph
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.drawers.SoPolyLineScreenDrawer
clear
Methods inherited from class com.openinventor.inventor.drawers.SoScreenDrawer
reset
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
method
Method to create ellipse. . Default is CORNER_CORNER. -
nbPoint
Number of points in generated ellipse. Default is 16. Must be > 0.
-
-
Constructor Details
-
SoEllipseScreenDrawer
public SoEllipseScreenDrawer()Constructor.
-