Class SimpleMarkerSceneSymbol

  • All Implemented Interfaces:
    JsonSerializable

    public final class SimpleMarkerSceneSymbol
    extends MarkerSceneSymbol
    Defines a SimpleMarkerSceneSymbol which is a MarkerSceneSymbol 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
    • 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 - one of the shapes of the symbol
        color - color of the shape's surface
        width - width of the symbol
        height - height of the symbol
        depth - depth of the symbol
        anchorPosition - placement of the symbol relative to the graphic/feature's geometry
        Throws:
        IllegalArgumentException - if style is null
        IllegalArgumentException - if anchorPosition is null
        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:
        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:
        IllegalArgumentException - if anchorPosition is null
        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:
        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:
        IllegalArgumentException - if size is less than 1
        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:
        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:
        IllegalArgumentException - if diameter or height is less than 1
        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:
        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:
        IllegalArgumentException - if size or height is less than 1
        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:
        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:
        IllegalArgumentException - if diameter is less than 1
        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:
        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:
        IllegalArgumentException - if size or height is less than 1
        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