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, **name)
New Frustum.
 
footprint5(self, alt_attitude, tilt=0, yaw=0, roll=0, z=0.0, ltp=None, **name)
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: __imatmul__, __matmul__, __rmatmul__, attrs, classof, copy, dup, methodname, rename, renamed, toStr2

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties
  hfov
  ltp
  vfov

Inherited from named._Named: classname, classnaming, iteration, name, named, named2, named3, named4, sizeof

Inherited from object: __class__

Method Details

__init__ (self, hfov, vfov, ltp=None, **name)
(Constructor)

 

New Frustum.

Arguments:
  • hfov - Horizontal field-of-view (degrees180).
  • vfov - Vertical field-of-view (degrees180).
  • ltp - Optional local tangent plane (Ltp).
  • name - Optional name=NN (str).
Raises:
Overrides: object.__init__

footprint5 (self, alt_attitude, tilt=0, yaw=0, roll=0, z=0.0, ltp=None, **name)

 

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.
  • name - Optional name=NN (str).
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 - Number of (decimal) digits, unstripped (0..8 or None).
  • fmt - Optional, float format (letter).
  • sep - Separator to join (str).
Returns:
Frustum in the specified form (str).
Overrides: named._Named.toStr

Property Details

hfov

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

ltp

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

vfov

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.