Package populusgui :: Module CameraManager :: Class CameraControl
[frames] | no frames]

Class CameraControl


Camera Control Manager class for managing CameraView instances and handles switching between views.

Instance Methods
None
__init__(self, mainEngine, base, camera, render, entity=None)
Initializer of the CameraControl class.
None
update(self, deltaTime)
Update subsystems, tick from MainEngine used.
None
attachCameraView(self, cameraView)
Attach CameraView to the CameraControl.
None
detachCameraView(self, cameraViewName)
Detach CameraView from the CameraControl instance.
List(string)
getViewNames(self)
Get list of view-names for views attached to the CameraControl.
None
selectNextView(self)
Cycle method.
None.
selectViewByName(self, cameraViewName)
Given a name, make a view active.
None
setCursorVisibility(self, state)
Controls the visibility of the mouse cursor.
 
__str__(self)
str(x)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables
    Startup Constants
  CAMERA_NEAR_CLIP = 0.1
  DUMMY_NODE_PATH_NAME = 'camera target'
Properties
Avatar entity
Getter for entity.

Inherited from object: __class__

Method Details

__init__(self, mainEngine, base, camera, render, entity=None)
(Constructor)

 

Initializer of the CameraControl class.

Parameters:
  • mainEngine (MainEngine) - The MainEngine of the CADIA Populus.
  • base (base) - Panda base global.
  • camera (camera) - Panda camera global.
  • render (render) - Panda render global.
  • entity (Avatar) - A Avatar in the 3D environment.
Returns: None
Overrides: object.__init__

update(self, deltaTime)

 

Update subsystems, tick from MainEngine used.

Parameters:
  • deltaTime (float) - The delta-time (time since last update) from MainEngine.
Returns: None

attachCameraView(self, cameraView)

 

Attach CameraView to the CameraControl. Reference to the CameraView will be stored in self._views and the name in self._viewOrder for cycle order of the views. If this is the first view, it is attached and loaded in as the active view.

Parameters:
Returns: None

detachCameraView(self, cameraViewName)

 

Detach CameraView from the CameraControl instance. Will delete the CameraView instance from self._views and remove it from self._viewOrder. If this is the last view in the CameraControl, no view will be active.

Parameters:
  • cameraViewName (string) - The name of the CameraView to detach from the CameraControl.
Returns: None

selectNextView(self)

 

Cycle method. Will select the next view according to the self._viewOrder list. Method will start at the top when reached end of list (cycle).

Returns: None

selectViewByName(self, cameraViewName)

 

Given a name, make a view active.

Parameters:
  • cameraViewName (string) - The name of the view to switch to
Returns: None.

setCursorVisibility(self, state)

 

Controls the visibility of the mouse cursor.

Parameters:
  • state (Boolean) - The state to set the Cursor visibility to.
Returns: None

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

entity

Getter for entity.

Get Method:
_getEntity(self) - Getter for entity.
Set Method:
_setEntity(self, newEntity) - Setter for entity.
Type:
Avatar