3 #include "../ResourceManagement/Primitives.h" 5 #include <unordered_map> 80 void initaliseMesh(std::string objFileName, std::string textureFileName);
88 void initaliseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName);
98 void initaliseShaders(std::string vertexShaderFileName,
float inR,
float inG,
float inB);
void initalisePrimitive(Primitives::PrimativeType primType)
A function to initalise a mesh using a primiative type.
Definition: ModelComponent.cpp:99
A class that handles the components.
Definition: Component.h:13
void initaliseDefaultColourShaders(std::string vertexShaderFileName, std::string inColour)
A function to initalise a default colour shader to use with the mesh. MUST BE RUN AFTER MESH INITALIS...
Definition: ModelComponent.cpp:180
virtual void onDestroy()
A virtual function for the componets destroy.
Definition: ModelComponent.cpp:20
Vec3 ambient
The ambient and diffuse values.
Definition: ModelComponent.h:149
void initaliseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName)
A function to initalise the shaders to use with the mesh. MUST BE RUN AFTER MESH INITALISE!!! ...
Definition: ModelComponent.cpp:129
void addVec3Uniform(std::string uniformID, Vec3 vec)
A function to initlaise the uniforms.
Definition: ModelComponent.cpp:260
void initaliseHeightmap(std::string fileName)
A function to initalise a mesh with a heightmap.
Definition: ModelComponent.cpp:92
void setDiffuse(Vec3 inDif)
A function to set the diffuse value.
Definition: ModelComponent.cpp:292
std::unordered_map< std::string, Vec3 > vec3Uniforms
Definition: ModelComponent.h:147
void setAmbient(Vec3 inAmb)
A function to set the ambient value.
Definition: ModelComponent.cpp:297
void onRender()
A function for the model render.
Definition: ModelComponent.cpp:29
void initaliseUniforms()
A function to initlaise the uniforms.
Definition: ModelComponent.cpp:275
std::unordered_map< std::string, float * > mat4Uniforms
The Uniform locations for the shader program.
Definition: ModelComponent.h:146
Contains the Vec3 structure with functions and overloaded operators.
Definition: Vec3.h:8
bool textured
A boolean for if textured.
Definition: ModelComponent.h:144
void addMat4Uniform(std::string uniformID, float *matPointer)
A function to add a matrix 4 uniform.
Definition: ModelComponent.cpp:245
std::string shaderID
The Shader for the Model.
Definition: ModelComponent.h:140
std::string getMeshID()
A function to get the mesh ID.
Definition: ModelComponent.h:121
bool colour
Definition: ModelComponent.h:144
std::string meshID
The mesh for the Model.
Definition: ModelComponent.h:142
PrimativeType
Definition: Primitives.h:13
Vec3 diffuse
Definition: ModelComponent.h:149
void initaliseMesh(std::string objFileName)
A function to initalise a mesh without a texture.
Definition: ModelComponent.cpp:114
virtual ~ModelComponent()
A virtual destructor.
Definition: ModelComponent.cpp:11
void setColour()
A function to set the colour.
Definition: ModelComponent.cpp:24
virtual void onAwake()
A virtual function for the componets awake.
Definition: ModelComponent.cpp:15
A class that handles the model component.
Definition: ModelComponent.h:10