"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

GeeXLab

Laboratory for Real Time 3D Programming (prototyping and demos)
OpenGL, Lua, Python, GLSL,
PhysX and more...

Reference Guide
XML Nodes



» Back to homepage
» Back to Developer's Guide Index

<camera> XML Node


XML Node Summary
<camera
  name=""
  navigation_mode="FLY"
  active="TRUE"
  fov="60.0"
  mouse_move_speed="0.2"
  mouse_wheel_speed="50.0"
  pan_speed="0.5"
  keyboard_speed="200.0"
  display_position="FALSE"
  display_view_direction="FALSE"
  display_orientation="FALSE"
  near_plane="1.0"
  far_plan="4000.0"
  target_object=""
  frustum_culling_test_shap="BOUNDING_SPHERE"
  inertia="TRUE"
  linear_speed="100.0"
  inertia_linear_damping="500.0"
  >
  <add_child
    name=""
    >
  </add_child>
  <position
    x="0.0"
    y="0.0"
    z="0.0"
    >
  </position>
  <limit_position
    x_min="-10000.0"
    y_min="-10000.0"
    z_min="-10000.0"
    x_max="10000.0"
    y_max="10000.0"
    z_max="10000.0"
    >
  </limit_position>
  <limit_angle
    pitch_min="-80.0"
    pitch_max="80.0"
    >
  </limit_angle>
  <lookat
    x="0.0"
    y="0.0"
    z="0.0"
    w="1.0"
    >
  </lookat>
  <orientation
    pitch="0.0"
    yaw="0.0"
    roll="0.0"
    >
  </orientation>
  <bkg_color
    r="0.0"
    g="0.0"
    b="0.0"
    >
  </bkg_color>
  <up
    x="0.0"
    y="1.0"
    z="0.0"
    >
  </up>
  <viewport
    x="0"
    y="0"
    width="1024"
    height="768"
    >
  </viewport>
</camera>


<camera>

Description
The camera node is one of the most important nodes of the GeeXLab XML script. It makes it possible to specify the entity by which the 3d scene can be seen. A camera is mainly defined by a position in the 3D space, a point of vision (lookat), a field of vision (fov) and by clipping planes (near and far clipping plane). Several cameras can be declared, but only the one which has an active state will be taken into account. Other cameras can also be activated with a scripting code (LUA, Python).

camera element has 18 attributes and 9 sub-element(s)

Attributes
  • name [STRING]: Name of camera
  • navigation_mode [ENUM]: navigation mode of the camera - Default value = FLY - Values = WALK, ORBIT, FLY, FLY_FPS
  • active [BOOLEAN]: activates(TRUE) or desactivates (FALSE) the camera - Default value = TRUE - Values = TRUE|FALSE
  • fov [REAL]: Set the Field Of View in degrees - Default value = 60.0
  • mouse_move_speed [REAL]: sensibility of mouse movement for rotations. - Default value = 0.2
  • mouse_wheel_speed [REAL]: sensibility of mousewheel for the backward and forward move. - Default value = 50.0
  • pan_speed [REAL]: sensibility of for camera paning (pan = [CTRL] + move mouse). - Default value = 0.5
  • keyboard_speed [REAL]: sensibility of keyboard for the backward, forward and strafe. - Default value = 200.0
  • display_position [BOOLEAN]: activates (TRUE) or desactivates (FALSE - default) the display of camera position (x, y and z) in the left upper part of the 3D viewport. - Default value = FALSE - Values = TRUE|FALSE
  • display_view_direction [BOOLEAN]: activates (TRUE) or desactivates (FALSE - default) the display of camera view vector (x,y and z) in the left upper part of the 3D viewport. - Default value = FALSE - Values = TRUE|FALSE
  • display_orientation [BOOLEAN]: activates (TRUE) or desactivates (FALSE - default) the display of camera orientation (Euler angles :pitch yaw and roll in the left upper part of the 3D viewport. - Default value = FALSE - Values = TRUE|FALSE
  • near_plane [REAL]: Distance of the camera's near clipping plane (on Z axis ). Objects located in front of this plane won't be displayed (it's near plane clipping). - Default value = 1.0
  • far_plan [REAL]: Distance of the camera's far clipping plane (on Z axis ). Objects located beyond this plane won't be displayed (it's far plane clipping) - Default value = 4000.0
  • target_object [STRING]: Name of object aimed at by camera. The object toward which points the camera view vector. Allows to keep an specific object in the camera's vision field. This name must be a valid node reference.
  • frustum_culling_test_shap [ENUM]: Specify the kind of bounding volume used in clipping tests. - Default value = BOUNDING_SPHERE - Values = BOUNDING_SPHERE|BOUNDING_BOX
  • inertia [BOOLEAN]: Activates (TRUE - default) or desactivates (FALSE) inertia for the camera translation moves. - Default value = TRUE - Values = TRUE|FALSE
  • linear_speed [REAL]: Sets the camera linear speed de la caméra (in units per second). Has same effect as for keyboard_speed. - Default value = 100.0
  • inertia_linear_damping [REAL]: Sets the linear speed damping factor (in units per second). - Default value = 500.0

Code sample :

<camera name="myCamera" navigation_mode="EXAMINE" fov="60.0" >
<position x="0.0" y="20.0" z="100.0" />
<orientation pitch="20.0" yaw="90.0" />
<lookat x="0.0" y="0.0" z="0.0" w="1.0" />
</camera>

<add_child>

Description
add_child adds a child to the current camera. Allows to build easily complex hierarchies. Any transformation (rotation or translation) affecting the current camera will affect childrens. This node is useful for making demos in the Doom-Like style with an object (a rifle for example)attached as child to the camera.

add_child element has 1 attributes and 0 sub-element(s)

Attributes
  • name [STRING]: Nom de l'objet enfant.

<position>

Description
Sets the position in the 3D scene.

position element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Coordinate in X of the position in the 3D scene. - Default value = 0.0
  • y [REAL]: Coordinate in Y of the position in the 3D scene. - Default value = 0.0
  • z [REAL]: Coordinate in Z of the position in the 3D scene. - Default value = 0.0

<limit_position>

Description
limit_position allows to define a 3D volume for the camera positions in the 3D scene. This tag has no child element but xml attributes.

limit_position element has 6 attributes and 0 sub-element(s)

Attributes
  • x_min [REAL]: Minimal limit position in X. It corresponds to the bottom left corner of the parallelepiped. - Default value = -10000.0
  • y_min [REAL]: Minimal limit position in Y. It corresponds to the bottom left corner of the parallelepiped. - Default value = -10000.0
  • z_min [REAL]: Minimal limit position in Z. It corresponds to the bottom left corner of the parallelepiped. - Default value = -10000.0
  • x_max [REAL]: Maximal limit position in X. It corresponds to the up right corner of the parallelepiped. - Default value = 10000.0
  • y_max [REAL]: Maximal limit position in Y. It corresponds to the up right corner of the parallelepiped. - Default value = 10000.0
  • z_max [REAL]: Maximal limit position in Z. It corresponds to the up right corner of the parallelepiped. - Default value = 10000.0

<limit_angle>

Description
limit_angle sets the limit rotation angles of a camera. This instruction is mainly used with the ORBIT mode to limit the camera's pitch. Useful to limit the camera's view close to ground level.

limit_angle element has 2 attributes and 0 sub-element(s)

Attributes
  • pitch_min [REAL]: minimal pitch angle in degres. - Default value = -80.0
  • pitch_max [REAL]: maximal pitch angle in degres. - Default value = 80.0

<lookat>

Description
lookat allows to place the vision point of the camera in the 3D scene space. The 4D vector lookat can be used in 2 diferent ways: if w coordinate equals 1.0: lookat represents a position in the 3D scene. if w coordinate equals 0.0: lookat represents the view vector direction.

lookat element has 4 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Coordinate in X for the camera's lookat point. - Default value = 0.0
  • y [REAL]: Coordinate in Y for the camera's lookat point. - Default value = 0.0
  • z [REAL]: Coordinate in Z for the camera's lookat point. - Default value = 0.0
  • w [REAL]: Coordinate in W for the camera's lookat point. - Default value = 1.0

<orientation>

Description
Orientation sets the initial orientation of the camera. Depending of the navigation mode (FLY or ORBIT) this orientation is interpreted in 2 diferent ways. In mode FLY, the pitch, yaw et roll angles are interpreted in the classical ways and represent a rotation around the local tripod axis of camera. In ORBIT mode, these angles represent a rotation around the absolute axis of the 3D world and rollangle roll is not taken into account. Furthemore in ORBIT mode, an initial offset of 90.0 degrees is set for yaw.

orientation element has 3 attributes and 0 sub-element(s)

Attributes
  • pitch [REAL]: rotation angle in degrees around X axis. - Default value = 0.0
  • yaw [REAL]: rotation angle in degrees around Y axis. - Default value = 0.0
  • roll [REAL]: rotation angle in degrees around Z axis. - Default value = 0.0

<bkg_color>

Description
bkg_color sets the background color for a camera.

bkg_color element has 3 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: Red component of color. Floating value comprised between 0.0 and 1.0 - Default value = 0.0
  • g [REAL]: Green component of color. Floating value comprised between 0.0 and 1.0 - Default value = 0.0
  • b [REAL]: Blue component of color. Floating value comprised between 0.0 and 1.0 - Default value = 0.0

<up>

Description
Up specify the orientation vector of a camera.

up element has 3 attributes and 0 sub-element(s)

Attributes
  • x [REAL]: Coordinate in X of the camera orientation vector. - Default value = 0.0
  • y [REAL]: Coordinate in Y of the camera orientation vector. - Default value = 1.0
  • z [REAL]: Coordinate in Z of the camera orientation vector. - Default value = 0.0

<viewport>

Description
viewport sets the portion of screen in which the 3D scene is rendered. By defaut viewport dimensions are assigned the 3D client zone as set in the node and the element

viewport element has 4 attributes and 0 sub-element(s)

Attributes
  • x [INTEGER]: coordinate in X for the left_down corner of the viewport. - Default value = 0
  • y [INTEGER]: coordinate in Y for the left_down corner of the viewport. - Default value = 0
  • width [INTEGER]: width of viewport. - Default value = 1024
  • height [INTEGER]: height of viewport. - Default value = 768
Random Projects

Gaussian Blur PostFX
Gaussian Blur PostFX

Chromatic Aberration
Chromatic Aberration

Pixelation PostFX
Pixelation PostFX


Random Code Samples

Simple Bump Mapping
Simple Bump Mapping

Shadow Mapping
Shadow Mapping

3D fonts
3D fonts



(C)2009-2010 Geeks3D.com