|
Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
|
#include <model.hpp>
Public Member Functions | |
| Model (const std::string &filepath, bool flip_uvs) | |
| void | draw (Shader *shader, glm::vec3 camPos, bool fill) override |
| void | draw (Shader *shader, glm::vec3 camPos, bool fill, glm::vec3 color) |
| void | translateAbsolute (const glm::vec3 &new_pos) override |
| void | translateRelative (const glm::vec3 &delta) override |
| virtual void | scaleAbsolute (const float &new_factor) override |
| virtual void | scaleAbsolute (const glm::vec3 &scale) override |
| void | scaleRelative (const float &new_factor) override |
| void | scaleRelative (const glm::vec3 &scale) override |
| void | rotateAbsolute (const glm::vec3 &dir, bool is_player=false, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) override |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations. More... | |
| void | rotateAbsolute (const float &angle, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) override |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations. More... | |
| void | rotateRelative (const glm::vec3 &dir, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) override |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will stack upon previous rotations. More... | |
| void | clear () override |
| void | clearScale () override |
| void | clearPosition () override |
| glm::vec3 | getDimensions () |
| void | setDimensions (const glm::vec3 &dimensions) |
| void | overrideSolidColor (std::optional< glm::vec3 > color) |
| auto & | getBoneInfoMap () |
| int & | getBoneCount () |
Public Member Functions inherited from Renderable | |
| Renderable () | |
| virtual void | draw (Shader *shader, glm::vec3 camPos, bool fill)=0 |
| virtual void | translateAbsolute (const glm::vec3 &new_pos) |
| virtual void | translateRelative (const glm::vec3 &delta) |
| virtual void | scaleAbsolute (const float &new_factor) |
| virtual void | scaleAbsolute (const glm::vec3 &scale) |
| virtual void | scaleRelative (const float &new_factor) |
| virtual void | scaleRelative (const glm::vec3 &scale) |
| virtual void | rotateAbsolute (const glm::vec3 &dir, bool is_player=false, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations. More... | |
| virtual void | rotateAbsolute (const float &angle, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations. More... | |
| virtual void | rotateRelative (const glm::vec3 &dir, const glm::vec3 &axis=glm::vec3(0.0f, 1.0f, 0.0f)) |
| Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will stack upon previous rotations. More... | |
| glm::mat4 | getModelMat () |
| virtual void | clear () |
| virtual void | clearScale () |
| virtual void | clearPosition () |
|
explicit |
Loads Model from a given filename. Can be of format .obj, .blend or any of the formats that assimp supports
| Filepath | to model file. |
|
overridevirtual |
Clear transformations and reset the model matrix to the identity.
Reimplemented from Renderable.
|
overridevirtual |
Reset translation to position (0, 0, 0)
Reimplemented from Renderable.
|
overridevirtual |
Reset scale factors in each dimension to 1.0
Reimplemented from Renderable.
Draws all the meshes of a given model
| Shader | to use while drawing all the meshes of the model |
Implements Renderable.
Draws all the meshes of a given model
| Shader | to use while drawing all the meshes of the model |
|
inline |
|
inline |
| glm::vec3 Model::getDimensions | ( | ) |
Queries the dimensions of a bounding box around the model.
| void Model::overrideSolidColor | ( | std::optional< glm::vec3 > | color | ) |
|
overridevirtual |
Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations.
| angle | The angle of rotation |
| axis | The axis of rotation |
Reimplemented from Renderable.
|
overridevirtual |
Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will not stack upon previous rotations.
| angle | The angle of rotation |
| axis | The axis of rotation |
Reimplemented from Renderable.
|
overridevirtual |
Rotates the item along the specified axis. If no axis is specified, then assumes a rotation on the y-axis. This will stack upon previous rotations.
| angle | The angle of rotation |
| axis | The axis of rotation |
Reimplemented from Renderable.
|
overridevirtual |
Scale the Model across all axes (x,y,z) by a factor. This will not stack up on top of any previous scaling.
| new_factor | describes how much to scale the model by. Ex: setting it to 0.5 will cut the model's rendered size in half. |
Reimplemented from Renderable.
|
overridevirtual |
Scale the item across all axes (x,y,z) by the scale factor in each axis. This will not stack up on top of any previous scaling.
| the | scale vector describes how much to independently scale the item in each axis (x, y, z) |
Reimplemented from Renderable.
|
overridevirtual |
Scale the Model across all axes (x,y,z) by a factor. This will stack up on top of any previous scaling.
| new_factor | describes how much to scale the model by. Ex: setting it to 0.5 will cut the model's rendered size in half. |
Reimplemented from Renderable.
|
overridevirtual |
Scale the item across all axes (x,y,z) by the scale factor in each axis. This will stack up on top of any previous scaling.
| the | scale vector describes how much to independently scale the model in each axis (x, y, z) |
Reimplemented from Renderable.
| void Model::setDimensions | ( | const glm::vec3 & | dimensions | ) |
Set dimensions by scaling the model accordingly
| a | vec3 where each dimension represents the size in that dimension |
|
overridevirtual |
Sets the position of the Model to the given x,y,z values
| vector | of x, y, z of the model's new position |
Reimplemented from Renderable.
|
overridevirtual |
Updates the position of the Model relative to it's previous position
| vector | of x, y, z of the change in the Model's position |
Reimplemented from Renderable.