Package esys :: Package lsm :: Package vis :: Package core :: Module camera :: Class Camera
[hide private]
[frames] | no frames]

Class Camera

object --+
         |
        Camera
Known Subclasses:

Objects of this class represent a camera.

Instance Methods [hide private]
 
__init__(self)
Initialises camera object.
 
getPosn(self)
Returns the position coordinate of this camera.
 
setPosn(self, coord)
Sets the position coordinate of this camera.
 
rotatePosn(self, axis, axisPt)
Rotates the camera position about the specified axis.
 
rotate(self, axis, axisPt)
Rotates the camera position and look-at coordinate about the specified axis.
 
getLookAt(self)
Returns the coordinate at which this camera is looking.
 
setLookAt(self, coord)
Sets the coordinate at which this camera is looking.
 
setZoom(self, factor)
Decrease the scale of the projection area by the specified factor.
float
getZoom(self)
Returns the zoom factor.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Initialises camera object.

Overrides: object.__init__

getPosn(self)

 

Returns the position coordinate of this camera.

Returns:
Position coordinate of this camera.

setPosn(self, coord)

 

Sets the position coordinate of this camera.

Parameters:
  • coord (iterable of 3 float elements) - New position of this camera.

rotatePosn(self, axis, axisPt)

 

Rotates the camera position about the specified axis.

Parameters:
  • axis (iterable of 3 float elements) - Axis of rotation and angle of rotation ( = axis.norm() radians).
  • axisPt (iterable of 3 float elements) - Axis of rotation is assumed to pass through this point.

rotate(self, axis, axisPt)

 

Rotates the camera position and look-at coordinate about the specified axis.

Parameters:
  • axis (iterable of 3 float elements) - Axis of rotation and angle of rotation ( = axis.norm() radians).
  • axisPt (iterable of 3 float elements) - Axis of rotation is assumed to pass through this point.

getLookAt(self)

 

Returns the coordinate at which this camera is looking.

Returns:
The coordinate being looked-at by this camera.

setLookAt(self, coord)

 

Sets the coordinate at which this camera is looking.

Parameters:
  • coord (iterable of 3 float elements) - New coordinate to be looked-at by this camera.

setZoom(self, factor)

 

Decrease the scale of the projection area by the specified factor. A value greater than 1 is a zoom-in, a value less than 1 is a zoom-out.

Parameters:
  • factor (float) - Zoom multiplier factor > 0.0.

getZoom(self)

 

Returns the zoom factor.

Returns: float
The zoom factor.

See Also: setZoom