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

#include <gModel.h>

Inheritance diagram for gModel:
Collaboration diagram for gModel:

Public Member Functions

 gModel ()
 
virtual ~gModel ()
 
void disassemble ()
 
void loadModel (const std::string &modelPath)
 
void loadModelWithOriginalVertices (const std::string &modelPath)
 
void loadMorphingTargetModel (const std::string &modelPath)
 
void load (const std::string &fullPath)
 
void draw ()
 
const std::string & getFilename () const
 
const std::string getFullpath () const
 
int getMeshNum () const
 
int getMeshNo (const std::string &meshName) const
 
gSkinnedMeshgetMesh (int meshNo)
 
gSkinnedMeshgetMeshPtr (int meshNo)
 
std::string getMeshName (int meshNo) const
 
const gBoundingBoxgetBoundingBox ()
 
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 dolly (float distance)
 
void truck (float distance)
 
void boom (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)
 
void setPosition (float px, float py, float pz)
 
void setPosition (const glm::vec3 &p)
 
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 setTransformationMatrix (const glm::mat4 &transformationMatrix)
 
bool isAnimated () const
 
int getAnimationNum () const
 
float getAnimationDuration (int animationNo=0) const
 
void animate (float animationPosition)
 
float getAnimationPosition () const
 
void setAnimationFrameNo (int frameNo)
 
void nextAnimationFrame ()
 
int getAnimationFrameNo () const
 
void setAnimationFrameNum (int animationKeyNum)
 
int getAnimationFrameNum () const
 
void setAnimationFramerate (float animationFramerate)
 
float getAnimationFramerate () const
 
void setMorphingFrameNo (int morphingAnimationNo)
 
int getMorphingFrameNo () const
 
void nextMorphingFrame ()
 
void setMorphingSpeed (int speed)
 
int getMorphingSpeed () const
 
void setMorphingFrameNum (int morphingFrameNum)
 
int getMorphingFrameNum () const
 
void setMorphingTarget (int morphingTargetId)
 
int getMorphingTarget () const
 
bool isVertexAnimated () const
 
bool isVertexAnimationStoredOnVram () const
 
void makeVertexAnimated (bool storeOnVram=true)
 
gBoundingBoxgetInitialBoundingBox ()
 
void recalculateBoundingBox ()
 
void setEnableFrustumCulling (bool enable)
 
- 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)
 
gNodegetParent () const
 
void removeParent ()
 
void addChild (gNode *child)
 
void removeChild (gNode *child)
 
void removeChild (int gObjectId)
 
void setEnabled (bool isEnabled)
 
bool isEnabled () const
 
void pushMatrix () const
 
void popMatrix () const
 
- 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)
 

Public Attributes

std::deque< gTexture * > textures_loaded
 
std::deque< gSkinnedMesh * > meshes
 
std::string directory
 

Protected Member Functions

void processTransformationMatrix () override
 

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 gRenderergetRenderer ()
 
static void destroyRenderer ()
 
static void createRenderer ()
 
- 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 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 Attributes inherited from gNode
gNodeparent
 
std::deque< gNode * > children
 
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 Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Constructor & Destructor Documentation

◆ gModel()

gModel::gModel ( )

◆ ~gModel()

virtual gModel::~gModel ( )
virtual

Member Function Documentation

◆ animate()

void gModel::animate ( float  animationPosition)

◆ boom()

void gModel::boom ( float  distance)

◆ disassemble()

void gModel::disassemble ( )

◆ dolly()

void gModel::dolly ( float  distance)

◆ draw()

void gModel::draw ( )

◆ getAnimationDuration()

float gModel::getAnimationDuration ( int  animationNo = 0) const

◆ getAnimationFrameNo()

int gModel::getAnimationFrameNo ( ) const

◆ getAnimationFrameNum()

int gModel::getAnimationFrameNum ( ) const

◆ getAnimationFramerate()

float gModel::getAnimationFramerate ( ) const

◆ getAnimationNum()

int gModel::getAnimationNum ( ) const

◆ getAnimationPosition()

float gModel::getAnimationPosition ( ) const

◆ getBoundingBox()

const gBoundingBox & gModel::getBoundingBox ( )

◆ getFilename()

const std::string & gModel::getFilename ( ) const

◆ getFullpath()

const std::string gModel::getFullpath ( ) const

◆ getInitialBoundingBox()

gBoundingBox & gModel::getInitialBoundingBox ( )

◆ getMesh()

gSkinnedMesh & gModel::getMesh ( int  meshNo)

◆ getMeshName()

std::string gModel::getMeshName ( int  meshNo) const

◆ getMeshNo()

int gModel::getMeshNo ( const std::string &  meshName) const

◆ getMeshNum()

int gModel::getMeshNum ( ) const

◆ getMeshPtr()

gSkinnedMesh * gModel::getMeshPtr ( int  meshNo)

◆ getMorphingFrameNo()

int gModel::getMorphingFrameNo ( ) const

◆ getMorphingFrameNum()

int gModel::getMorphingFrameNum ( ) const

◆ getMorphingSpeed()

int gModel::getMorphingSpeed ( ) const

◆ getMorphingTarget()

int gModel::getMorphingTarget ( ) const

◆ isAnimated()

bool gModel::isAnimated ( ) const

◆ isVertexAnimated()

bool gModel::isVertexAnimated ( ) const

◆ isVertexAnimationStoredOnVram()

bool gModel::isVertexAnimationStoredOnVram ( ) const

◆ load()

void gModel::load ( const std::string &  fullPath)

◆ loadModel()

void gModel::loadModel ( const std::string &  modelPath)

◆ loadModelWithOriginalVertices()

void gModel::loadModelWithOriginalVertices ( const std::string &  modelPath)

◆ loadMorphingTargetModel()

void gModel::loadMorphingTargetModel ( const std::string &  modelPath)

◆ makeVertexAnimated()

void gModel::makeVertexAnimated ( bool  storeOnVram = true)

◆ move() [1/2]

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

◆ move() [2/2]

void gModel::move ( float  dx,
float  dy,
float  dz 
)
inline

◆ nextAnimationFrame()

void gModel::nextAnimationFrame ( )

◆ nextMorphingFrame()

void gModel::nextMorphingFrame ( )

◆ pan()

void gModel::pan ( float  radians)

◆ panDeg()

void gModel::panDeg ( float  degrees)
inline

◆ processTransformationMatrix()

void gModel::processTransformationMatrix ( )
overrideprotectedvirtual

Reimplemented from gNode.

◆ recalculateBoundingBox()

void gModel::recalculateBoundingBox ( )

◆ roll()

void gModel::roll ( float  radians)

◆ rollDeg()

void gModel::rollDeg ( float  degrees)
inline

◆ rotate() [1/2]

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

◆ rotate() [2/2]

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

◆ rotateAround()

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

◆ rotateAroundDeg()

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

◆ rotateDeg()

void gModel::rotateDeg ( float  degrees,
float  ax,
float  ay,
float  az 
)
inline

◆ scale() [1/2]

void gModel::scale ( float  s)

◆ scale() [2/2]

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

◆ setAnimationFrameNo()

void gModel::setAnimationFrameNo ( int  frameNo)

◆ setAnimationFrameNum()

void gModel::setAnimationFrameNum ( int  animationKeyNum)

◆ setAnimationFramerate()

void gModel::setAnimationFramerate ( float  animationFramerate)

◆ setEnableFrustumCulling()

void gModel::setEnableFrustumCulling ( bool  enable)

◆ setMorphingFrameNo()

void gModel::setMorphingFrameNo ( int  morphingAnimationNo)

◆ setMorphingFrameNum()

void gModel::setMorphingFrameNum ( int  morphingFrameNum)

◆ setMorphingSpeed()

void gModel::setMorphingSpeed ( int  speed)

◆ setMorphingTarget()

void gModel::setMorphingTarget ( int  morphingTargetId)

◆ setOrientation() [1/2]

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

◆ setOrientation() [2/2]

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

◆ setPosition() [1/2]

void gModel::setPosition ( const glm::vec3 &  p)

◆ setPosition() [2/2]

void gModel::setPosition ( float  px,
float  py,
float  pz 
)
inline

◆ setScale() [1/3]

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

◆ setScale() [2/3]

void gModel::setScale ( float  s)
inline

◆ setScale() [3/3]

void gModel::setScale ( float  sx,
float  sy,
float  sz 
)
inline

◆ setTransformationMatrix()

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

◆ tilt()

void gModel::tilt ( float  radians)

◆ tiltDeg()

void gModel::tiltDeg ( float  degrees)
inline

◆ truck()

void gModel::truck ( float  distance)

Member Data Documentation

◆ directory

std::string gModel::directory

◆ meshes

std::deque<gSkinnedMesh*> gModel::meshes

◆ textures_loaded

std::deque<gTexture*> gModel::textures_loaded

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