Package esys :: Package pyvisi :: Module camera :: Class Camera
[hide private]
[frames] | no frames]

Class Camera

Class that defines a camera. A camera controls the display angle of the rendered object and one is usually created for a Scene. However, if a Scene has four viewports, then a separate camera may be created for each viewport.

Instance Methods [hide private]
 
__init__(self, scene, viewport=0)
Initialise the camera.
 
__resetCamera(self, scene)
Repositions the camera to view the center point of the actors.
 
__resetCameraClippingRange(self, scene)
Reset the camera clipping range based on the bounds of the visible actors.
 
__setupCamera(self, scene)
Setup the camera.
Boolean
_isModified(self)
Return whether the Camera has been modified.
 
_render(self, scene)
Render the camera.
 
azimuth(self, angle)
Rotate the camera to the left and right.
 
backView(self)
Rotate the camera to view the back of the rendered object.
 
bottomView(self)
Rotate the camera to view the bottom of the rendered object.
 
dolly(self, distance)
Move the camera towards (greater than 1) the rendered object.
 
elevation(self, angle)
Rotate the camera to the top and bottom.
 
isometricView(self)
Rotate the camera to view the isometric angle of the rendered object.
 
leftView(self)
Rotate the camera to view the left side of the rendered object.
 
parallelProjectionOff(self)
Disable camera parallel projection.
 
parallelProjectionOn(self)
Enable camera parallel projection.
 
rightView(self)
Rotate the camera to view the right side of the rendered object.
 
roll(self, angle)
Roll the camera to the left and right.
 
setClippingRange(self, near_clipping, far_clipping)
Set the near and far clipping plane of the camera.
 
setFocalPoint(self, position)
Set the focal point of the camera.
 
setPosition(self, position)
Set the position of the camera.
 
setViewUp(self, position)
Set the view up direction of the camera.
 
topView(self)
Rotate the camera to view the top of the rendered object.
Method Details [hide private]

__init__(self, scene, viewport=0)
(Constructor)

 

Initialise the camera.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on
  • viewport (Viewport constant) - Viewport in which objects are to be rendered on

__resetCamera(self, scene)

 

Repositions the camera to view the center point of the actors.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

__resetCameraClippingRange(self, scene)

 

Reset the camera clipping range based on the bounds of the visible actors. This ensures the rendered object is not cut-off. Needs to be called whenever the camera's settings are modified.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

__setupCamera(self, scene)

 

Setup the camera.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

_isModified(self)

 

Return whether the Camera has been modified.

Returns: Boolean
True or False

_render(self, scene)

 

Render the camera.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

azimuth(self, angle)

 

Rotate the camera to the left and right.

Parameters:
  • angle (Number) - Degree to rotate the camera

dolly(self, distance)

 

Move the camera towards (greater than 1) the rendered object. However, the camera is unable to be moved away from the rendered object.

Parameters:
  • distance (Number) - Amount to move towards the rendered object

elevation(self, angle)

 

Rotate the camera to the top and bottom.

Parameters:
  • angle (Number) - Degree to rotate the camera (only between -90 and 90)

roll(self, angle)

 

Roll the camera to the left and right.

Parameters:
  • angle (Number) - Degree to roll the camera

setClippingRange(self, near_clipping, far_clipping)

 

Set the near and far clipping plane of the camera.

Parameters:
  • near_clipping (Number) - Distance to the near clipping plane
  • far_clipping (Number) - Distance to the far clipping plane

setFocalPoint(self, position)

 

Set the focal point of the camera.

Parameters:

setPosition(self, position)

 

Set the position of the camera.

Parameters:

setViewUp(self, position)

 

Set the view up direction of the camera.

Parameters: