fiftyone.core.threed.lightsÂ¶
Lights definition for 3D visualization.
Classes:

Base class for 3D lights. 

Represents an ambient light. 

Represents a directional light. 

Represents a point light. 

Represents a spot light. 

class
fiftyone.core.threed.lights.
Light
(name: Optional[str] = None, color: str = '#ffffff', intensity: float = 1.0, visible=True, position: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, scale: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, quaternion: Optional[fiftyone.core.threed.transformation.Quaternion] = None)Â¶ Bases:
fiftyone.core.threed.object_3d.Object3D
Base class for 3D lights.
 Parameters
color ("#ffffff") â€“ the color of the light
intensity (1.0) â€“ the intensity of the light in the range
[0, 1]
visible (True) â€“ default visibility of the object in the scene
position (None) â€“ the position of the light in object space
quaternion (None) â€“ the quaternion of the light in object space
scale (None) â€“ the scale of the light in object space
Methods:
add
(*objs)Add one or more objects as children of this one.
as_dict
()Converts the object to a dict.
clear
()Remove all children from this object.
traverse
([include_self])Traverse the scene graph.
Attributes:
The local transform matrix of the object.
The position of the object in object space.
The quaternion of the object in object space.
The rotation of the object in object space.
The scale of the object in object space.
The unique ID of the object.

add
(*objs: fiftyone.core.threed.object_3d.Object3D) → NoneÂ¶ Add one or more objects as children of this one.

as_dict
()Â¶ Converts the object to a dict.

clear
() → NoneÂ¶ Remove all children from this object.

property
local_transform_matrix
Â¶ The local transform matrix of the object.
Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (nonuniform scaling) might have unexpected results.

property
position
Â¶ The position of the object in object space.

property
quaternion
Â¶ The quaternion of the object in object space.

property
rotation
Â¶ The rotation of the object in object space.

property
scale
Â¶ The scale of the object in object space.

traverse
(include_self=True)Â¶ Traverse the scene graph.

property
uuid
Â¶ The unique ID of the object.

class
fiftyone.core.threed.lights.
AmbientLight
(name: str = 'AmbientLight', intensity: float = 0.1, color: str = '#ffffff', visible=True, position: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, scale: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, quaternion: Optional[fiftyone.core.threed.transformation.Quaternion] = None)Â¶ Bases:
fiftyone.core.threed.lights.Light
Represents an ambient light.
This light globally illuminates all objects in the scene equally.
 Parameters
name ("AmbientLight") â€“ the name of the light
intensity (0.1) â€“ the intensity of the light in the range
[0, 1]
color ("#ffffff") â€“ the color of the light
visible (True) â€“ default visibility of the object in the scene
position (None) â€“ the position of the light in object space
quaternion (None) â€“ the quaternion of the light in object space
scale (None) â€“ the scale of the light in object space
Methods:
add
(*objs)Add one or more objects as children of this one.
as_dict
()Converts the object to a dict.
clear
()Remove all children from this object.
traverse
([include_self])Traverse the scene graph.
Attributes:
The local transform matrix of the object.
The position of the object in object space.
The quaternion of the object in object space.
The rotation of the object in object space.
The scale of the object in object space.
The unique ID of the object.

add
(*objs: fiftyone.core.threed.object_3d.Object3D) → NoneÂ¶ Add one or more objects as children of this one.

as_dict
()Â¶ Converts the object to a dict.

clear
() → NoneÂ¶ Remove all children from this object.

property
local_transform_matrix
Â¶ The local transform matrix of the object.
Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (nonuniform scaling) might have unexpected results.

property
position
Â¶ The position of the object in object space.

property
quaternion
Â¶ The quaternion of the object in object space.

property
rotation
Â¶ The rotation of the object in object space.

property
scale
Â¶ The scale of the object in object space.

traverse
(include_self=True)Â¶ Traverse the scene graph.

property
uuid
Â¶ The unique ID of the object.

class
fiftyone.core.threed.lights.
DirectionalLight
(name: str = 'DirectionalLight', target: Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array] = Vector3(x=0.0, y=0.0, z=0.0), color: str = '#ffffff', intensity: float = 1.0, visible=True, position: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, scale: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, quaternion: Optional[fiftyone.core.threed.transformation.Quaternion] = None)Â¶ Bases:
fiftyone.core.threed.lights.Light
Represents a directional light.
A light that gets emitted in a specific direction. This light will behave as though it is infinitely far away and the rays produced from it are all parallel.
 Parameters
name ("DirectionalLight") â€“ the name of the light
target ([0,0,0]) â€“ the target of the light
color ("#ffffff") â€“ the color of the light
intensity (1.0) â€“ the intensity of the light in the range
[0, 1]
visible (True) â€“ default visibility of the object in the scene
position (None) â€“ the position of the light in object space
quaternion (None) â€“ the quaternion of the light in object space
scale (None) â€“ the scale of the light in object space
Attributes:
The local transform matrix of the object.
The position of the object in object space.
The quaternion of the object in object space.
The rotation of the object in object space.
The scale of the object in object space.
The unique ID of the object.
Methods:
add
(*objs)Add one or more objects as children of this one.
as_dict
()Converts the object to a dict.
clear
()Remove all children from this object.
traverse
([include_self])Traverse the scene graph.

target
: Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array] = Vector3(x=0.0, y=0.0, z=0.0)Â¶

add
(*objs: fiftyone.core.threed.object_3d.Object3D) → NoneÂ¶ Add one or more objects as children of this one.

as_dict
()Â¶ Converts the object to a dict.

clear
() → NoneÂ¶ Remove all children from this object.

property
local_transform_matrix
Â¶ The local transform matrix of the object.
Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (nonuniform scaling) might have unexpected results.

property
position
Â¶ The position of the object in object space.

property
quaternion
Â¶ The quaternion of the object in object space.

property
rotation
Â¶ The rotation of the object in object space.

property
scale
Â¶ The scale of the object in object space.

traverse
(include_self=True)Â¶ Traverse the scene graph.

property
uuid
Â¶ The unique ID of the object.

class
fiftyone.core.threed.lights.
PointLight
(name: str = 'PointLight', distance: float = 0.0, decay: float = 2.0, color: str = '#ffffff', intensity: float = 1.0, visible=True, position: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, scale: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, quaternion: Optional[fiftyone.core.threed.transformation.Quaternion] = None)Â¶ Bases:
fiftyone.core.threed.lights.Light
Represents a point light.
 Parameters
name ("PointLight") â€“ the name of the light
distance (0.0) â€“ the distance at which the lightâ€™s intensity is zero
decay (2.0) â€“ the amount the light dims along the distance of the light
color ("#ffffff") â€“ the color of the light
intensity (1.0) â€“ the intensity of the light in the range
[0, 1]
visible (True) â€“ default visibility of the object in the scene
position (None) â€“ the position of the light in object space
quaternion (None) â€“ the quaternion of the light in object space
scale (None) â€“ the scale of the light in object space
Methods:
add
(*objs)Add one or more objects as children of this one.
as_dict
()Converts the object to a dict.
clear
()Remove all children from this object.
traverse
([include_self])Traverse the scene graph.
Attributes:
The local transform matrix of the object.
The position of the object in object space.
The quaternion of the object in object space.
The rotation of the object in object space.
The scale of the object in object space.
The unique ID of the object.

add
(*objs: fiftyone.core.threed.object_3d.Object3D) → NoneÂ¶ Add one or more objects as children of this one.

as_dict
()Â¶ Converts the object to a dict.

clear
() → NoneÂ¶ Remove all children from this object.

property
local_transform_matrix
Â¶ The local transform matrix of the object.
Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (nonuniform scaling) might have unexpected results.

property
position
Â¶ The position of the object in object space.

property
quaternion
Â¶ The quaternion of the object in object space.

property
rotation
Â¶ The rotation of the object in object space.

property
scale
Â¶ The scale of the object in object space.

traverse
(include_self=True)Â¶ Traverse the scene graph.

property
uuid
Â¶ The unique ID of the object.

class
fiftyone.core.threed.lights.
SpotLight
(name: str = 'SpotLight', target: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, distance: float = 0.0, decay: float = 2.0, angle: float = 1.0471975511965976, penumbra: float = 0.0, color: str = '#ffffff', intensity: float = 1.0, visible=True, position: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, scale: Optional[Union[fiftyone.core.threed.transformation.Vector3, List[float], Tuple[float], numpy.array]] = None, quaternion: Optional[fiftyone.core.threed.transformation.Quaternion] = None)Â¶ Bases:
fiftyone.core.threed.lights.Light
Represents a spot light.
 Parameters
name ("SpotLight") â€“ the name of the light
target ([0,0,0]) â€“ the target of the light
distance (0.0) â€“ the distance at which the lightâ€™s intensity is zero
decay (2.0) â€“ the amount the light dims along the distance of the light
angle (PI / 3) â€“ the angle of the lightâ€™s spotlight, in radians
penumbra (0.0) â€“ the angle of the penumbra of the lightâ€™s spotlight, in radians
color ("#ffffff") â€“ the color of the light
intensity (1.0) â€“ the intensity of the light in the range
[0, 1]
visible (True) â€“ default visibility of the object in the scene
position (None) â€“ the position of the light in object space
quaternion (None) â€“ the quaternion of the light in object space
scale (None) â€“ the scale of the light in object space
Methods:
add
(*objs)Add one or more objects as children of this one.
as_dict
()Converts the object to a dict.
clear
()Remove all children from this object.
traverse
([include_self])Traverse the scene graph.
Attributes:
The local transform matrix of the object.
The position of the object in object space.
The quaternion of the object in object space.
The rotation of the object in object space.
The scale of the object in object space.
The unique ID of the object.

add
(*objs: fiftyone.core.threed.object_3d.Object3D) → NoneÂ¶ Add one or more objects as children of this one.

as_dict
()Â¶ Converts the object to a dict.

clear
() → NoneÂ¶ Remove all children from this object.

property
local_transform_matrix
Â¶ The local transform matrix of the object.
Setting this property also decomposes the matrix into its constituent position, quaternion, and scale components. However, decomposition of matrices with skew / shear components (nonuniform scaling) might have unexpected results.

property
position
Â¶ The position of the object in object space.

property
quaternion
Â¶ The quaternion of the object in object space.

property
rotation
Â¶ The rotation of the object in object space.

property
scale
Â¶ The scale of the object in object space.

traverse
(include_self=True)Â¶ Traverse the scene graph.

property
uuid
Â¶ The unique ID of the object.