com.supermap.realspace

Class Feature3Ds

  • java.lang.Object
    • com.supermap.realspace.Feature3Ds


  • public class Feature3Ds
    extends java.lang.Object
    The Feature3Ds class.

    The feature3D class is special, it is not simply a set of the feature3D objects, but a tree structure, which means that the feature3D set object can also contain sub objects which also are the objects of the feature3D set class. So a feature3D set object can contain zero or several sub-objects and feature3D object. The figure below is a simple example, which could help you further understand the tree feature3D set. The Feature3Ds Object in the figure is a feature3D set object, Feature3D Object is a feature3D object, every 3D feature set object can contain zero or several feature set objects or feature3D objects, or nothing, indicating an empty set.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Feature3Ds()
      Constructs a new Feature3Ds instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Feature3D add(Feature3D feature)
      Adds the specified Feature3D object to this Feature3Ds object.
      Feature3Ds add(Feature3Ds features)
      Adds the specified Feature3Ds object to this Feature3Ds object.
      Feature3D add(Geometry3D geometry)
      Adds the given Geometry3D object to the Feature3Ds object as a new Feature3D object and returns the Feature3D object if successful.
      void clear()
      Clears all the subobjects of the Feature3Ds class and all the Feature3D objects in the Feature3Ds object.
      void dispose()
      Release the resource occupy by this object.When this method is called, the object is no longer available.
      void exchange(int index1, int index2)
      Exchanges the two objects with the specified index.
      Feature3D findFeature(int id, Feature3DSearchOption option)
      Findsand return the Feature3D object according to the given ID and the specified query option.
      Feature3D[] findFeature(java.lang.String name, Feature3DSearchOption option)
      Finds all the Feature3D objects with the specified name and returns the array of Feature3D objects satisfying the condition.
      Feature3Ds[] findFeatures(java.lang.String name, Feature3DSearchOption option)
      Finds all the Feature3Ds objects with the specified name and returns the array of Feature3Ds objects satisfying the condition.
      boolean fromKML(java.lang.String kml)
      Imports the collection of the Feature3D object from a KML string.
      boolean fromKMLFile(java.lang.String kmlFile)
      Imports the Feature3Ds object from the KML file.
      java.lang.Object get(int index)
      Gets the object with the specified index.
      Camera getCamera()
      Gets the camera object.
      int getCount()
      Gets the count of the objects in the Feature3Ds object.
      java.lang.String getDescription()
      Gets the description of the collection of the feature3D object.
      Feature3D[] getFeatureArray(Feature3DSearchOption option)
      Returns the array of the Feature3D objects in this Feature3Ds object.
      Feature3Ds[] getFeaturesArray(Feature3DSearchOption option)
      Returns an array of child objects in the Feature3D collection object, and the child object is also a Feature3D collection object.
      java.lang.String getName()
      Gets the name of the collection of the feature3D object.
      Feature3Ds getParent()
      Gets the parent of the Feature3Ds object.
      Feature3D insert(int index, Feature3D feature)
      Inserts the specified Feature3D object at the specified index.
      Feature3Ds insert(int index, Feature3Ds features)
      Inserts the specified Feature3Ds object at the specified index.
      boolean isVisible()
      Sets whether the Feature3Ds object is visible or not, which means all the Feature3D objects in the Feature3Ds object are visible or not.
      void remove(Feature3D feature)
      Removes the specified Feature3D object.
      void remove(Feature3Ds features)
      Removes the specified subobject of the Feature3Ds class which is in the Feature3Ds object.
      void remove(int id)
      Removes the specified Feature3D object according its ID.
      void removeAt(int index)
      Removes the object with the specified index.
      void setCamera(Camera camera)
      Sets the camera object.
      void setDescription(java.lang.String value)
      Sets or sets the description of the Featuren3Ds object.
      void setName(java.lang.String value)
      Sets or sets the name of the Featuren3Ds object.
      void setVisible(boolean value)
      Sets whether the Feature3Ds object is visible or not, which means all the Feature3D objects in the Feature3Ds object are visible or not.
      java.lang.String toKML()
      Returns a KML string indicating the description of the Feature3D object.
      void toKMLFile(java.lang.String kmlFile)
      Exports the Feature3Ds object to a specified KML file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Feature3Ds

        public Feature3Ds()
        Constructs a new Feature3Ds instance.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the collection of the feature3D object.
        Returns:
        The name of the collection of the feature3D object.
        Default:
        The default value is UntitledFeature3Ds.
      • setName

        public void setName(java.lang.String value)
        Sets or sets the name of the Featuren3Ds object.
        Parameters:
        value - The name of the collection of the feature3D object.
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the collection of the feature3D object.
        Returns:
        The description of the collection of the feature3D object.
        Default:
        The default value is a null string.
      • setDescription

        public void setDescription(java.lang.String value)
        Sets or sets the description of the Featuren3Ds object.
        Parameters:
        value - The description of the collection of feature3D object.
      • getParent

        public Feature3Ds getParent()
        Gets the parent of the Feature3Ds object.

        The object of the Feature3Ds class can be regarded as a tree like the illustration below, if you use this method of the Feature3Ds object in the red box you will get the Feature3Ds object in the blue box, that is to say that the Feature3Ds object in the blue is the parent of the one in the red box.

        Returns:
        The parent object of the collection of the feature3D object.
        Default:
        The default value is null.
      • isVisible

        public boolean isVisible()
        Sets whether the Feature3Ds object is visible or not, which means all the Feature3D objects in the Feature3Ds object are visible or not.
        Returns:
        If the collection of the Feature3D object is visible return true; otherwise return false.
        Default:
        The default value is true.
      • setVisible

        public void setVisible(boolean value)
        Sets whether the Feature3Ds object is visible or not, which means all the Feature3D objects in the Feature3Ds object are visible or not.
        Parameters:
        value - A bool specifies the visibility of the feature3D object.
      • getCamera

        public Camera getCamera()
        Gets the camera object.
        Returns:
        the camera object.
        Default:
        The default value is .{Altitude=-1.79769313486232E+308,Heading=-1.79769313486232E+308,Latitude=-1.79769313486232E+308,Longitude=-1.79769313486232E+308,Tilt=-1.79769313486232E+308,AltitudeMode=CLAMP_TO_GROUND}
      • setCamera

        public void setCamera(Camera camera)
        Sets the camera object.
        Parameters:
        camera - The camera object.
      • get

        public java.lang.Object get(int index)
        Gets the object with the specified index.
        Parameters:
        index - The specified index value.
        Returns:
        The item with the specified index value.
      • getCount

        public int getCount()
        Gets the count of the objects in the Feature3Ds object.
        Returns:
        The count of the objects in the Feature3Ds object.
      • getFeatureArray

        public Feature3D[] getFeatureArray(Feature3DSearchOption option)
        Returns the array of the Feature3D objects in this Feature3Ds object.
        Parameters:
        option - Query options. For more information about query options, Please see the Feature3DSearchOption enumeration class.
        Returns:
        The array of the Feature3D objects.
      • getFeaturesArray

        public Feature3Ds[] getFeaturesArray(Feature3DSearchOption option)
        Returns an array of child objects in the Feature3D collection object, and the child object is also a Feature3D collection object. The query option is used to set whether to return only the top-level child object or to return all the sub-objects of the layer. For more information about query options, Please see the Feature3DSearchOption enumeration class.
        Parameters:
        option - Query options. For more information about query options, Please see the Feature3DSearchOption enumeration class.
        Returns:
        The array of the Feature3Ds objects.
      • findFeature

        public Feature3D findFeature(int id,
                                     Feature3DSearchOption option)
        Findsand return the Feature3D object according to the given ID and the specified query option.
        Parameters:
        id - The ID of the feature3D object.
        option - Query options.
        Returns:
        The Feature3D object.
      • findFeature

        public Feature3D[] findFeature(java.lang.String name,
                                       Feature3DSearchOption option)
        Finds all the Feature3D objects with the specified name and returns the array of Feature3D objects satisfying the condition.
        Parameters:
        name - The name of the feature3D object.
        option - Query options.
        Returns:
        The array of the Feature3D objects.
      • findFeatures

        public Feature3Ds[] findFeatures(java.lang.String name,
                                         Feature3DSearchOption option)
        Finds all the Feature3Ds objects with the specified name and returns the array of Feature3Ds objects satisfying the condition.
        Parameters:
        name - The name of the feature3D collection object.
        option - Query options.
        Returns:
        The array of the Feature3Ds collection objects.
      • add

        public Feature3D add(Feature3D feature)
        Adds the specified Feature3D object to this Feature3Ds object.
        Parameters:
        feature - The Feature3D object to be added.
        Returns:
        The Feature3D object.
      • add

        public Feature3Ds add(Feature3Ds features)
        Adds the specified Feature3Ds object to this Feature3Ds object.
        Parameters:
        features - The Feature3D collection object to be added.
        Returns:
        The Feature3Ds collection object.
      • add

        public Feature3D add(Geometry3D geometry)
        Adds the given Geometry3D object to the Feature3Ds object as a new Feature3D object and returns the Feature3D object if successful.
        Parameters:
        geometry - The 3D geometry to be added.
        Returns:
        The Feature3D object.
      • remove

        public void remove(int id)
        Removes the specified Feature3D object according its ID.
        Parameters:
        id - The ID of the feature3D object to be deleted.
      • remove

        public void remove(Feature3D feature)
        Removes the specified Feature3D object.
        Parameters:
        feature - The Feature3D object to be deleted.
      • remove

        public void remove(Feature3Ds features)
        Removes the specified subobject of the Feature3Ds class which is in the Feature3Ds object.
        Parameters:
        features - The subobjects of Feature3Ds to be deleted.
      • clear

        public void clear()
        Clears all the subobjects of the Feature3Ds class and all the Feature3D objects in the Feature3Ds object.
      • toKML

        public java.lang.String toKML()
        Returns a KML string indicating the description of the Feature3D object.
        Returns:
        A KML string indicating the description of the collection of the Feature3D object.
      • fromKML

        public boolean fromKML(java.lang.String kml)
        Imports the collection of the Feature3D object from a KML string.
        Parameters:
        kml - KML string.
        Returns:
        If import successful return true; Otherwise return false.
      • toKMLFile

        public void toKMLFile(java.lang.String kmlFile)
        Exports the Feature3Ds object to a specified KML file.
        Parameters:
        kmlFile - The relative path of the specified KML file.
      • fromKMLFile

        public boolean fromKMLFile(java.lang.String kmlFile)
        Imports the Feature3Ds object from the KML file.
        Parameters:
        kmlFile - The relative path of the specified KML file.
        Returns:
        If import successful return true; Otherwise return false.
      • insert

        public Feature3Ds insert(int index,
                                 Feature3Ds features)
        Inserts the specified Feature3Ds object at the specified index.
        Parameters:
        index - The index value of the specified object.
        features - The specified Feature3Ds object to be inserted.
        Returns:
        The Feature3Ds object newly inserted.
      • insert

        public Feature3D insert(int index,
                                Feature3D feature)
        Inserts the specified Feature3D object at the specified index.
        Parameters:
        index - The index value of the specified object.
        feature - The specified Feature3Ds object to be inserted.
        Returns:
        The Feature3D object of newly inserted.
      • removeAt

        public void removeAt(int index)
        Removes the object with the specified index.
        Parameters:
        index - The index value of the specified item to be deleted.
      • exchange

        public void exchange(int index1,
                             int index2)
        Exchanges the two objects with the specified index.
        Parameters:
        index1 - The index value of the item need to be exchanged.
        index2 - The index value of the item need to be exchanged.
      • dispose

        public void dispose()
        Release the resource occupy by this object.When this method is called, the object is no longer available.