Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Functions
util.cpp File Reference
#include "client/util.hpp"
#include <algorithm>
#include <limits>
#include <iostream>
#include "glm/fwd.hpp"
#include "glm/glm.hpp"

Functions

glm::vec3 aiColorToGLM (const aiColor3D &color)
 
glm::mat4 matrixToGLM (const aiMatrix4x4 &from)
 
glm::vec3 getGLMVec (const aiVector3D &vec)
 
glm::quat getGLMQuat (const aiQuaternion &pOrientation)
 
Bbox aiBboxToGLM (const aiAABB &bbox)
 
Bbox combineBboxes (const Bbox &bbox1, const Bbox &bbox2)
 
glm::vec3 rotate90DegreesAroundXAxis (const glm::vec3 &direction)
 
glm::vec3 rotate90DegreesAroundYAxis (const glm::vec3 &direction)
 

Function Documentation

◆ aiBboxToGLM()

Bbox aiBboxToGLM ( const aiAABB &  bbox)

◆ aiColorToGLM()

glm::vec3 aiColorToGLM ( const aiColor3D &  color)

Convert ASSIMP color to a glm::vec3

Parameters
ASSIMPcolor struct
Returns
glm::vec3 of (r, g, b)

◆ combineBboxes()

Bbox combineBboxes ( const Bbox bbox1,
const Bbox bbox2 
)

Combine two bounding boxes together to get the bounding box that encompasses the space both of them take up.

Note that

Parameters
bbox1is a bounding box
bbox2is another bounding box
Returns
is the combined bounding box which contains both of the provided bounding boxes

◆ getGLMQuat()

glm::quat getGLMQuat ( const aiQuaternion &  pOrientation)

◆ getGLMVec()

glm::vec3 getGLMVec ( const aiVector3D &  vec)

◆ matrixToGLM()

glm::mat4 matrixToGLM ( const aiMatrix4x4 &  from)

◆ rotate90DegreesAroundXAxis()

glm::vec3 rotate90DegreesAroundXAxis ( const glm::vec3 &  direction)

◆ rotate90DegreesAroundYAxis()

glm::vec3 rotate90DegreesAroundYAxis ( const glm::vec3 &  direction)