Sphere constructor

init

Initializes a new instance of the Sphere with default radius 1.

def __init__(self):
    ...

init

Initializes a new instance of the Sphere class with specified radius.

def __init__(self, radius):
    ...
ParameterTypeDescription
radiusfloatRadius.

init

Initializes a new instance of the Sphere class with specified radius, width segments and height segments.

def __init__(self, radius, width_segments, height_segments):
    ...
ParameterTypeDescription
radiusfloatRadius of the sphere.
width_segmentsintWidth segments.
height_segmentsintHeight segments.

init

Initializes a new instance of the Sphere class.

def __init__(self, name, radius, width_segments, height_segments, phi_start, phi_length, theta_start, theta_length):
    ...
ParameterTypeDescription
namestrName.
radiusfloatRadius of the sphere.
width_segmentsintWidth segments.
height_segmentsintHeight segments.
phi_startfloatPhi start.
phi_lengthfloatPhi length.
theta_startfloatTheta start.
theta_lengthfloatTheta length.

See Also