Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/rst/bge_types/bge.types.KX_Camera.rst')
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_Camera.rst23
1 files changed, 11 insertions, 12 deletions
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst b/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
index 8c8c68fc051..fc624419aea 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
@@ -78,8 +78,8 @@ base class --- :class:`KX_GameObject`
This camera's 4x4 projection matrix.
.. note::
-
- This is the identity matrix prior to rendering the first frame (any Python done on frame 1).
+
+ This is the identity matrix prior to rendering the first frame (any Python done on frame 1).
:type: 4x4 Matrix [[float]]
@@ -90,7 +90,7 @@ base class --- :class:`KX_GameObject`
:type: 4x4 Matrix [[float]]
.. note::
-
+
This matrix is regenerated every frame from the camera's position and orientation. Also, this is the identity matrix prior to rendering the first frame (any Python done on frame 1).
.. attribute:: camera_to_world
@@ -100,7 +100,7 @@ base class --- :class:`KX_GameObject`
:type: 4x4 Matrix [[float]]
.. note::
-
+
This matrix is regenerated every frame from the camera's position and orientation.
.. attribute:: world_to_camera
@@ -110,11 +110,11 @@ base class --- :class:`KX_GameObject`
:type: 4x4 Matrix [[float]]
.. note::
-
+
Regenerated every frame from the camera's position and orientation.
.. note::
-
+
This is camera_to_world inverted.
.. attribute:: useViewport
@@ -143,7 +143,7 @@ base class --- :class:`KX_GameObject`
from bge import logic
cont = logic.getCurrentController()
cam = cont.owner
-
+
# A sphere of radius 4.0 located at [x, y, z] = [1.0, 1.0, 1.0]
if (cam.sphereInsideFrustum([1.0, 1.0, 1.0], 4) != cam.OUTSIDE):
# Sphere is inside frustum !
@@ -160,7 +160,7 @@ base class --- :class:`KX_GameObject`
:return: :data:`~bge.types.KX_Camera.INSIDE`, :data:`~bge.types.KX_Camera.OUTSIDE` or :data:`~bge.types.KX_Camera.INTERSECT`
.. note::
-
+
When the camera is first initialized the result will be invalid because the projection matrix has not been set.
.. code-block:: python
@@ -179,13 +179,13 @@ base class --- :class:`KX_GameObject`
box.append([ 1.0, -1.0, 1.0])
box.append([ 1.0, 1.0, -1.0])
box.append([ 1.0, 1.0, 1.0])
-
+
if (cam.boxInsideFrustum(box) != cam.OUTSIDE):
# Box is inside/intersects frustum !
# Do something useful !
else:
# Box is outside the frustum !
-
+
.. method:: pointInsideFrustum(point)
Tests the given point against the view frustum.
@@ -196,7 +196,7 @@ base class --- :class:`KX_GameObject`
:rtype: boolean
.. note::
-
+
When the camera is first initialized the result will be invalid because the projection matrix has not been set.
.. code-block:: python
@@ -297,4 +297,3 @@ base class --- :class:`KX_GameObject`
# Gets an object with a property "wall" in front of the camera within a distance of 100:
target = camera.getScreenRay(0.5, 0.5, 100, "wall")
-