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

#include <Cone.h>

Public Member Functions

 Cone ()=default
 
 Cone (const glm::vec3 &location, float height, const glm::vec3 &direction, float bottomRadius)
 
bool isBehindPlane (const Plane &plane) const
 

Public Attributes

glm::vec3 location = glm::vec3(0.0F, 0.0F, 0.0F)
 
float height = 1.0F
 
glm::vec3 direction = glm::vec3(1.0F, 0.0F, 0.0F)
 
float bottomRadius = 1.0F
 

Detailed Description

Cone shape.

Constructor & Destructor Documentation

◆ Cone() [1/2]

ne::Cone::Cone ( )
default

Creates uninitialized cone.

◆ Cone() [2/2]

ne::Cone::Cone ( const glm::vec3 &  location,
float  height,
const glm::vec3 &  direction,
float  bottomRadius 
)

Initializes the cone.

Parameters
locationLocation of cone's tip.
heightHeight of the cone.
directionDirection unit vector from cone's tip.
bottomRadiusRadius of the bottom part of the cone.

Member Function Documentation

◆ isBehindPlane()

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

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

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

Member Data Documentation

◆ bottomRadius

float ne::Cone::bottomRadius = 1.0F

Radius of the bottom part of the cone.

◆ direction

glm::vec3 ne::Cone::direction = glm::vec3(1.0F, 0.0F, 0.0F)

Direction unit vector from cone's tip.

◆ height

float ne::Cone::height = 1.0F

Height of the cone.

◆ location

glm::vec3 ne::Cone::location = glm::vec3(0.0F, 0.0F, 0.0F)

Location of cone's tip.


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