Class SimpleMarkerSceneSymbol

  • All Implemented Interfaces:
    JsonSerializable

    public final class SimpleMarkerSceneSymbol
    extends MarkerSceneSymbol
    Used to draw point or multipoint features on a layer using a 3D marker symbol.

    Simple marker scene symbols display graphics using a 3D symbol. A SimpleMarkerSceneSymbol is a MarkerSceneSymbol that is based on simple shapes.

    SimpleMarkerSceneSymbol symbolize Graphics and Features that have a Point or Multipoint geometry using simple predefined styles:

    • Cube
    • Cone
    • Cylinder
    • Diamond
    • Sphere
    • Tetrahedron

    A SimpleMarkerSceneSymbol has the following properties:

    • Style, type of shape.
    • Width, width of the symbol.
    • Height, height of the symbol.
    • Depth, depth of the symbol.
    • Pitch, pitch of the symbol.
    • Roll, roll of the symbol.
    • Heading, heading of the symbol.
    • Anchor Position, placement of the symbol relative to the graphic/feature's geometry.

    The shapes rendered are dependent on the style and dimensions (width, height, depth).

    • If the style is sphere, and dimensions are different, then the shape rendered is an ellipsoid.
    • If the style is cube, and dimensions are different, then the shape rendered is a cuboid.
    • If the style is cone, and the width and depth are different, then the cone rendered has elliptic base.
    • If the style is cylinder, and the width and depth are different, them the cylinder rendered has elliptic ends.
    • If the style is diamond, and the width and depth are different, then the two halves of the diamond are connected by a rectangle (instead of the standard square).
    • If the style is a tetrahedron, and the width and depth are different, then the base is not an equilateral triangle.

     GraphicsOverlay.getGraphics().add(new Graphic(point, simpleMarkerSceneSymbol));
     
    OR
     GraphicsOverlay.setRenderer(new SimpleRenderer(simpleMarkerSceneSymbol));
     
    Since:
    100.0.0 for JavaSE and 100.1.0 for Android
    See Also:
    Graphic, GraphicsOverlay, SimpleRenderer, MarkerSceneSymbol, Symbol
    • Constructor Detail

      • SimpleMarkerSceneSymbol

        public SimpleMarkerSceneSymbol​(SimpleMarkerSceneSymbol.Style style,
                                       int color,
                                       double width,
                                       double height,
                                       double depth,
                                       SceneSymbol.AnchorPosition anchorPosition)
        Creates a new SimpleMarkerSceneSymbol.
        Parameters:
        style - the style of the symbol SimpleMarkerSceneSymbol.Style
        color - the color of the symbol color
        width - the width in meters of the symbol
        height - height in meters of the symbol
        depth - depth in meters of the symbol
        anchorPosition - anchor position of the symbol placement SceneSymbol.AnchorPosition relative to the graphic/feature's geometry
        Throws:
        java.lang.IllegalArgumentException - if style is null
        java.lang.IllegalArgumentException - if anchorPosition is null
        java.lang.IllegalArgumentException - if width or height or depth is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
    • Method Detail

      • createCone

        public static SimpleMarkerSceneSymbol createCone​(int color,
                                                         double diameter,
                                                         double height)
        Creates a cone with the given dimensions.

        Default properties:

        • Anchor position, Bottom
        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the base of the cone, in meters
        height - height from the base to the tip of the code, in meters
        Returns:
        a new cone
        Throws:
        java.lang.IllegalArgumentException - if diameter or height is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createCone

        public static SimpleMarkerSceneSymbol createCone​(int color,
                                                         double diameter,
                                                         double height,
                                                         SceneSymbol.AnchorPosition anchorPosition)
        Creates a cone with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the base of the cone, in meters
        height - height from the base to the tip of the code, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new cone
        Throws:
        java.lang.IllegalArgumentException - if anchorPosition is null
        java.lang.IllegalArgumentException - if diameter or height is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createCube

        public static SimpleMarkerSceneSymbol createCube​(int color,
                                                         double size)
        Creates a cube with the given dimensions.

        Default properties:

        • Anchor position, Bottom
        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - specifies the width, height, and depth of cube, in meters
        Returns:
        a new cube
        Throws:
        java.lang.IllegalArgumentException - if size is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createCube

        public static SimpleMarkerSceneSymbol createCube​(int color,
                                                         double size,
                                                         SceneSymbol.AnchorPosition anchorPosition)
        Creates a cube with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - specifies the width, height, and depth of cube, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new cube
        Throws:
        java.lang.IllegalArgumentException - if size is less than 1
        java.lang.IllegalArgumentException - if anchorPosition is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createCylinder

        public static SimpleMarkerSceneSymbol createCylinder​(int color,
                                                             double diameter,
                                                             double height)
        Creates a cylinder with the given dimensions.

        Default properties:

        • Anchor position, Bottom
        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the cylinder, represents the width and depth, in meters
        height - distance between the ends of the cylinder, in meters
        Returns:
        a new cylinder
        Throws:
        java.lang.IllegalArgumentException - if diameter or height is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createCylinder

        public static SimpleMarkerSceneSymbol createCylinder​(int color,
                                                             double diameter,
                                                             double height,
                                                             SceneSymbol.AnchorPosition anchorPosition)
        Creates a cylinder with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the cylinder, represents the width and depth, in meters
        height - distance between the ends of the cylinder, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new cylinder
        Throws:
        java.lang.IllegalArgumentException - if diameter or height is less than 1
        java.lang.IllegalArgumentException - if anchorPosition is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createDiamond

        public static SimpleMarkerSceneSymbol createDiamond​(int color,
                                                            double size,
                                                            double height)
        Creates a diamond with the given dimensions.

        Default properties:

        • Anchor position, Bottom
        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - represents the width and depth of the diamond, in meters
        height - distance from one tip to the other, in meters
        Returns:
        a new diamond
        Throws:
        java.lang.IllegalArgumentException - if size or height is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createDiamond

        public static SimpleMarkerSceneSymbol createDiamond​(int color,
                                                            double size,
                                                            double height,
                                                            SceneSymbol.AnchorPosition anchorPosition)
        Creates a diamond with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - represents the width and depth of the diamond, in meters
        height - distance from one tip to the other, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new diamond
        Throws:
        java.lang.IllegalArgumentException - if size or height is less than 1
        java.lang.IllegalArgumentException - if anchorPosition is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createSphere

        public static SimpleMarkerSceneSymbol createSphere​(int color,
                                                           double diameter)
        Creates a sphere with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the sphere, represents the height, width and depth, in meters
        Returns:
        a new sphere
        Throws:
        java.lang.IllegalArgumentException - if diameter is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createSphere

        public static SimpleMarkerSceneSymbol createSphere​(int color,
                                                           double diameter,
                                                           SceneSymbol.AnchorPosition anchorPosition)
        Creates a sphere with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        diameter - diameter of the sphere, represents the height, width and depth, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new sphere
        Throws:
        java.lang.IllegalArgumentException - if diameter is less than 1
        java.lang.IllegalArgumentException - if anchorPosition is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createTetrahedron

        public static SimpleMarkerSceneSymbol createTetrahedron​(int color,
                                                                double size,
                                                                double height)
        Creates a tetrahedron with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - represents the width and depth of the tetrahedron, in meters
        height - height from center of the base to the opposite tip, in meters
        Returns:
        a new tetrahedron
        Throws:
        java.lang.IllegalArgumentException - if size or height is less than 1
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • createTetrahedron

        public static SimpleMarkerSceneSymbol createTetrahedron​(int color,
                                                                double size,
                                                                double height,
                                                                SceneSymbol.AnchorPosition anchorPosition)
        Creates a tetrahedron with the given dimensions.

        Default properties:

        • Pitch, 0.0
        • Roll, 0.0
        • Heading, 0.0
        Parameters:
        color - surface color of the symbol as a ARGB(alpha, red, green, blue) value
        size - represents the width and depth of the tetrahedron, in meters
        height - height from center of the base to the opposite tip, in meters
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Returns:
        a new tetrahedron
        Throws:
        java.lang.IllegalArgumentException - if size or height is less than 1
        java.lang.IllegalArgumentException - if anchorPosition is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • getStyle

        public SimpleMarkerSceneSymbol.Style getStyle()
        Returns the style. Default is BOTTOM.
        Returns:
        the style
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android
      • setStyle

        public void setStyle​(SimpleMarkerSceneSymbol.Style style)
        Sets the style.
        Parameters:
        style - the style
        Throws:
        java.lang.IllegalArgumentException - if style is null
        Since:
        100.0.0 for JavaSE and 100.1.0 for Android