group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Asset Namespace Reference

Classes

struct  GeoBufferInfo
 References a CPU-side source pointer and its corresponding GPU buffer. More...
struct  Vertex
 Per-vertex attributes: position, normal, and texture coordinates. More...
struct  Mesh
 A single mesh: CPU-side vertex/index data plus GPU buffer info. More...
struct  CpuMesh
struct  GpuMesh
struct  Material
struct  Texture
struct  ModelElement
struct  ModelNode
struct  Model
struct  ModelInstance

Functions

uint32_t fnv1a32 (const std::string &str)
 Compute a 32-bit FNV-1a hash of the given string.
uint32_t getIdFromString (const std::string &strId)
 Convert a string identifier to a generic 32-bit hash ID.
MeshIdInt getMeshIdFromString (const std::string &strId)
 Convert a string identifier to a MeshIdInt hash.
ModelIdInt getModelIdFromString (const std::string &strId)
 Convert a string identifier to a ModelIdInt hash.
TexIdInt getTexIdFromString (const std::string &strId)
 Convert a string identifier to a TexIdInt hash.
MaterialIdInt getMaterialIdFromString (const std::string &strId)

Variables

std::unordered_map< MeshIdInt, Meshmeshes_
std::unordered_map< ModelIdInt, Modelmodels_
std::unordered_map< TexIdInt, Texturetextures_
std::unordered_map< MaterialIdInt, Materialmaterials_
std::vector< ModelInstancemodelInstances_
ModelIdInt weaponModelId_ = 0
glm::mat4 weaponViewModel_ = glm::mat4(1.0f)

Function Documentation

◆ fnv1a32()

uint32_t Asset::fnv1a32 ( const std::string & str)
inline

Compute a 32-bit FNV-1a hash of the given string.

Parameters
strThe input string to hash.
Returns
The 32-bit FNV-1a hash value.
Here is the caller graph for this function:

◆ getIdFromString()

uint32_t Asset::getIdFromString ( const std::string & strId)
inline

Convert a string identifier to a generic 32-bit hash ID.

Parameters
strIdThe string identifier.
Returns
The hashed ID.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaterialIdFromString()

MaterialIdInt Asset::getMaterialIdFromString ( const std::string & strId)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMeshIdFromString()

MeshIdInt Asset::getMeshIdFromString ( const std::string & strId)
inline

Convert a string identifier to a MeshIdInt hash.

Parameters
strIdThe string identifier for the mesh.
Returns
The hashed mesh ID.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getModelIdFromString()

ModelIdInt Asset::getModelIdFromString ( const std::string & strId)
inline

Convert a string identifier to a ModelIdInt hash.

Parameters
strIdThe string identifier for the model.
Returns
The hashed model ID.
Here is the call graph for this function:

◆ getTexIdFromString()

TexIdInt Asset::getTexIdFromString ( const std::string & strId)
inline

Convert a string identifier to a TexIdInt hash.

Parameters
strIdThe string identifier for the texture.
Returns
The hashed texture ID.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ materials_

std::unordered_map<MaterialIdInt, Material> Asset::materials_
inline

◆ meshes_

std::unordered_map<MeshIdInt, Mesh> Asset::meshes_
inline

◆ modelInstances_

std::vector<ModelInstance> Asset::modelInstances_
inline

◆ models_

std::unordered_map<ModelIdInt, Model> Asset::models_
inline

◆ textures_

std::unordered_map<TexIdInt, Texture> Asset::textures_
inline

◆ weaponModelId_

ModelIdInt Asset::weaponModelId_ = 0
inline

◆ weaponViewModel_

glm::mat4 Asset::weaponViewModel_ = glm::mat4(1.0f)
inline