Nameless Engine
Loading...
Searching...
No Matches
ne::AABB Struct Reference

#include <AABB.h>

Public Member Functions

bool isBehindPlane (const Plane &plane) const
 

Static Public Member Functions

static AABB createFromVertices (std::vector< MeshVertex > *pVertices)
 

Public Attributes

glm::vec3 center = glm::vec3(0.0F, 0.0F, 0.0F)
 
glm::vec3 extents = glm::vec3(0.0F, 0.0F, 0.0F)
 

Detailed Description

Axis-aligned bounding box.

Member Function Documentation

◆ createFromVertices()

AABB ne::AABB::createFromVertices ( std::vector< MeshVertex > *  pVertices)
static

Creates a new AABB from the specified vertices.

Parameters
pVerticesVertices to process.
Returns
Created AABB.

◆ isBehindPlane()

bool ne::AABB::isBehindPlane ( const Plane plane) const

Tells if the AABB is fully behind (inside the negative halfspace of) a plane.

Parameters
planePlane to test.
Returns
true if the AABB is fully behind the plane, false if intersects or in front of it.

Member Data Documentation

◆ center

glm::vec3 ne::AABB::center = glm::vec3(0.0F, 0.0F, 0.0F)

Center of the AABB in model space.

◆ extents

glm::vec3 ne::AABB::extents = glm::vec3(0.0F, 0.0F, 0.0F)

Half extension (size) of the AABB in model space.


The documentation for this struct was generated from the following files: