U4DEngine::U4DSkybox class

The U4DSkyBox class represents skybox (cubemap) entities.

Base classes

class U4DVisibleEntity
The U4DVisibleEntity class represents all visible entities in a game.

Constructors, destructors, conversion operators

U4DSkybox()
Constructor of class.
~U4DSkybox()
Destructor of class.

Public functions

void initSkyBox(float uSize, const char* positiveXImage, const char* negativeXImage, const char* positiveYImage, const char* negativeYImage, const char* positiveZImage, const char* negativeZImage)
Method which initialized the skybox with the six images.
void render(id<MTLRenderCommandEncoder> uRenderEncoder) virtual
Renders the current entity.
void setSkyboxDimension(float uSize)
sets the skybox dimension

Public variables

U4DVertexData bodyCoordinates
Object which contains attribute data such as vertices, and uv-coordinates.
U4DTextureData textureInformation
Object which contains texture information.

Function documentation

void U4DEngine::U4DSkybox::initSkyBox(float uSize, const char* positiveXImage, const char* negativeXImage, const char* positiveYImage, const char* negativeYImage, const char* positiveZImage, const char* negativeZImage)

Method which initialized the skybox with the six images.

Parameters
uSize Size of skybox
positiveXImage Name of image for +x face
negativeXImage Name of image for -x face
positiveYImage Name of image for +y face
negativeYImage Name of image for -y face
positiveZImage Name of image for +z face
negativeZImage Name of image for -z face

void U4DEngine::U4DSkybox::render(id<MTLRenderCommandEncoder> uRenderEncoder) virtual

Renders the current entity.

Parameters
uRenderEncoder Metal encoder object for the current entity

Updates the space matrix and any rendering flags. It encodes the pipeline, buffers and issues the draw command

void U4DEngine::U4DSkybox::setSkyboxDimension(float uSize)

sets the skybox dimension

Parameters
uSize size of the skybox.