Module MyGameObjects :: Class MY_GameCamera
[hide private]
[frames] | no frames]

Class MY_GameCamera

source code

class for all the cameras used in the game

Instance Methods [hide private]
 
__init__(self, scene, element) source code
String
pointInsideFrustum(self, point)
checks if a given point is inside the cameras frustum
source code
Integer
boxInsideFrustum(self, box)
checks if a given box is inside/intersect/outside the cameras frustum
source code
 
setLocalOrientation(self, orientation)
sets the local orientation
source code
Vector
getPosition(self)
gets the local position
source code
 
deleteObject(self)
deletes the object and removes it from the scene
source code
Instance Variables [hide private]
KX_GameObject gObject
a blender game object
String name
the name that represents the object in MY_SingleScene
String type
a name which identifies the object as a specific class in MY_SingleScene
Method Details [hide private]

__init__(self, scene, element)
(Constructor)

source code 
Parameters:
  • scene (KX_Scene) - the blender scene object which holds all objects
  • element (String) - the name of the object

pointInsideFrustum(self, point)

source code 

checks if a given point is inside the cameras frustum

Parameters:
  • point (Vector) - the point that will be checked if it is inside the camera frustum
Returns: String
  • returns OUTSIDE, if point is outside
  • returns INSIDE, if point is inside

boxInsideFrustum(self, box)

source code 

checks if a given box is inside/intersect/outside the cameras frustum

Parameters:
  • box (List of Vectors) - the box parameters that will be checked
Returns: Integer
  • returns 0, if box is outside
  • returns 2, if box intersects
  • returns 1, if box is inside

setLocalOrientation(self, orientation)

source code 

sets the local orientation

Parameters:
  • orientation (Matrix) - the new 3x3 orientation matrix

getPosition(self)

source code 

gets the local position

Returns: Vector
the vector of the current local position