Class Layer3DOSGBFile
- java.lang.Object
-
- com.supermap.realspace.Layer3D
-
- com.supermap.realspace.Layer3DOSGBFile
-
public class Layer3DOSGBFile extends Layer3D
The 3D oblique photogrammetric cache (OSGB) layer class, inherited from the Layer3D class.OSGB cache is a data storage format that has the advantages of larger data visibility, high loading efficiency, smooth level switching, and lower memory and CPU usage. Oblique photogrammetric model, BIM, pipeline, precision model data, vector buffer data can all be stored in this format.
-
-
Field Summary
Fields Modifier and Type Field and Description double
maxDataValue
Get the maximum height of the layer.double
minDataValue
Get the minimum height of the layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
addFlattenRegion(Geometry geometry, java.lang.String tag)
Add a flattening area to flatten the current osgb model.void
clearFlattenRegion()
Clear all flattened area objects and restore the initial state of the OSGB model.void
clearObjectsColor()
Clear the color of all objects.java.lang.Object[]
getAllFieldValueOfLastSelectedObject()
Get all the attribute field information selected last time.java.util.ArrayList<java.lang.String>
getDatasetInfos(java.util.ArrayList<java.lang.Integer> startid, java.util.ArrayList<java.lang.Integer> endid)
Get multiple data source attribute information interfaceFieldInfos
getFieldInfos()
Return the attribute table information.java.lang.Object
getFieldValueOfSelectedObject(int index)
Return the value of the specified ID field in the attribute data sheet of the selected object.Geometry
getFlattenRegion(int index)
Return the flattened area object of the specified index.int
getFlattenRegionCount()
Returns the number of objects in the flattened area of the current scene.java.lang.String
getFlattenRegionTag(int index)
Returns the label of the flattened area object at the specified index.HypsometricSetting
getHypsometricSetting()
Get the layered and colored object.double
getLODRangeScale()
Returns the distance zoom factor for switching the LOD level.void
getObjectsColor(int[] ids, Color[] colors)
Get the color of the specified OSGB model ID queue.int
getObjectsColorCount()
Returns the number of objects whose color is set.GeoStyle3D
getStyle()
Returns the style of OSGB cache layer.int
indexOfFlattenRegion(java.lang.String tag)
Obtain the index number of the flattened area through the label.void
removeAllObjsOffset()
Clear all object offsetsboolean
removeFlattenRegion(int index)
Remove the flattened area of the specified index.void
removeObjectsColor(int[] ids)
Remove the color of the specified ID queue model.void
setDistanceVisible(double distance)
AR sets the visible distanceboolean
setFlattenRegionTag(int index, java.lang.String tag)
Set the label of the flattened area object of the specified index.void
setHypsometricSetting(HypsometricSetting HypsometricSetting)
Set the layered and colored objects.void
setLODRangeScale(double value)
Set the zoom factor of LOD level switching distance.void
setObjectsColor(int[] ids, Color value)
Set the model color of the specified OSGB model ID queue.void
setObjectsVisible(int[] ids, boolean value)
Set whether the model of the specified OSGB model ID queue is visible, and has a mutually exclusive and visible relationship with the model.void
setOnlyObjectsVisible(int[] ids, boolean value)
Set whether the model of the specified OSGB model ID queue is visible (manual setting).void
setSelectedTranslate(double translateX, double translateY, double translateZ)
Set the offset position of the selected objectvoid
setStyle(GeoStyle3D geoStyle3D)
Set the style of OSGB cache layer.-
Methods inherited from class com.supermap.realspace.Layer3D
clearCustomClipPlane, clipByBox, getBounds, getCaption, getDataName, getFeatures, getName, getSelection, getSwipeRegion, getType, getVisibleInViewport, isReleaseWhenInvisible, isSelectable, isSwipeEnable, isVisible, setClipLineColor, setCustomClipCross, setCustomClipPlane, setMaxObjectVisibleDistance, setReleaseWhenInvisible, setSelectable, setSwipeEnable, setSwipeRegion, setVisible, setVisibleInViewport
-
-
-
-
Field Detail
-
maxDataValue
public double maxDataValue
Get the maximum height of the layer.
-
minDataValue
public double minDataValue
Get the minimum height of the layer.
-
-
Method Detail
-
getLODRangeScale
public double getLODRangeScale()
Returns the distance zoom factor for switching the LOD level.OSGB cache controls the display of a certain level of LOD level within a certain distance range by setting the LOD switching distance. Assuming that the LOD switching distance is 200 meters, the model within 200 meters from the camera will display LOD level 0 (the finest level); the model with 200-400 meters will display the first level (sub-fine level), and so on.
The LOD switching distance value cannot be changed directly after the OSGB cache is generated, but the LOD switching distance can be changed by changing the LOD level switching distance scaling factor, namely:
New LOD switching distance = original LOD switching distance * LOD switching distance zoom factor
- Returns:
- The distance zoom factor for LOD level switching.
-
setLODRangeScale
public void setLODRangeScale(double value)
Set the zoom factor of LOD level switching distance.OSGB cache controls the display of a certain level of LOD level within a certain distance range by setting the LOD switching distance. Assuming that the LOD switching distance is 200 meters, the model within 200 meters from the camera will display LOD level 0 (the finest level); the model with 200-400 meters will display the first level (sub-fine level), and so on.
The LOD switching distance value cannot be changed directly after the OSGB cache is generated, but the LOD switching distance can be changed by changing the LOD level switching distance scaling factor, namely:
New LOD switching distance = original LOD switching distance * LOD switching distance zoom factor
- Parameters:
value
- The distance scaling factor for switching LOD levels.
-
getStyle
public GeoStyle3D getStyle()
Returns the style of OSGB cache layer.- Returns:
- Layer style.
-
setStyle
public void setStyle(GeoStyle3D geoStyle3D)
Set the style of OSGB cache layer.- Parameters:
geoStyle3D
- specifies the layer style.
-
setOnlyObjectsVisible
public void setOnlyObjectsVisible(int[] ids, boolean value)
Set whether the model of the specified OSGB model ID queue is visible (manual setting).- Parameters:
ids
- specifies the model ID queue.value
- visibility.
-
setObjectsVisible
public void setObjectsVisible(int[] ids, boolean value)
Set whether the model of the specified OSGB model ID queue is visible, and has a mutually exclusive and visible relationship with the model.- Parameters:
ids
- specifies the model ID queue.value
- visibility.
-
setObjectsColor
public void setObjectsColor(int[] ids, Color value)
Set the model color of the specified OSGB model ID queue.- Parameters:
ids
- specifies the model ID queue. The color specified by @param value.
-
getObjectsColor
public void getObjectsColor(int[] ids, Color[] colors)
Get the color of the specified OSGB model ID queue.- Parameters:
ids
- specifies the model ID queue.colors
- color array.
-
getObjectsColorCount
public int getObjectsColorCount()
Returns the number of objects whose color is set.- Returns:
- Set the number of color objects.
-
removeObjectsColor
public void removeObjectsColor(int[] ids)
Remove the color of the specified ID queue model.- Parameters:
ids
- The ID queue of the color to be removed.
-
clearObjectsColor
public void clearObjectsColor()
Clear the color of all objects.
-
getFlattenRegionCount
public int getFlattenRegionCount()
Returns the number of objects in the flattened area of the current scene.- Returns:
- The number of objects in the flattened area.
-
addFlattenRegion
public int addFlattenRegion(Geometry geometry, java.lang.String tag)
Add a flattening area to flatten the current osgb model.- Parameters:
geometry
- The flattening area to be added.tag
- The label of the flattened area to be added.- Returns:
- The index number of the current flattening area.
-
clearFlattenRegion
public void clearFlattenRegion()
Clear all flattened area objects and restore the initial state of the OSGB model.
-
getFlattenRegion
public Geometry getFlattenRegion(int index)
Return the flattened area object of the specified index. The index number specified by @param index.- Returns:
- Flatten the area object.
-
getFlattenRegionTag
public java.lang.String getFlattenRegionTag(int index)
Returns the label of the flattened area object at the specified index. The index specified by @param index.- Returns:
- Flatten the area object label.
-
indexOfFlattenRegion
public int indexOfFlattenRegion(java.lang.String tag)
Obtain the index number of the flattened area through the label.- Parameters:
tag
- The specified tag.- Returns:
- The index number of the flattened area.
-
removeFlattenRegion
public boolean removeFlattenRegion(int index)
Remove the flattened area of the specified index.- Parameters:
index
- The index of the flattened object to be removed.- Returns:
- Whether the removal was successful.
-
setFlattenRegionTag
public boolean setFlattenRegionTag(int index, java.lang.String tag)
Set the label of the flattened area object of the specified index.- Parameters:
index
- The index value of the geometric object whose label is to be set.tag
- The specified tag.- Returns:
- Whether the setting is successful.
-
getFieldInfos
public FieldInfos getFieldInfos()
Return the attribute table information.- Overrides:
getFieldInfos
in classLayer3D
- Returns:
- field information collection.
-
getFieldValueOfSelectedObject
public java.lang.Object getFieldValueOfSelectedObject(int index)
Return the value of the specified ID field in the attribute data sheet of the selected object. The ID of the field specified by @param index.- Returns:
- attribute value.
-
setHypsometricSetting
public void setHypsometricSetting(HypsometricSetting HypsometricSetting)
Set the layered and colored objects.- Parameters:
HypsometricSetting
- specifies the hierarchical coloring object.
-
getHypsometricSetting
public HypsometricSetting getHypsometricSetting()
Get the layered and colored object.- Returns:
- Layered and colored objects.
-
getAllFieldValueOfLastSelectedObject
public java.lang.Object[] getAllFieldValueOfLastSelectedObject()
Get all the attribute field information selected last time.- Returns:
- attribute field information.
-
getDatasetInfos
public java.util.ArrayList<java.lang.String> getDatasetInfos(java.util.ArrayList<java.lang.Integer> startid, java.util.ArrayList<java.lang.Integer> endid)
Get multiple data source attribute information interface- Parameters:
startid
- The starting ID of the current data setendid
- The end ID of the current data set- Returns:
- The name of the current data set
-
setSelectedTranslate
public void setSelectedTranslate(double translateX, double translateY, double translateZ)
Set the offset position of the selected object- Parameters:
translateX
-translateY
-translateZ
-
-
removeAllObjsOffset
public void removeAllObjsOffset()
Clear all object offsets
-
setDistanceVisible
public void setDistanceVisible(double distance)
AR sets the visible distance- Parameters:
distance
-
-
-