py3dtiles.tileset.bounding_volume module#
- class py3dtiles.tileset.bounding_volume.BoundingVolume[source]#
Bases:
RootProperty
[_BoundingVolumeJsonDictT
],Generic
[_BoundingVolumeJsonDictT
]Abstract class used as interface for box, region and sphere.
- abstract add(other: BoundingVolume[Any]) None [source]#
Compute the ‘canonical’ bounding volume fitting this bounding volume together with the added bounding volume. The computed fitting bounding volume is generically not the smallest one (due to its alignment with the coordinate axis).
- Parameters:
other – another bounding volume to be added with this one
- abstract classmethod from_dict(bounding_volume_dict: _BoundingVolumeJsonDictT) Self [source]#
Construct a bounding volume from a dict. The implementor should support each possible format in the 3dtiles spec relevant to the specific flavor of bounding volume.
- abstract get_center() ndarray[Any, dtype[float64]] [source]#
Returns the center of this bounding volume.
- abstract get_half_size() ndarray[Any, dtype[float64]] [source]#
Returns the half size of this volume as a 3 elements array
- abstract to_dict() _BoundingVolumeJsonDictT [source]#
Serialize this bounding volume into its JSON representation, ready to be embedded in a tileset.