17#ifndef GRAPHICS_GBOUNDINGBOX_H_
18#define GRAPHICS_GBOUNDINGBOX_H_
23#define GLM_ENABLE_EXPERIMENTAL
24#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
26#include <glm/gtc/matrix_transform.hpp>
27#include <glm/gtx/quaternion.hpp>
47 static bool intersects(
float minX1,
float minY1,
float minZ1,
float maxX1,
float maxY1,
float maxZ1,
float minX2,
float minY2,
float minZ2,
float maxX2,
float maxY2,
float maxZ2);
53 static bool contains(
float minX1,
float minY1,
float minZ1,
float maxX1,
float maxY1,
float maxZ1,
float minX2,
float minY2,
float minZ2,
float maxX2,
float maxY2,
float maxZ2);
58 bool contains(
float x,
float y,
float z)
const;
90 static const int componentnum = 3;
92 float width, height, depth;
93 float widthhalf, heighthalf, depthhalf;
95 glm::mat4 transformationmatrix;
Definition gBoundingBox.h:36
void set(const gBoundingBox &b)
bool intersects(gRay &ray) const
static bool contains(float minX1, float minY1, float minZ1, float maxX1, float maxY1, float maxZ1, float minX2, float minY2, float minZ2, float maxX2, float maxY2, float maxZ2)
bool contains(float x, float y, float z) const
gBoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
const glm::vec3 & getOrigin() const
bool contains(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) const
const glm::vec3 & getMin() const
void set(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
static bool intersects(float minX1, float minY1, float minZ1, float maxX1, float maxY1, float maxZ1, float minX2, float minY2, float minZ2, float maxX2, float maxY2, float maxZ2)
void setTransformationMatrix(const glm::mat4 &matrix)
gBoundingBox(const gBoundingBox &b)
bool intersects(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) const
float distance(gRay &ray) const
bool intersects(gRay *ray) const
const glm::vec3 & getMax() const
gBoundingBox offset(const glm::vec3 &offset) const
static bool contains(const gBoundingBox &b1, const gBoundingBox &b2)
float distanceOBB(gRay *ray) const
gBoundingBox(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, glm::mat4 transformationMatrix)
bool intersects(const gBoundingBox &b) const
bool intersectsOBB(gRay *ray) const
bool contains(const gBoundingBox &b) const
float distance(gRay *ray) const
gBoundingBox merge(const gBoundingBox &other) const
static bool intersects(const gBoundingBox &b1, const gBoundingBox &b2)
Definition gRenderObject.h:25
float b
Definition gColor.h:22