Class CappedEllipticalCylinder

    • Field Detail

      • MINIMAL_GEOMETRY_SLICES

        protected static final int MINIMAL_GEOMETRY_SLICES
        See Also:
        Constant Field Values
      • MINIMAL_GEOMETRY_LOOPS

        protected static final int MINIMAL_GEOMETRY_LOOPS
        See Also:
        Constant Field Values
      • center

        protected LatLon center
      • innerMinorRadius

        protected double innerMinorRadius
      • outerMinorRadius

        protected double outerMinorRadius
      • innerMajorRadius

        protected double innerMajorRadius
      • outerMajorRadius

        protected double outerMajorRadius
      • heading

        protected Angle heading
      • enableCaps

        protected boolean enableCaps
      • slices

        protected int slices
      • loops

        protected int loops
    • Constructor Detail

      • CappedEllipticalCylinder

        public CappedEllipticalCylinder​(LatLon location,
                                        double minorRadius,
                                        double majorRadius,
                                        Angle heading)
      • CappedEllipticalCylinder

        public CappedEllipticalCylinder​(AirspaceAttributes attributes)
      • CappedEllipticalCylinder

        public CappedEllipticalCylinder()
    • Method Detail

      • getCenter

        public LatLon getCenter()
        Returns the geographic location of the cylinder's center.
        Returns:
        the cylinder's center
      • setCenter

        public void setCenter​(LatLon location)
        Sets the cylinder's center.
        Parameters:
        location - the geographic position (latitude and longitude) of the cylinder's center.
        Throws:
        java.lang.IllegalArgumentException - if the location is null.
      • getRadii

        public double[] getRadii()
        Returns the cylinder's radii, in meters.
        Returns:
        the cylinder's radii, in meters. The returned array contains the inner minor radius, inner major radius, outer minor radius and outer major radius, in that order.
      • setRadii

        public void setRadii​(double innerMinorRadius,
                             double innerMajorRadius,
                             double outerMinorRadius,
                             double outerMajorRadius)
        Sets the cylinder's radii.
        Parameters:
        innerMinorRadius - the cylinder's inner minor radius, in meters.
        innerMajorRadius - The cylinder's inner major radius, in meters.
        outerMinorRadius - the cylinder's outer minor radius, in meters.
        outerMajorRadius - The cylinder's outer major radius, in meters.
        Throws:
        java.lang.IllegalArgumentException - if either radius is less than zero.
      • setRadii

        public void setRadii​(double outerMinorRadius,
                             double outerMajorRadius)
        Sets the cylinder's outer radii.
        Parameters:
        outerMinorRadius - the cylinder's outer minor radius, in meters.
        outerMajorRadius - the cylinder's outer major radius, in meters.
        Throws:
        java.lang.IllegalArgumentException - if either radius is less than zero.
      • getHeading

        public Angle getHeading()
        Returns this cylinder's heading, in degrees.
        Returns:
        This cylinder's heading, in degrees.
      • setHeading

        public void setHeading​(Angle heading)
        Sets this cylinder's heading, in degrees.
        Parameters:
        heading - This cylinder's heading, in degrees.
      • isEnableCaps

        public boolean isEnableCaps()
      • setEnableCaps

        public void setEnableCaps​(boolean enable)
      • getReferencePosition

        public Position getReferencePosition()
        Description copied from interface: Movable
        A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.
        Returns:
        the object's reference position, or null if no reference position is available.
      • updateSurfaceShape

        protected void updateSurfaceShape​(DrawContext dc,
                                          SurfaceShape shape)
        Description copied from class: AbstractAirspace
        Sets surface shape parameters prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes. Subclasses should override this method if they need to update more than the attributes and the delegate owner.
        Overrides:
        updateSurfaceShape in class AbstractAirspace
        Parameters:
        dc - the current drawing context.
        shape - the surface shape to update.
      • regenerateSurfaceShape

        protected void regenerateSurfaceShape​(DrawContext dc,
                                              SurfaceShape shape)
        Description copied from class: AbstractAirspace
        Regenerates surface shape geometry prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes.
        Overrides:
        regenerateSurfaceShape in class AbstractAirspace
        Parameters:
        dc - the current drawing context.
        shape - the surface shape to regenerate.
      • getSlices

        public int getSlices()
      • setSlices

        public void setSlices​(int slices)
      • getStacks

        public int getStacks()
      • getLoops

        public int getLoops()
      • setLoops

        public void setLoops​(int loops)
      • computeReferenceCenter

        protected Vec4 computeReferenceCenter​(DrawContext dc)