Package pygeodesy :: Module ltp :: Class Frustum |
[frames] | no frames]

# Class Frustum

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
                      Frustum

A rectangular pyramid, typically representing a camera's field-of-view (fov) and the intersection with (or projection to) a local tangent plane.

See Also: Viewing frustum.

Instance Methods
__init__(self, hfov, vfov, ltp=None) New Frustum. |
footprint5(self, alt_attitude, tilt=0, yaw=0, roll=0, z=0.0, ltp=None) Compute the center and corners of the intersection with (or projection to) the local tangent plane (LTP). |
toStr(self, prec=3, fmt='F', sep=', ') Convert this frustum to a "hfov, vfov, ltp" string. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `_DOT_`, `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| hfov Get the horizontal `fov` (`degrees`).
| ltp Get the local tangent plane (Ltp) or `None`.
| vfov Get the vertical `fov` (`degrees`).
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, hfov, vfov, ltp=None) (Constructor) |
New Frustum. Arguments: `hfov` - Horizontal field-of-view (`degrees180`). `vfov` - Vertical field-of-view (`degrees180`). `ltp` - Optional local tangent plane (Ltp). Raises: `UnitError` - Invalid `hfov` or `vfov`. `ValueError` - Invalid `hfov` or `vfov`. Overrides: object.__init__

### footprint5 (self, alt_attitude, tilt=0, yaw=0, roll=0, z=0.0, ltp=None) |
Compute the center and corners of the intersection with (or projection to) the local tangent plane (LTP). Arguments: `alt_attitude` - An altitude (`meter`) above local tangent plane or an attitude (Attitude or Attitude4Tuple) with the `altitude`, `tilt`, `yaw` and `roll`. `tilt` - Pitch, elevation from horizontal (`degrees`), negative down (clockwise rotation along and around the x- or East axis). `yaw` - Bearing, heading (compass `degrees`), clockwise from North (counter-clockwise rotation along and around the z- or Up axis). `roll` - Roll, bank (`degrees`), positive to the right and down (clockwise rotation along and around the y- or North axis). `z` - Optional height of the footprint (`meter`) above local tangent plane. `ltp` - The local tangent plane (Ltp), overriding this frustum's `ltp`. Returns: A Footprint5Tuple`(center, upperleft, upperight, loweright, lowerleft)` with the `center` and 4 corners each an Xyz4Tuple. Raises: `TypeError` - Invalid `ltp`. `UnitError` - Invalid `altitude`, `tilt`, `roll` or `z`. `ValueError` - If `altitude` too low, `z` too high or `tilt` or `roll` -including `vfov` respectively `hfov`- over the horizon. See Also: Principal axes.

### toStr (self, prec=3, fmt='F', sep=', ') |
Convert this frustum to a "hfov, vfov, ltp" string. Arguments: `prec` - Optional number of decimal digits (0..8 or `None`). `fmt` - Optional, `float` format (`str`). `sep` - Optional separator to join (`str`). Returns: Frustum in the specified form (`str`). Overrides: named._Named.toStr

Property Details

### hfov Get the horizontal `fov` (`degrees`). Get method: hfov(self) - Get the horizontal `fov` (`degrees`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### ltp Get the local tangent plane (Ltp) or `None`. Get method: ltp(self) - Get the local tangent plane (Ltp) or `None`. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### vfov Get the vertical `fov` (`degrees`). Get method: vfov(self) - Get the vertical `fov` (`degrees`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.