Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DResourceLoader Class Reference

The U4DResourceLoader class is in charge of importing 3D model assets . More...

Public Member Functions

bool loadSceneData (std::string uFilepath)
 Method which loads all scene asset data into the game. More...
 
bool loadAnimationData (std::string uFilepath)
 Method which loads the 3D model animation information. More...
 
bool loadTextureData (std::string uFilepath)
 Method which loads texture data information. More...
 
bool loadParticleData (std::string uFilepath)
 Method which loads particle data information. More...
 
bool loadFontData (std::string uFilepath)
 Method that loads font data information. More...
 
bool loadLightData (std::string uFilepath)
 
bool loadParticeToParticleSystem (U4DParticleSystem *uParticleSystem, std::string uParticleName)
 Method which loads all particle asset information into the particle entity. More...
 
bool loadFontToText (U4DText *uText, std::string uFontName)
 Method that loads font asset information into the text entity. More...
 
bool loadAssetToMesh (U4DModel *uModel, std::string uMeshName)
 Method which loads all 3D asset information into the 3D model entity. More...
 
bool loadAnimationToMesh (U4DAnimation *uAnimation, std::string uAnimationName)
 Method which loads the 3D model animation information. More...
 
CONVEXHULL loadConvexHullForMesh (U4DModel *uModel)
 
void loadVerticesData (U4DModel *uModel, std::vector< float > uVertices)
 Method which loads the 3D model vertices. More...
 
void loadNormalData (U4DModel *uModel, std::vector< float > uNormals)
 Method which loads the 3D model Normal vertices. More...
 
void loadUVData (U4DModel *uModel, std::vector< float > uUV)
 Method which loads the 3D model uv coordinates. More...
 
void loadIndexData (U4DModel *uModel, std::vector< int > uIndex)
 Method which loads the 3D model indices data to properly render the model. More...
 
void loadMaterialIndexData (U4DModel *uModel, std::vector< int > uMaterialIndex)
 Method which loads the index information for each material used by the 3D model entity. More...
 
void loadDiffuseColorData (U4DModel *uModel, std::vector< float > uDiffuseColor)
 Method which loads the 3D model diffuse material color information. More...
 
void loadSpecularColorsData (U4DModel *uModel, std::vector< float > uSpecularColor)
 Method which loads the 3D model specular material color information. More...
 
void loadDiffuseIntensityData (U4DModel *uModel, std::vector< float > uDiffuseIntensity)
 Method which loads the 3D model diffuse material intensity information. More...
 
void loadSpecularIntensityData (U4DModel *uModel, std::vector< float > uSpecularIntesity)
 Method which loads the 3D model specular material intensity information. More...
 
void loadSpecularHardnessData (U4DModel *uModel, std::vector< float > uSpecularHardness)
 Method which loads the 3D model specular material shininess information. More...
 
void loadDimensionDataToBody (U4DModel *uModel, std::vector< float > uDimension)
 Method which loads the 3D model dimension information. More...
 
void loadEntityMatrixSpace (U4DEntity *uModel, std::vector< float > uLocalMatrix)
 Method which loads the Entity matrix space-Orientation and translation. More...
 
void loadMeshVerticesData (U4DModel *uModel, std::vector< float > uMeshVertices)
 Method to load Mesh Vertex data. Currently used to create an octree around the character. More...
 
void loadMeshEdgesData (U4DModel *uModel, std::vector< int > uMeshEdgesIndex)
 Method to load Mesh Edges index data. Currently used to create an octree around the character. More...
 
void loadMeshFacesData (U4DModel *uModel, std::vector< int > uMeshFacesIndex)
 Method to load Mesh Faces index data. Currently used to create an octree around the character. More...
 
void loadSpaceData (U4DMatrix4n &uMatrix, std::vector< float > uSpaceData)
 Method which loads space data-Orientation/translation. More...
 
void loadSpaceData (U4DDualQuaternion &uSpace, std::vector< float > uSpaceData)
 Method which loads space data-Orientation/translation. More...
 
void loadVertexBoneWeightsToBody (std::vector< float > &uVertexWeights, std::vector< float > uWeights)
 Method which loads the 3D model armature bone weights. More...
 
void loadNormalMap (U4DModel *uModel, std::string uNormalMapName)
 
bool loadTextureDataToEntity (U4DRenderEntity *uRenderEntity, const char *uTextureName)
 
void clear ()
 Clears the data in the containers.
 

Static Public Member Functions

static U4DResourceLoadersharedInstance ()
 Shared Instance for the digital asset loader Singleton.
 

Public Attributes

std::vector< TEXTURESRAWtexturesContainer
 Container holding all the textures used in the scene.
 

Static Public Attributes

static U4DResourceLoaderinstance =0
 Instance for the digital asset loader Singleton.
 

Protected Member Functions

 U4DResourceLoader ()
 Constructor for the digital asset loader.
 
 ~U4DResourceLoader ()
 Destructor for the digital asset loader.
 

Detailed Description

The U4DResourceLoader class is in charge of importing 3D model assets .

Member Function Documentation

◆ loadAnimationData()

bool U4DEngine::U4DResourceLoader::loadAnimationData ( std::string  uFilepath)

Method which loads the 3D model animation information.

Parameters
uFilepathName of the binary file containing animation data
Returns
Returns true if the animation was successfully loaded

◆ loadAnimationToMesh()

bool U4DEngine::U4DResourceLoader::loadAnimationToMesh ( U4DAnimation uAnimation,
std::string  uAnimationName 
)

Method which loads the 3D model animation information.

Parameters
uAnimationanimation information to load
uAnimationNameName of the animation to load
Returns
Returns true if the animation was successfully loaded into the 3D model

◆ loadAssetToMesh()

bool U4DEngine::U4DResourceLoader::loadAssetToMesh ( U4DModel uModel,
std::string  uMeshName 
)

Method which loads all 3D asset information into the 3D model entity.

Parameters
uModel3D model entity
uMeshNameName of the 3D model given by the modeling software
Returns
Returns true if the 3D assets were loaded successfully into the 3D entity

◆ loadDiffuseColorData()

void U4DEngine::U4DResourceLoader::loadDiffuseColorData ( U4DModel uModel,
std::vector< float >  uDiffuseColor 
)

Method which loads the 3D model diffuse material color information.

Parameters
uModel3D model entity
uDiffuseColorData containing the diffuse material color information

◆ loadDiffuseIntensityData()

void U4DEngine::U4DResourceLoader::loadDiffuseIntensityData ( U4DModel uModel,
std::vector< float >  uDiffuseIntensity 
)

Method which loads the 3D model diffuse material intensity information.

Parameters
uModel3D model entity
uDiffuseIntensityData containing the diffuse intensity information

◆ loadDimensionDataToBody()

void U4DEngine::U4DResourceLoader::loadDimensionDataToBody ( U4DModel uModel,
std::vector< float >  uDimension 
)

Method which loads the 3D model dimension information.

Parameters
uModel3D model entity
uDimensionData containing the dimension of the 3D model

◆ loadEntityMatrixSpace()

void U4DEngine::U4DResourceLoader::loadEntityMatrixSpace ( U4DEntity uModel,
std::vector< float >  uLocalMatrix 
)

Method which loads the Entity matrix space-Orientation and translation.

Parameters
uModel3D model entity
uLocalMatrixData containing the matrix space information

◆ loadFontData()

bool U4DEngine::U4DResourceLoader::loadFontData ( std::string  uFilepath)

Method that loads font data information.

Parameters
uFilepathName of the binary file containing font data
Returns
true if the font data was successfully loaded

◆ loadFontToText()

bool U4DEngine::U4DResourceLoader::loadFontToText ( U4DText uText,
std::string  uFontName 
)

Method that loads font asset information into the text entity.

Parameters
uTexttext entity
uFontNameName of the font asst
Returns
true if the font data entity was loaded successfully inot the text entity

◆ loadIndexData()

void U4DEngine::U4DResourceLoader::loadIndexData ( U4DModel uModel,
std::vector< int >  uIndex 
)

Method which loads the 3D model indices data to properly render the model.

Parameters
uModel3D model entity
uIndexContainer containing the indices data

◆ loadLightData()

bool U4DEngine::U4DResourceLoader::loadLightData ( std::string  uFilepath)

◆ loadMaterialIndexData()

void U4DEngine::U4DResourceLoader::loadMaterialIndexData ( U4DModel uModel,
std::vector< int >  uMaterialIndex 
)

Method which loads the index information for each material used by the 3D model entity.

Parameters
uModel3D model entity
uMaterialIndexindex information for each material used by the 3D entity

◆ loadMeshEdgesData()

void U4DEngine::U4DResourceLoader::loadMeshEdgesData ( U4DModel uModel,
std::vector< int >  uMeshEdgesIndex 
)

Method to load Mesh Edges index data. Currently used to create an octree around the character.

Parameters
uModel3D model entity
uMeshEdgesIndexData containing the mesh edges indices

◆ loadMeshFacesData()

void U4DEngine::U4DResourceLoader::loadMeshFacesData ( U4DModel uModel,
std::vector< int >  uMeshFacesIndex 
)

Method to load Mesh Faces index data. Currently used to create an octree around the character.

Parameters
uModel3D model entity
uMeshFacesIndexData containing the mesh faces indices

◆ loadMeshVerticesData()

void U4DEngine::U4DResourceLoader::loadMeshVerticesData ( U4DModel uModel,
std::vector< float >  uMeshVertices 
)

Method to load Mesh Vertex data. Currently used to create an octree around the character.

Parameters
uModel3D model entity
uMeshVerticesData containing the mesh vertices

◆ loadNormalData()

void U4DEngine::U4DResourceLoader::loadNormalData ( U4DModel uModel,
std::vector< float >  uNormals 
)

Method which loads the 3D model Normal vertices.

Parameters
uModel3D model entity
uNormalsContainer containing the Normal vertices

◆ loadParticeToParticleSystem()

bool U4DEngine::U4DResourceLoader::loadParticeToParticleSystem ( U4DParticleSystem uParticleSystem,
std::string  uParticleName 
)

Method which loads all particle asset information into the particle entity.

Parameters
uParticleSystemparticle system
uParticleNameName of the particle given by the particle software
Returns
Returns true if the particle data entity was loaded successfully into the particle system

◆ loadParticleData()

bool U4DEngine::U4DResourceLoader::loadParticleData ( std::string  uFilepath)

Method which loads particle data information.

Parameters
uFilepathName of the binary file containing particle data
Returns
Returns true if the particle data was successfully loaded

◆ loadSceneData()

bool U4DEngine::U4DResourceLoader::loadSceneData ( std::string  uFilepath)

Method which loads all scene asset data into the game.

Parameters
uFilepathName of the binary file containing scene data
Returns
Returns true if the scene assets were loaded successfully

◆ loadSpaceData() [1/2]

void U4DEngine::U4DResourceLoader::loadSpaceData ( U4DDualQuaternion uSpace,
std::vector< float >  uSpaceData 
)

Method which loads space data-Orientation/translation.

Parameters
uSpaceDual quaternion object receiving the space data
uSpaceDataData containing space information

◆ loadSpaceData() [2/2]

void U4DEngine::U4DResourceLoader::loadSpaceData ( U4DMatrix4n uMatrix,
std::vector< float >  uSpaceData 
)

Method which loads space data-Orientation/translation.

Parameters
uMatrix4x4 matrix object receiving the space data
uSpaceDataData containing space information

◆ loadSpecularColorsData()

void U4DEngine::U4DResourceLoader::loadSpecularColorsData ( U4DModel uModel,
std::vector< float >  uSpecularColor 
)

Method which loads the 3D model specular material color information.

Parameters
uModel3D model entity
uSpecularColorData containing the specular material color information

◆ loadSpecularHardnessData()

void U4DEngine::U4DResourceLoader::loadSpecularHardnessData ( U4DModel uModel,
std::vector< float >  uSpecularHardness 
)

Method which loads the 3D model specular material shininess information.

Parameters
uModel3D model entity
uSpecularHardnessData containing the specular shininess information

◆ loadSpecularIntensityData()

void U4DEngine::U4DResourceLoader::loadSpecularIntensityData ( U4DModel uModel,
std::vector< float >  uSpecularIntesity 
)

Method which loads the 3D model specular material intensity information.

Parameters
uModel3D model entity
uSpecularIntesityData containing the specular intensity information

◆ loadTextureData()

bool U4DEngine::U4DResourceLoader::loadTextureData ( std::string  uFilepath)

Method which loads texture data information.

Parameters
uFilepathName of the binary file containing texture data
Returns
Returns true if the textures was successfully loaded

◆ loadUVData()

void U4DEngine::U4DResourceLoader::loadUVData ( U4DModel uModel,
std::vector< float >  uUV 
)

Method which loads the 3D model uv coordinates.

Parameters
uModel3D model entity
uUVContainer containing the uv coordinates

◆ loadVertexBoneWeightsToBody()

void U4DEngine::U4DResourceLoader::loadVertexBoneWeightsToBody ( std::vector< float > &  uVertexWeights,
std::vector< float >  uWeights 
)

Method which loads the 3D model armature bone weights.

Parameters
uVertexWeights3D model bone weight container
uWeightsData containing the bone weight data

◆ loadVerticesData()

void U4DEngine::U4DResourceLoader::loadVerticesData ( U4DModel uModel,
std::vector< float >  uVertices 
)

Method which loads the 3D model vertices.

Parameters
uModel3D model entity
uVerticesContainer containing the vertices information