Untold Engine
Beta v0.0.16
docs
|
The U4DDirector class controls the updates and rendering of every game entity. It informs the engine of any touch event. It loads every shader used in the engine. More...
Public Member Functions | |
void | setDisplayWidthHeight (float uWidth, float uHeight) |
Method which sets the dimension of the display screen. More... | |
float | getDisplayHeight () |
Method which returns the height of the display screen. More... | |
float | getDisplayWidth () |
Method which returns the width of the display screen. More... | |
void | setMTLDevice (id< MTLDevice > uMTLDevice) |
Set the device required for Metal. More... | |
id< MTLDevice > | getMTLDevice () |
Gets the metal device. More... | |
void | setAspect (float uAspect) |
Sets the view aspect ratio for the window. More... | |
float | getAspect () |
Gets the window aspect ratio. More... | |
void | setMTLView (MTKView *uMTLView) |
Set the Metal View. More... | |
MTKView * | getMTLView () |
Gets the Metal View. More... | |
void | setPerspectiveSpace (U4DMatrix4n &uSpace) |
Set the perspective projection for the view. More... | |
void | setOrthographicSpace (U4DMatrix4n &uSpace) |
Set the orthographic projection for the view. More... | |
void | setOrthographicShadowSpace (U4DMatrix4n &uSpace) |
Set the orthographic projection for the shadow space. More... | |
U4DMatrix4n | getPerspectiveSpace () |
Get the perspective space of the view. More... | |
U4DMatrix4n | getOrthographicSpace () |
Get the orthographics space of the view. More... | |
U4DMatrix4n | getOrthographicShadowSpace () |
Get the orthographic space of the shadow. More... | |
U4DMatrix4n | computePerspectiveSpace (float fov, float aspect, float near, float far) |
Computes the perspective space of the view. More... | |
U4DMatrix4n | computeOrthographicSpace (float left, float right, float bottom, float top, float near, float far) |
Computes the orthographic space of the view. More... | |
U4DMatrix4n | computeOrthographicShadowSpace (float left, float right, float bottom, float top, float near, float far) |
Computes the orthographic space of the shadow. More... | |
void | determineVisibility () |
Determines if the 3D models are within the camera frustum. | |
void | setShadowBiasDepth (float uValue) |
Sets the bias depth for shadow rendering. More... | |
float | getShadowBiasDepth () |
Gets the shadow depth bias. More... | |
void | setPolycount (int uValue) |
sets the number of polygons the engien can render per 3d model. It is recommended to set this value as low as possible. Suggested and default value is 3000 More... | |
int | getPolycount () |
returns the number of polygons the engine can render per 3d model More... | |
void | setDeviceOSType (DEVICEOSTYPE &uDeviceOSType) |
Sets the current Device OS type. e.g., iOS or mac. More... | |
DEVICEOSTYPE | getDeviceOSType () |
Get the current device OS type. e.g, iOS or mac. More... | |
void | setGamePadControllerPresent (bool uValue) |
Sets the presence of a game pad controller. More... | |
bool | getGamePadControllerPresent () |
Gets if the presence of the game pad controller. More... | |
void | setModelsWithinFrustum (bool uValue) |
This method is set if any model, at least one, is within the camera frustum. More... | |
bool | getModelsWithinFrustum () |
Gets if any 3D model is within the camera frustum. More... | |
void | setScreenScaleFactor (float uScreenScaleFactor) |
float | getScreenScaleFactor () |
void | setFPS (float uFPS) |
sets the fps | |
float | getFPS () |
Static Public Member Functions | |
static U4DDirector * | sharedInstance () |
Method which returns an instance of the U4DDirector singleton. More... | |
Static Public Attributes | |
static U4DDirector * | instance =0 |
Instance for U4DDirector Singleton. | |
Protected Member Functions | |
U4DDirector () | |
Director Constructor. | |
~U4DDirector () | |
Director Destructor. | |
U4DDirector (const U4DDirector &value) | |
Copy constructor. | |
U4DDirector & | operator= (const U4DDirector &value) |
Copy constructor. | |
The U4DDirector class controls the updates and rendering of every game entity. It informs the engine of any touch event. It loads every shader used in the engine.
U4DMatrix4n U4DEngine::U4DDirector::computeOrthographicShadowSpace | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top, | ||
float | near, | ||
float | far | ||
) |
Computes the orthographic space of the shadow.
left | left plane |
right | right plane |
bottom | bottom plane |
top | top plane |
near | near plane |
far | far plane |
U4DMatrix4n U4DEngine::U4DDirector::computeOrthographicSpace | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top, | ||
float | near, | ||
float | far | ||
) |
Computes the orthographic space of the view.
left | left plane |
right | right plane |
bottom | bottom plane |
top | top plane |
near | near plane |
far | far plane |
U4DMatrix4n U4DEngine::U4DDirector::computePerspectiveSpace | ( | float | fov, |
float | aspect, | ||
float | near, | ||
float | far | ||
) |
Computes the perspective space of the view.
fov | Field of view in degrees |
aspect | Aspect ratio of the view window |
near | Near plane |
far | Far plane |
float U4DEngine::U4DDirector::getAspect | ( | ) |
Gets the window aspect ratio.
DEVICEOSTYPE U4DEngine::U4DDirector::getDeviceOSType | ( | ) |
Get the current device OS type. e.g, iOS or mac.
float U4DEngine::U4DDirector::getDisplayHeight | ( | ) |
Method which returns the height of the display screen.
float U4DEngine::U4DDirector::getDisplayWidth | ( | ) |
Method which returns the width of the display screen.
bool U4DEngine::U4DDirector::getGamePadControllerPresent | ( | ) |
Gets if the presence of the game pad controller.
bool U4DEngine::U4DDirector::getModelsWithinFrustum | ( | ) |
Gets if any 3D model is within the camera frustum.
id< MTLDevice > U4DEngine::U4DDirector::getMTLDevice | ( | ) |
Gets the metal device.
MTKView * U4DEngine::U4DDirector::getMTLView | ( | ) |
Gets the Metal View.
U4DEngine::U4DMatrix4n U4DEngine::U4DDirector::getOrthographicShadowSpace | ( | ) |
Get the orthographic space of the shadow.
U4DEngine::U4DMatrix4n U4DEngine::U4DDirector::getOrthographicSpace | ( | ) |
Get the orthographics space of the view.
U4DEngine::U4DMatrix4n U4DEngine::U4DDirector::getPerspectiveSpace | ( | ) |
Get the perspective space of the view.
int U4DEngine::U4DDirector::getPolycount | ( | ) |
returns the number of polygons the engine can render per 3d model
float U4DEngine::U4DDirector::getScreenScaleFactor | ( | ) |
float U4DEngine::U4DDirector::getShadowBiasDepth | ( | ) |
Gets the shadow depth bias.
void U4DEngine::U4DDirector::setAspect | ( | float | uAspect | ) |
Sets the view aspect ratio for the window.
uAspect | window aspect ratio |
void U4DEngine::U4DDirector::setDeviceOSType | ( | DEVICEOSTYPE & | uDeviceOSType | ) |
Sets the current Device OS type. e.g., iOS or mac.
uDeviceOSType | enum to the device type |
void U4DEngine::U4DDirector::setDisplayWidthHeight | ( | float | uWidth, |
float | uHeight | ||
) |
Method which sets the dimension of the display screen.
uWidth | display width |
uHeight | display height |
void U4DEngine::U4DDirector::setGamePadControllerPresent | ( | bool | uValue | ) |
Sets the presence of a game pad controller.
uValue | Set it to true if you wans to use the Game Pad Controller. False otherwise. |
void U4DEngine::U4DDirector::setModelsWithinFrustum | ( | bool | uValue | ) |
This method is set if any model, at least one, is within the camera frustum.
uValue | true if a 3D model is within the camera frustum |
void U4DEngine::U4DDirector::setMTLDevice | ( | id< MTLDevice > | uMTLDevice | ) |
Set the device required for Metal.
uMTLDevice | pointer to the device |
void U4DEngine::U4DDirector::setMTLView | ( | MTKView * | uMTLView | ) |
Set the Metal View.
uMTLView | pointer to the Metal view |
void U4DEngine::U4DDirector::setOrthographicShadowSpace | ( | U4DMatrix4n & | uSpace | ) |
Set the orthographic projection for the shadow space.
uSpace | orthographic projection (4x4 matrix) for the shadow |
void U4DEngine::U4DDirector::setOrthographicSpace | ( | U4DMatrix4n & | uSpace | ) |
Set the orthographic projection for the view.
uSpace | orthographic projection in a 4x4 matrix |
void U4DEngine::U4DDirector::setPerspectiveSpace | ( | U4DMatrix4n & | uSpace | ) |
Set the perspective projection for the view.
uSpace | perspective projection in a 4x4 matrix |
void U4DEngine::U4DDirector::setPolycount | ( | int | uValue | ) |
sets the number of polygons the engien can render per 3d model. It is recommended to set this value as low as possible. Suggested and default value is 3000
uValue | value representing the polycount |
void U4DEngine::U4DDirector::setScreenScaleFactor | ( | float | uScreenScaleFactor | ) |
void U4DEngine::U4DDirector::setShadowBiasDepth | ( | float | uValue | ) |
Sets the bias depth for shadow rendering.
uValue | bias depth |
|
static |
Method which returns an instance of the U4DDirector singleton.