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

#include <gNode.h>

Inheritance diagram for gNode:
Collaboration diagram for gNode:

Public Member Functions

 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)

Static Public Attributes

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

virtual void processTransformationMatrix ()

Protected Attributes

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

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 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

◆ gNode()

gNode::gNode ( )

◆ ~gNode()

virtual gNode::~gNode ( )
virtual

Member Function Documentation

◆ addChild()

void gNode::addChild ( gNode * child)

◆ boom()

void gNode::boom ( float distance)

Movement up-down along y axis

Parameters
distancemovement amount in gl units

◆ dolly()

void gNode::dolly ( float distance)

Movement forward-backward along z axis

Parameters
distancemovement amount in gl units

◆ getId()

int gNode::getId ( ) const

◆ getOrientation()

const glm::quat & gNode::getOrientation ( ) const

◆ getParent()

gNode * gNode::getParent ( ) const

◆ getPosition()

const glm::vec3 & gNode::getPosition ( ) const

◆ getPosX()

float gNode::getPosX ( ) const

◆ getPosY()

float gNode::getPosY ( ) const

◆ getPosZ()

float gNode::getPosZ ( ) const

◆ getScalarDirectionX()

glm::vec3 gNode::getScalarDirectionX ( ) const

Returns truck direction as a scalar vec3.

◆ getScalarDirectionY()

glm::vec3 gNode::getScalarDirectionY ( ) const

Returns boom direction as a scalar vec3.

◆ getScalarDirectionZ()

glm::vec3 gNode::getScalarDirectionZ ( ) const

Returns dolly direction as a scalar vec3.

◆ getScale()

const glm::vec3 & gNode::getScale ( ) const

◆ getTransformationMatrix()

const glm::mat4 & gNode::getTransformationMatrix ( ) const

◆ isEnabled()

bool gNode::isEnabled ( ) const

◆ move() [1/2]

void gNode::move ( const glm::vec3 & dv)

◆ move() [2/2]

void gNode::move ( float dx,
float dy,
float dz )

◆ pan()

void gNode::pan ( float radians)

Rotation around local y axis in radians

Parameters
anglein radians

◆ panDeg()

void gNode::panDeg ( float degrees)

Rotation around local y axis in degrees

Parameters
anglein degrees

◆ popMatrix()

void gNode::popMatrix ( )

◆ processTransformationMatrix()

virtual void gNode::processTransformationMatrix ( )
protectedvirtual

Reimplemented in gLight, gMesh, and gModel.

◆ pushMatrix()

void gNode::pushMatrix ( )

◆ removeChild() [1/2]

void gNode::removeChild ( gNode * child)

◆ removeChild() [2/2]

void gNode::removeChild ( int gObjectId)

◆ removeParent()

void gNode::removeParent ( )

◆ roll()

void gNode::roll ( float radians)

Rotation around local z axis in radians

Parameters
anglein radians

◆ rollDeg()

void gNode::rollDeg ( float degrees)

Rotation around local z axis in degrees

Parameters
anglein degrees

◆ rotate() [1/2]

void gNode::rotate ( const glm::quat & q)

◆ rotate() [2/2]

void gNode::rotate ( float radians,
float ax,
float ay,
float az )

◆ rotateAround()

void gNode::rotateAround ( float radians,
const glm::vec3 & axis,
const glm::vec3 & point )

◆ rotateAroundDeg()

void gNode::rotateAroundDeg ( float degrees,
const glm::vec3 & axis,
const glm::vec3 & point )

◆ rotateDeg()

void gNode::rotateDeg ( float degrees,
float ax,
float ay,
float az )

◆ scale() [1/2]

void gNode::scale ( float s)

◆ scale() [2/2]

void gNode::scale ( float sx,
float sy,
float sz )

◆ setEnabled()

void gNode::setEnabled ( bool isEnabled)

◆ setOrientation() [1/2]

void gNode::setOrientation ( const glm::quat & o)

◆ setOrientation() [2/2]

void gNode::setOrientation ( const glm::vec3 & angles)

◆ setParent()

void gNode::setParent ( gNode * parent)

◆ setPosition() [1/2]

void gNode::setPosition ( const glm::vec3 & pv)

◆ setPosition() [2/2]

void gNode::setPosition ( float px,
float py,
float pz )

◆ setScale() [1/3]

void gNode::setScale ( const glm::vec3 & s)

◆ setScale() [2/3]

void gNode::setScale ( float s)

◆ setScale() [3/3]

void gNode::setScale ( float sx,
float sy,
float sz )

◆ setTransformationMatrix()

void gNode::setTransformationMatrix ( const glm::mat4 & transformationMatrix)

◆ tilt()

void gNode::tilt ( float radians)

Rotation around local x axis in radians

Parameters
anglein radians

◆ tiltDeg()

void gNode::tiltDeg ( float degrees)

Rotation around local x axis in degrees

Parameters
anglein degrees

◆ truck()

void gNode::truck ( float distance)

Movement right-left along x axis

Parameters
distancemovement amount in gl units

Member Data Documentation

◆ children

std::deque<gNode*> gNode::children
protected

◆ isenabled

bool gNode::isenabled
protected

◆ ismatrixpushing

bool gNode::ismatrixpushing
static

◆ localtransformationmatrix

std::vector<glm::mat4> gNode::localtransformationmatrix
protected

◆ matrixpopmeshptr

gNode* gNode::matrixpopmeshptr
static

◆ orientation

glm::quat gNode::orientation
protected

◆ parent

gNode* gNode::parent
protected

◆ position

glm::vec3 gNode::position
protected

◆ prevorientation

glm::quat gNode::prevorientation
protected

◆ prevposition

glm::vec3 gNode::prevposition
protected

◆ prevscalevec

glm::vec3 gNode::prevscalevec
protected

◆ scalevec

glm::vec3 gNode::scalevec
protected

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