Class Sphere3D

    • Field Detail

      • divisions

        public Parameter divisions
        The number of divisions in the sphere. This is an integer with default value "max(6, roundToInt(radius * 300))". This parameter determines the resolution of the sphere, which is approximated as a surface composed of triangular facets. Increasing this value makes the surface smoother, but also increases the cost of rendering.
      • radius

        public Parameter radius
        The radius of the sphere. This is a double with default 0.1.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        If the specified attribute is the radius, then modify the sphere to the new radius. Note that this will take effect only if the allowRuntimeChanges parameter has value true.
        Overrides:
        attributeChanged in class GRShadedShape
        Parameters:
        attribute - The attribute to change.
        Throws:
        IllegalActionException - If thrown by the parent class.
      • _getNodeObject

        protected javax.media.j3d.Node _getNodeObject()
        Return the encapsulated Java3D node of this 3D actor. The encapsulated node for this actor is a Java3D sphere.
        Specified by:
        _getNodeObject in class GRActor3D
        Returns:
        the Java3D Sphere