GlistEngine
Loading...
Searching...
No Matches
gSpline Class Reference

#include <gSpline.h>

Inheritance diagram for gSpline:
Collaboration diagram for gSpline:

Public Member Functions

 gSpline ()
virtual ~gSpline ()
void setPoint (const std::vector< glm::vec2 > &points)
void setPoint (const std::vector< glm::vec3 > &points)
void addPoint (glm::vec2 point)
void addPoint (glm::vec3 point)
void setPointAtIndex (int index, glm::vec2 point)
void setPointAtIndex (int index, glm::vec3 point)
glm::vec3 getPointAtIndex (int index) const
glm::vec2 getPoint2DAtIndex (int index) const
std::vector< glm::vec3 > getPoints () const
std::vector< glm::vec2 > getPoints2D () const
void clearPoints ()
void setDegree (int degree)
int getDegree () const
glm::vec3 getPoint (float t) const
glm::vec2 getPoint2D (float t) const
float getSlope (float t) const
void setResolution (int resolution)
int getResolution () const
void draw () const
Public Member Functions inherited from gMesh
 gMesh ()
 gMesh (const std::vector< gVertex > &vertices, const std::vector< gIndex > &indices, const std::vector< gTexture * > &textures)
 gMesh (std::shared_ptr< std::vector< gVertex > > vertices, std::shared_ptr< std::vector< gIndex > > indices, std::vector< gTexture * > textures)
 gMesh (const gMesh &)
 ~gMesh () override
void setVertices (const std::vector< gVertex > &vertices, const std::vector< gIndex > &indices)
void setVertices (const std::vector< gVertex > &vertices)
void setVertices (std::shared_ptr< std::vector< gVertex > > vertices)
void setVertices (std::shared_ptr< std::vector< gVertex > > vertices, std::shared_ptr< std::vector< gIndex > > indices)
void setTextures (const std::vector< gTexture * > &textures)
void setTextures (const std::unordered_map< gTexture::TextureType, gTexture * > &textures)
void setTexture (gTexture *texture)
gTexture * getTexture (gTexture::TextureType type)
void setTextureTiling (float tilingX, float tilingY)
void setTextureTiling (float tiling)
const glm::vec2 & getTextureTiling () const
std::vector< gVertex > & getVertices ()
std::vector< gIndex > & getIndices ()
std::shared_ptr< std::vector< gVertex > > getVerticesPtr ()
std::shared_ptr< std::vector< gIndex > > getIndicesPtr ()
int getVerticesNum () const
int getIndicesNum () const
const gBoundingBox & getBoundingBox ()
gVbo & getVbo ()
void clear ()
void setName (const std::string &name)
const std::string & getName () const
void setDrawMode (int drawMode)
int getDrawMode () const
void setMaterial (gMaterial *material)
gMaterial * getMaterial ()
virtual void draw ()
virtual void drawInstanced (const std::vector< glm::mat4 > &instanceTransformations)
const gBoundingBox & getInitialBoundingBox () const
bool intersectsTriangles (gRay *ray)
float distanceTriangles (gRay *ray)
void recalculateBoundingBox ()
void setAllVertexColor (const glm::vec3 &color)
void fillMissingVertexColors (const glm::vec3 &defColor=glm::vec3(1.0f))
void applyVertexGradient ()
Public Member Functions inherited from gNode
 gNode ()
virtual ~gNode ()
void move (float dx, float dy, float dz)
void move (const glm::vec3 &dv)
void rotate (const glm::quat &q)
void rotate (float radians, float ax, float ay, float az)
void rotateDeg (float degrees, float ax, float ay, float az)
void rotateAround (float radians, const glm::vec3 &axis, const glm::vec3 &point)
void rotateAroundDeg (float degrees, const glm::vec3 &axis, const glm::vec3 &point)
void scale (float sx, float sy, float sz)
void scale (float s)
void setPosition (float px, float py, float pz)
void setPosition (const glm::vec3 &pv)
void setOrientation (const glm::quat &o)
void setOrientation (const glm::vec3 &angles)
void setScale (const glm::vec3 &s)
void setScale (float sx, float sy, float sz)
void setScale (float s)
void truck (float distance)
void boom (float distance)
void dolly (float distance)
void tilt (float radians)
void tiltDeg (float degrees)
void pan (float radians)
void panDeg (float degrees)
void roll (float radians)
void rollDeg (float degrees)
float getPosX () const
float getPosY () const
float getPosZ () const
const glm::vec3 & getPosition () const
const glm::quat & getOrientation () const
const glm::vec3 & getScale () const
glm::vec3 getScalarDirectionX () const
glm::vec3 getScalarDirectionY () const
glm::vec3 getScalarDirectionZ () const
void setTransformationMatrix (const glm::mat4 &transformationMatrix)
const glm::mat4 & getTransformationMatrix () const
int getId () const
void setParent (gNode *parent)
gNode * getParent () const
void removeParent ()
void addChild (gNode *child)
void removeChild (gNode *child)
void removeChild (int gObjectId)
void setEnabled (bool isEnabled)
bool isEnabled () const
void pushMatrix ()
void popMatrix ()
Public Member Functions inherited from gRenderObject
 gRenderObject ()
int getScreenWidth ()
int getScreenHeight ()
void pushMatrix ()
void popMatrix ()
Public Member Functions inherited from gObject
 gObject ()
void logi (std::string message)
void logd (std::string message)
void logw (std::string message)
void loge (std::string message)
void logi (std::string tag, std::string message)
void logd (std::string tag, std::string message)
void logw (std::string tag, std::string message)
void loge (std::string tag, std::string message)

Additional Inherited Members

Static Public Member Functions inherited from gRenderObject
static void setScreenSize (int screenWidth, int screenHeight)
static void setUnitScreenSize (int unitWidth, int unitHeight)
static void setScreenScaling (int screenScaling)
static void enableShadowMapping ()
static void disableShadowMapping ()
static bool isShadowMappingEnabled ()
static void enableExtraShaders (bool isEnabled=true)
static void disableExtraShaders ()
static bool isExtraShadersEnabled ()
static gRenderer * getRenderer ()
static void destroyRenderer ()
static void createRenderer (int renderEngine=G_RENDERER_GL)
Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
static std::string gGetAssetsDir ()
static void gSetAssetsDir (std::string assetsDir)
static std::string gGetFilesDir ()
static std::string gGetImagesDir ()
static std::string gGetFontsDir ()
static std::string gGetModelsDir ()
static std::string gGetTexturesDir ()
static std::string gGetShadersDir ()
static std::string gGetSoundsDir ()
static std::string gGetDatabasesDir ()
static std::string gGetVideosDir ()
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
Static Public Attributes inherited from gMesh
static const int DRAWMODE_POINTS = GL_POINTS
static const int DRAWMODE_LINES = GL_LINES
static const int DRAWMODE_LINELOOP = GL_LINE_LOOP
static const int DRAWMODE_LINESTRIP = GL_LINE_STRIP
static const int DRAWMODE_TRIANGLES = GL_TRIANGLES
static const int DRAWMODE_TRIANGLESTRIP = GL_TRIANGLE_STRIP
static const int DRAWMODE_TRIANGLEFAN = GL_TRIANGLE_FAN
Static Public Attributes inherited from gNode
static bool ismatrixpushing
static gNode * matrixpopmeshptr
Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
static const int LOGLEVEL_DEBUG
static const int LOGLEVEL_INFO
static const int LOGLEVEL_WARNING
static const int LOGLEVEL_ERROR
Protected Member Functions inherited from gMesh
void processTransformationMatrix () override
void drawStart (bool isInstanced=false)
void drawVbo ()
void expandIndicesForVulkan ()
void drawVulkan2D ()
void drawVulkan3D (const std::vector< glm::mat4 > *instanceTransformations=nullptr, gVbo *sourceVbo=nullptr)
void drawVboInstanced (const std::vector< glm::mat4 > &instanceTransformations)
void drawExtraShaders ()
void drawEnd ()
void bindMaterialUniforms (gShader &shader)
void bindMaterialTextures (gShader &shader)
Protected Attributes inherited from gMesh
bool vulkanindicesexpanded = false
std::unique_ptr< gVbo > vbo
std::shared_ptr< std::vector< gVertex > > vertices
bool isprojection2d
Protected Attributes inherited from gNode
gNode * parent
std::deque< gNode * > children
std::vector< glm::mat4 > localtransformationmatrix
bool isenabled
glm::vec3 position
glm::quat orientation
glm::vec3 scalevec
glm::vec3 prevposition
glm::quat prevorientation
glm::vec3 prevscalevec
Static Protected Attributes inherited from gRenderObject
static bool isshadowmappingenabled
static bool isextrashadersenabled
Static Protected Attributes inherited from gObject
static int renderpassnum
static int renderpassno
static int releasescaling
static int releaseresolution

Constructor & Destructor Documentation

◆ gSpline()

gSpline::gSpline ( )

◆ ~gSpline()

virtual gSpline::~gSpline ( )
virtual

Member Function Documentation

◆ addPoint() [1/2]

void gSpline::addPoint ( glm::vec2 point)

◆ addPoint() [2/2]

void gSpline::addPoint ( glm::vec3 point)

◆ clearPoints()

void gSpline::clearPoints ( )

◆ draw()

void gSpline::draw ( ) const

◆ getDegree()

int gSpline::getDegree ( ) const

◆ getPoint()

glm::vec3 gSpline::getPoint ( float t) const

◆ getPoint2D()

glm::vec2 gSpline::getPoint2D ( float t) const

◆ getPoint2DAtIndex()

glm::vec2 gSpline::getPoint2DAtIndex ( int index) const

◆ getPointAtIndex()

glm::vec3 gSpline::getPointAtIndex ( int index) const

◆ getPoints()

std::vector< glm::vec3 > gSpline::getPoints ( ) const

◆ getPoints2D()

std::vector< glm::vec2 > gSpline::getPoints2D ( ) const

◆ getResolution()

int gSpline::getResolution ( ) const

◆ getSlope()

float gSpline::getSlope ( float t) const

◆ setDegree()

void gSpline::setDegree ( int degree)

◆ setPoint() [1/2]

void gSpline::setPoint ( const std::vector< glm::vec2 > & points)

◆ setPoint() [2/2]

void gSpline::setPoint ( const std::vector< glm::vec3 > & points)

◆ setPointAtIndex() [1/2]

void gSpline::setPointAtIndex ( int index,
glm::vec2 point )

◆ setPointAtIndex() [2/2]

void gSpline::setPointAtIndex ( int index,
glm::vec3 point )

◆ setResolution()

void gSpline::setResolution ( int resolution)

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