com.supermap.realspace
Class Selection3D
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.realspace.Selection3D
-
public class Selection3D extends InternalHandleDisposable
The Selection3D class.
-
-
Constructor Summary
Constructors Constructor and Description Selection3D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
add(int id)
Add objects to the selection.int
addRange(int[] ids)
Batch add objects to the selectionvoid
clear()
Clears all the objects in the Selection3D object and the objects will be unselected.void
dispose()
Disposes resources.int
get(int index)
Returns the system ID of the specified geometric object in the Selection.int
getCount()
Gets the count of the objects in the Selection3D object.GeoStyle3D
getStyle()
Returns the style of the objects in the Selection3D object.boolean
remove(int id)
Removes a specified object from the Selection and makes it unselected.int
removeRange(int index, int count)
Removes multiple objects with the start index and the count.void
setStyle(GeoStyle3D geoStyle3D)
Sets the style of the objects in the Selection3D object.Feature3D
toFeature3D()
Convert the selected objects in the 3D layer to 3D feature objects.void
updataData()
Refresh the 3D selection set.
-
-
-
Method Detail
-
getCount
public int getCount()
Gets the count of the objects in the Selection3D object.- Returns:
- int Returns the count of the objects in the Selection3D object.
-
get
public int get(int index)
Returns the system ID of the specified geometric object in the Selection.- Parameters:
index
- int- Returns:
- int The system ID of the specified geometric object in the Selection.
-
clear
public void clear()
Clears all the objects in the Selection3D object and the objects will be unselected.
-
dispose
public void dispose()
Disposes resources.
-
toFeature3D
public Feature3D toFeature3D()
Convert the selected objects in the 3D layer to 3D feature objects.- Returns:
- Feature3D the 3D feature object.
-
remove
public boolean remove(int id)
Removes a specified object from the Selection and makes it unselected.- Parameters:
id
- SMID of the object to be added.- Returns:
- True, if successful; Otherwise false.
-
addRange
public int addRange(int[] ids)
Batch add objects to the selection- Parameters:
ids
- SMID array of the object to be added.- Returns:
- Returns the number of newly added geometric objects.
-
add
public int add(int id)
Add objects to the selection.- Parameters:
id
- SMID of the object to be added.- Returns:
- The index of the newly added object in the selection.
-
removeRange
public int removeRange(int index, int count)
Removes multiple objects with the start index and the count. The objects will be unselected.- Parameters:
index
- The index of the objects to be deleted.count
- The count of the objects to be deleted.- Returns:
- int Returns the number of successfully deleted geometric objects.
-
getStyle
public GeoStyle3D getStyle()
Returns the style of the objects in the Selection3D object.- Returns:
- The style of the objects in the Selection3D object.
- Default:
- The default value is
GeoStyle3D
(FillForeColor = java.awt.Color[r=255,g=0,b=0],LineColor = java.awt.Color[r=255,g=0,b=0],LineWidth = 1.5,MarkerIconFile = ,MarkerIconScale = 1.0,MarkerColor = java.awt.Color[r=255,g=0,b=0],MarkerSize = 5.0,Fill3DMode = LINE_AND_FILL,BottomAltitude = 0.0,ExtendedHeight = 0.0,TilingU = 1.0,TilingV = 1.0,TopTextureFile = ,AltitudeMode = CLAMP_TO_GROUND})
-
setStyle
public void setStyle(GeoStyle3D geoStyle3D)
Sets the style of the objects in the Selection3D object.This method is GeoStyle3D object. For the style of the objects in the Selection3D object, only the following methods are valid, other methods of the GeoStyle3D object are invalid here:
(1)For the dataset:
- Point: get/setMarkerSize, get/setMarkerColor;
- Line: get/setLineColor, get/setLineWidth;
- Region: FillForeColor (get/setFillForeColor);
- Text: Color (get/setMarkerColor), Transparency (Color.getAlpha);
- (2)For the KML or KMZ:
- Text: Color (get/setMarkerSize), Transparency (Color.getAlpha);
- Picture: Color (get/setMarkerColor);
- Line: get/setLineColor, get/setLineWidth;
- Region: Fill Color (get/setFillForeColor);
- Model: FillForeColor (get/setFillForeColor);
- 3D image: None.
-
-
- Parameters:
geoStyle3D
- The style of the objects in the geoStyle3D object.
-
updataData
public void updataData()
Refresh the 3D selection set.