Class TLsp3DArcBandEditor
java.lang.Object
com.luciad.view.lightspeed.editor.ALspEditor
com.luciad.view.lightspeed.editor.TLsp3DArcBandEditor
- All Implemented Interfaces:
ILspEditor
Enables visual editing of
ILcd3DEditableArcBand
objects in an
ILspView
.
Handles
The 3D arc band editor defines the following edit handles for a 3D arc band object:- Handle located at (max radius, start angle, pitch start angle):
This handle generates
MOVE
operations, with aHANDLE_IDENTIFIER
user property withSTART_ANGLE_LOW_PITCH_CORNER
as value. - Handle located at (max radius, start angle, pitch end angle):
This handle generates
MOVE
operations, with aHANDLE_IDENTIFIER
user property withSTART_ANGLE_HIGH_PITCH_CORNER
as value. - Handle located at (max radius, end angle, pitch start angle):
This handle generates
MOVE
operations, with aHANDLE_IDENTIFIER
user property withEND_ANGLE_LOW_PITCH_CORNER
as value. - Handle located at (max radius, end angle, pitch end angle):
This handle generates
MOVE
operations, with aHANDLE_IDENTIFIER
user property withEND_ANGLE_HIGH_PITCH_CORNER
as value. - Height handle: allows the user to edit the height of the 3D arc band.
This handle generates
MOVE
operations, with aHANDLE_IDENTIFIER
user property withHEIGHT
as value. - Arc band handles: The previously listed handles only allow editing of the pitch angles. Therefore, this editor, by default, also employs the handles used by
TLspArcBandEditor
. These allow the user to edit the 2D position, the min and max radius and the start and arc angle. For details, see its javadoc.
TLspArcBandEditor
,
as previously mentioned.
Note that the center of the 3D arc band is not a handle.Editing
Based on theTLspEditOperation
, generated by an edit handle (see description
of handles above), this editor performs different edit operations on the associated 3d arc band object.
The image below illustrates this. The
gray color represents the previous state of the object and the red color represents the edited object.
The editor adjusts the corresponding point of the 3d arc band. The figure below illustrates this behavior
for the point located at (max radius, start angle, pitch end angle).
The movement is depicted by the black arrow.Creation
The initialization process of a 3D arc band consists of four distinct steps:- The first step sets the center
- The second step initializes the minimum radius and the start angle
- The third step initializes the maximum radius and the arc angle
- The fourth step initializes the height
Setting the center point | Initializing minimum radius and start angle | Initializing maximum radius and arc angle | Initializing the height |
- Since:
- 2016.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Identifies a handle used by the enclosing editor implementation.static enum
Defines keys used by the enclosing editor implementation to store properties in its edit handles. -
Constructor Summary
ConstructorDescriptionCreates a newTLspArcBandEditor
.TLsp3DArcBandEditor
(TLspArcBandEditor aCustomArcBandEditorDelegate) Creates a newTLspArcBandEditor
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canEdit
(TLspEditContext aContext) protected ALspEditHandle
createHeightTranslationHandle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to alter the height above the terrain of the given shape by dragging it up/down.protected ALspEditHandle
createHighPitchHandleAtEndAngle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, end angle, pitch end angle).protected ALspEditHandle
createHighPitchHandleAtStartAngle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, start angle, pitch end angle).protected ALspEditHandle
createLowPitchHandleAtEndAngle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, end angle, pitch start angle).protected ALspEditHandle
createLowPitchHandleAtStartAngle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, start angle, pitch start angle).protected ALspEditHandle
createObjectTranslationHandle
(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.protected List
<ALspEditHandle> createProjectedArcBandHandles
(TLspEditContext aContext) Creates edit handles that allows the user to edit the 3D arc band by using the edit handles of a 2D arc band.editImpl
(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext) Called by theedit
method to edit the given object based on the givenedit operation
.getCreateHandle
(TLspEditContext aContext) Returns a handle that is used to create the given object.getEditHandles
(TLspEditContext aContext) Returns a set of handles for editing the given object.Methods inherited from class com.luciad.view.lightspeed.editor.ALspEditor
canCopyGeometry, canPerformOperation, copyGeometrySFCT, edit, fireUndoableHappened
-
Constructor Details
-
TLsp3DArcBandEditor
public TLsp3DArcBandEditor()Creates a newTLspArcBandEditor
. This constructor initializes a defaultTLspArcBandEditor
to be used as a delegate when editing arc angles. -
TLsp3DArcBandEditor
Creates a newTLspArcBandEditor
. This constructor uses the givenTLspArcBandEditor
as a delegate when editing arc angles.- Parameters:
aCustomArcBandEditorDelegate
- the delegate arc band editor to be used for editing arc angles.
-
-
Method Details
-
canEdit
- Specified by:
canEdit
in interfaceILspEditor
- Overrides:
canEdit
in classALspEditor
- Parameters:
aContext
- provides context information to the editor- Returns:
true
if the above conditions are met,false
otherwise.
-
getEditHandles
Returns a set of handles for editing the given object. These handles will be able to generate edit operations, that are passed to theedit
method. As a way to communicate with this method, handles will copy their properties to the edit operation properties. By default this method delegates to the following methods: It returns a list containing the handles returned by those methods. These methods are added for convenience, so they can easily be overridden.- Parameters:
aContext
- provides context information such as the layer for which the object is being edited- Returns:
- the edit handles to edit the given object, or an empty list if it should not be possible to edit the given object.
- See Also:
-
createProjectedArcBandHandles
Creates edit handles that allows the user to edit the 3D arc band by using the edit handles of a 2D arc band. By default this means handles for the manipulation of the arc angle, min and max radius handles and a center handle to translate the entire object. The object on the context is a 2D arc band used to process the result of an edit.- Parameters:
aContext
- the current context with a 2D arc band as the given shape.- Returns:
- a list of edit handles
-
createObjectTranslationHandle
protected ALspEditHandle createObjectTranslationHandle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to translate the given shape.By default, in a 3D view, this handle is visualized as a 2D arc band. The returned handle is a
TLspProjectedObjectTranslationHandle
.By default, in a 2D view, the handle becomes a regular object translation handle. The returned handle is a
TLspObjectTranslationHandle
.- Parameters:
aArcBand
- the shape for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
if no handle is needed
-
createHeightTranslationHandle
protected ALspEditHandle createHeightTranslationHandle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to alter the height above the terrain of the given shape by dragging it up/down.By default this method returns a
TLspObjectHeightTranslationHandle
with aHANDLE_IDENTIFIER
property withHEIGHT
as value.Note that by default this method only returns a height translation handle when the current view is a 3D view and the model reference is not view-space based. If this is not the case, this method returns
null
because then the height translation handle is not useful.- Parameters:
aArcBand
- the arc band for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
if no handle is needed
-
createLowPitchHandleAtStartAngle
protected ALspEditHandle createLowPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, start angle, pitch start angle). By default this method returns aTLspPointTranslationHandle
with aHANDLE_IDENTIFIER
user property withSTART_ANGLE_LOW_PITCH_CORNER
as value.- Parameters:
aArcBand
- the arc for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
when no handle is needed
-
createHighPitchHandleAtStartAngle
protected ALspEditHandle createHighPitchHandleAtStartAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, start angle, pitch end angle). By default this method returns aTLspPointTranslationHandle
with aHANDLE_IDENTIFIER
user property withSTART_ANGLE_HIGH_PITCH_CORNER
as value.- Parameters:
aArcBand
- the arc for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
when no handle is needed
-
createLowPitchHandleAtEndAngle
protected ALspEditHandle createLowPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, end angle, pitch start angle). By default this method returns aTLspPointTranslationHandle
with aHANDLE_IDENTIFIER
user property withEND_ANGLE_LOW_PITCH_CORNER
as value.- Parameters:
aArcBand
- the arc for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
when no handle is needed
-
createHighPitchHandleAtEndAngle
protected ALspEditHandle createHighPitchHandleAtEndAngle(ILcd3DEditableArcBand aArcBand, TLspEditContext aContext) Creates an edit handle that allows the user to edit the pitch angles of the 3D arc band by translating the corner point located at (max radius, end angle, pitch end angle). By default this method returns aTLspPointTranslationHandle
with aHANDLE_IDENTIFIER
user property withEND_ANGLE_HIGH_PITCH_CORNER
as value.- Parameters:
aArcBand
- the arc for which the handle is createdaContext
- the current context- Returns:
- an edit handle or
null
when no handle is needed
-
getCreateHandle
Returns a handle that is used to create the given object. The returned handle is used by the controller to initialize the other of the object. Typically the returned handle is an instance ofALspCreateHandle
which is a specialized handle implementation used for creating an object. By default, this method returns anALspCreateHandle
capable of creating anILcd3DEditableArcBand
, as described in the class javadoc.- Parameters:
aContext
- provides context information such as the layer for which the object is being created- Returns:
- an edit handle, or
null
if creation should not be allowed. - See Also:
-
editImpl
public TLspEditOperationResult editImpl(TLspEditOperation aOperation, ELspInteractionStatus aInteractionStatus, TLspEditContext aContext) Called by theedit
method to edit the given object based on the givenedit operation
. Note that this method does not need to lock the model of the object, this already happens in theedit
method. Because this editor employs aTLspArcBandEditor
and associated handles, this method delegates to said editor when necessary.- Specified by:
editImpl
in classALspEditor
- Parameters:
aOperation
- the event that contains the information on how to edit the objectaInteractionStatus
- the interaction statusaContext
- the edit context- Returns:
- The result of the operation: Whether or not there was success, and whether or not the current handles of the object should be invalidated.
-