Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::Plane Struct Reference

#include <Frustum.h>

Public Member Functions

void Set (const glm::vec3 &normal, const glm::vec3 &point)
 
float DistanceToPoint (const glm::vec3 &point) const
 

Public Attributes

glm::vec3 normal = { 0.f, 1.f, 0.f }
 
float distance = 0.0f
 

Detailed Description

Definition at line 7 of file Frustum.h.

Member Function Documentation

◆ DistanceToPoint()

float Elevate::Plane::DistanceToPoint ( const glm::vec3 &  point) const
inline

Definition at line 18 of file Frustum.h.

19 {
20 return glm::dot(normal, point) + distance;
21 }
float distance
Definition Frustum.h:10
glm::vec3 normal
Definition Frustum.h:9

◆ Set()

void Elevate::Plane::Set ( const glm::vec3 &  normal,
const glm::vec3 &  point 
)
inline

Definition at line 12 of file Frustum.h.

13 {
14 this->normal = glm::normalize(normal);
15 this->distance = -glm::dot(this->normal, point);
16 }

Member Data Documentation

◆ distance

float Elevate::Plane::distance = 0.0f

Definition at line 10 of file Frustum.h.

◆ normal

glm::vec3 Elevate::Plane::normal = { 0.f, 1.f, 0.f }

Definition at line 9 of file Frustum.h.

9{ 0.f, 1.f, 0.f };

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