jGL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
jGL::Shape Class Reference

A drawable shape. More...

#include <shape.h>

Collaboration diagram for jGL::Shape:
Collaboration graph
[legend]

Public Member Functions

 Shape ()
 
 Shape (const Transform *tra, const glm::vec4 *c)
 
WorldBoundingBox getWorldBoundingBox () const
 Get the WorldBoundingBox of the Shape.
 
ScreenBoundingBox getScreenBoundingBox (const OrthoCam &camera)
 Get the ScreenBoundingBox of the Shape.
 

Public Attributes

const Transformtransform
 
const glm::vec4 * colour
 

Detailed Description

A drawable shape.

Remarks
Detailed geometry is assumed defined in the shader. Circle and Rectangle are provided in ShapeRenderer.

Constructor & Destructor Documentation

◆ Shape() [1/2]

jGL::Shape::Shape ( )
inline

◆ Shape() [2/2]

jGL::Shape::Shape ( const Transform tra,
const glm::vec4 *  c 
)
inline

Member Function Documentation

◆ getScreenBoundingBox()

ScreenBoundingBox jGL::Shape::getScreenBoundingBox ( const OrthoCam camera)
inline

Get the ScreenBoundingBox of the Shape.

Parameters
camerafor projection to the screen.
Returns
ScreenBoundingBox

◆ getWorldBoundingBox()

WorldBoundingBox jGL::Shape::getWorldBoundingBox ( ) const
inline

Get the WorldBoundingBox of the Shape.

Returns
WorldBoundingBox

Member Data Documentation

◆ colour

const glm::vec4* jGL::Shape::colour

◆ transform

const Transform* jGL::Shape::transform

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