Untold Engine
Beta v0.0.16
docs
|
The U4DRenderGeometry manages the rendering of geometric entities such as cubes, spheres, etc. More...
Inherits U4DEngine::U4DRenderEntity.
Public Member Functions | |
U4DRenderGeometry (U4DBoundingVolume *uU4DGeometricObject) | |
Constructor for class. More... | |
~U4DRenderGeometry () | |
Destructor for the class. | |
bool | loadMTLBuffer () |
Loads the attributes and Uniform data. More... | |
void | updateSpaceUniforms () |
Updates the space matrix of the entity. More... | |
void | loadMTLAdditionalInformation () |
Loads additional information into buffer. More... | |
void | render (id< MTLRenderCommandEncoder > uRenderEncoder) |
Renders the current entity. More... | |
void | updateRenderingInformation () |
Updates the geometry rendering data. More... | |
void | modifyRenderingInformation () |
Modifies geometry rendering data if required. More... | |
void | alignedAttributeData () |
Aligns attribute data. More... | |
void | setGeometryLineColor (U4DVector4n &uGeometryLineColor) |
Sets the color for the geometry. More... | |
void | clearModelAttributeData () |
Clears the attribute container. More... | |
Public Member Functions inherited from U4DEngine::U4DRenderEntity | |
U4DRenderEntity () | |
Constructor for the U4DRenderEntity. More... | |
virtual | ~U4DRenderEntity () |
Destructor for the U4DRenderEntity. More... | |
void | loadRenderingInformation () |
Sends attributes information to the GPU. More... | |
virtual void | loadMTLTexture () |
Loads image texture into GPU. More... | |
virtual void | updateAllUniforms () |
virtual void | createTextureObject (id< MTLTexture > &uTextureObject) |
Creates a texture object to be applied to an entity. More... | |
void | createSamplerObject (id< MTLSamplerState > &uSamplerStateObject, MTLSamplerDescriptor *uSamplerDescriptor) |
Creates a sampler object required for texturing. More... | |
void | clearRawImageData () |
Clear the raw image data. More... | |
virtual void | initTextureSamplerObjectNull () |
Initializes texture sampler object to null. More... | |
void | setIsWithinFrustum (bool uValue) |
Sets property used to determine if entity is within frustum. More... | |
void | setRawImageData (std::vector< unsigned char > uRawImageData) |
void | setImageWidth (unsigned int uImageWidth) |
void | setImageHeight (unsigned int uImageHeight) |
bool | createTextureAndSamplerObjects (id< MTLTexture > &uTextureObject, id< MTLSamplerState > &uSamplerStateObject, MTLSamplerDescriptor *uSamplerDescriptor, std::string uTextureName) |
void | setPipelineForPass (std::string uPipelineName, int uRenderPassKey) |
void | removePassPipelinePair (int uRenderPassKey) |
U4DRenderPipelineInterface * | getPipeline (int uRenderPassKey) |
Additional Inherited Members | |
Protected Attributes inherited from U4DEngine::U4DRenderEntity | |
id< MTLDevice > | mtlDevice |
Pointer representing a Metal Device. | |
id< MTLBuffer > | attributeBuffer |
Pointer to the attribute buffer. | |
id< MTLBuffer > | indicesBuffer |
Pointer to the index buffer. | |
id< MTLBuffer > | uniformSpaceBuffer |
Pointer to the Uniform that holds the Space matrix. | |
bool | eligibleToRender |
Variable to determine if object should be rendered. | |
bool | isWithinFrustum |
Variable to determine if the 3D object is within the frustum. | |
std::vector< unsigned char > | rawImageData |
buffer for the raw image data of a texture | |
unsigned int | imageWidth |
Width of the texture image. | |
unsigned int | imageHeight |
Height of the texture image. | |
std::map< int, U4DRenderPipelineInterface * > | renderPassPipelineMap |
The U4DRenderGeometry manages the rendering of geometric entities such as cubes, spheres, etc.
U4DEngine::U4DRenderGeometry::U4DRenderGeometry | ( | U4DBoundingVolume * | uU4DGeometricObject | ) |
Constructor for class.
Sets the bounding volume the class will manate
void U4DEngine::U4DRenderGeometry::alignedAttributeData | ( | ) |
Aligns attribute data.
Aligns the vertices before sending them to the GPU
|
virtual |
Clears the attribute container.
clears vertices containers
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Loads additional information into buffer.
loads the color of the geometrical shape
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Loads the attributes and Uniform data.
It prepares the attribute data so that it is aligned. It then loads the attributes into a buffer. It also loads uniform data into a buffer
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Modifies geometry rendering data if required.
This method is called by the U4DBoundingVolume class. If the attribute container size changes, it loads a new set of attributes.
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Renders the current entity.
Updates the space matrix, any rendering flags, bones and shadows properties. It encodes the pipeline, buffers and issues the draw command
uRenderEncoder | Metal encoder object for the current entity |
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Sets the color for the geometry.
Sets the line color used for rendering the geometrical figure
uGeometryLineColor | line color |
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Updates the geometry rendering data.
This method is called by the geometry U4DBoundingVolume class whenever the data changes
Reimplemented from U4DEngine::U4DRenderEntity.
|
virtual |
Updates the space matrix of the entity.
Updates the model space matrix of the entity by computing the world, view and perspective space matrix
Reimplemented from U4DEngine::U4DRenderEntity.