Torque3D Documentation / _generateds / gameFunctions.h

gameFunctions.h

Engine/source/T3D/gameFunctions.h

More...

Public Functions

Gets the camera field of view angle.

bool

Gets the position, rotation, and velocity of the camera.

bool

Does the same thing as GameGetCameraTransform, but fills in other data including information about the far and near clipping planes.

Renders overlays such as damage flashes, white outs, and water masks.

Actually renders the world.

Sets the field of view angle of the camera.

Sets where the camera fov will be change to.

Update the camera fov to be closer to the target fov.

renderFrame(GFXTextureTargetRef * target, MatrixF transform, Frustum frustum, U32 typeMask, ColorI canvasClearColor)

Does a full, top-to-bottom call to render a frame.

Detailed Description

Public Functions

GameGetCameraFov()

Gets the camera field of view angle.

GameGetCameraTransform(MatrixF * mat, Point3F * velocity)

Gets the position, rotation, and velocity of the camera.

GameProcessCameraQuery(CameraQuery * query)

Does the same thing as GameGetCameraTransform, but fills in other data including information about the far and near clipping planes.

GameRenderFilters(const CameraQuery & camq)

Renders overlays such as damage flashes, white outs, and water masks.


These are usually a color applied over the entire screen.

GameRenderWorld()

Actually renders the world.

This is the function that will render the scene ONLY - new guis, no damage flashes.

GameSetCameraFov(F32 fov)

Sets the field of view angle of the camera.

GameSetCameraTargetFov(F32 fov)

Sets where the camera fov will be change to.

This is for non-instantaneous zooms/retractions.

GameUpdateCameraFov()

Update the camera fov to be closer to the target fov.

renderFrame(GFXTextureTargetRef * target, MatrixF transform, Frustum frustum, U32 typeMask, ColorI canvasClearColor)

Does a full, top-to-bottom call to render a frame.

This does all the setup to make a render happen Allowing setting of a intended render target, a view transform, the view frustum, resolution, objects-to-render typemask, and the clear color

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _GAMEFUNCTIONS_H_
25#define _GAMEFUNCTIONS_H_
26
27#ifndef _MPOINT3_H_
28#include "math/mPoint3.h"
29#endif
30#ifndef _MMATRIX_H_
31#include "math/mMatrix.h"
32#endif
33#ifndef _GFXTARGET_H_
34#include "gfx/gfxTarget.h"
35#endif
36#ifndef _MATHUTIL_FRUSTUM_H_
37#include "math/util/frustum.h"
38#endif
39#ifndef _COLOR_H_
40#include "core/color.h"
41#endif
42
43struct CameraQuery;
44
45
46/// Actually renders the world.  This is the function that will render the
47/// scene ONLY - new guis, no damage flashes.
48void GameRenderWorld();
49
50/// Does a full, top-to-bottom call to render a frame. This does all the setup to make a render happen
51/// Allowing setting of a intended render target, a view transform, the view frustum, resolution, objects-to-render typemask, and the clear color
52void renderFrame(GFXTextureTargetRef* target, MatrixF transform, Frustum frustum, U32 typeMask, ColorI canvasClearColor);
53
54/// Renders overlays such as damage flashes, white outs, and water masks.  
55/// These are usually a color applied over the entire screen.
56void GameRenderFilters(const CameraQuery& camq);
57
58/// Does the same thing as GameGetCameraTransform, but fills in other data 
59/// including information about the far and near clipping planes.
60bool GameProcessCameraQuery(CameraQuery *query);
61
62/// Gets the position, rotation, and velocity of the camera.
63bool GameGetCameraTransform(MatrixF *mat, Point3F *velocity);
64
65/// Gets the camera field of view angle.
66F32 GameGetCameraFov();
67
68/// Sets the field of view angle of the camera.
69void GameSetCameraFov(F32 fov);
70
71/// Sets where the camera fov will be change to.  This is for 
72/// non-instantaneous zooms/retractions.
73void GameSetCameraTargetFov(F32 fov);
74
75/// Update the camera fov to be closer to the target fov.
76void GameUpdateCameraFov();
77
78#endif // _GAMEFUNCTIONS_H_
79