Assimp
v4.1. (December 2018)
|
Class which hold and render scene. More...
Inherits QGLWidget.
Classes | |
struct | SLightParameters |
Parameters of light source. More... | |
Public Types | |
enum | ELightType { ELightType::Directional, ELightType::Point, ELightType::Spot } |
Type of light source. More... | |
Signals | |
void | Paint_Finished (const size_t pPaintTime_ms, const GLfloat pDistance) |
Signal. More... | |
void | SceneObject_Camera (const QString &pName) |
Signal. More... | |
void | SceneObject_LightSource (const QString &pName) |
Signal. More... | |
Public Member Functions | |
void | Camera_Rotate (const GLfloat pAngle_X, const GLfloat pAngle_Y, const GLfloat pAngle_Z) |
Rotate camera around axisees. More... | |
void | Camera_RotateScene (const GLfloat pAngle_X, const GLfloat pAngle_Y, const GLfloat pAngle_Z) |
Rotate scene around axisees. More... | |
void | Camera_Set (const size_t pCameraNumber) |
Set view from pointed camera. More... | |
void | Camera_Translate (const GLfloat pTranslate_X, const GLfloat pTranslate_Y, const GLfloat pTranslate_Z) |
Translate camera along axises. More... | |
CGLView (QWidget *pParent) | |
Constructor. More... | |
void | Enable_SceneBBox (const bool pEnable) |
Enable drawing scene bounding box. More... | |
void | Enable_Textures (const bool pEnable) |
Control textures drawing. More... | |
void | FreeScene () |
Free all helper objects data. More... | |
void | Lighting_Disable () |
Disable OpenGL lighting. More... | |
void | Lighting_DisableSource (const size_t pLightNumber) |
void Lighting_DisableSource(const size_t pLightNumber) Disable light source, More... | |
void | Lighting_EditSource (const size_t pLightNumber, const SLightParameters &pLightParameters) |
Edit light source properties. More... | |
void | Lighting_Enable () |
Enable OpenGL lighting. More... | |
void | Lighting_EnableSource (const size_t pLightNumber) |
TODO: function set. More... | |
void | SetScene (const aiScene *pScene, const QString &pScenePath) |
Set scene for rendering. More... | |
virtual | ~CGLView () |
Destructor. More... | |
Protected Member Functions | |
void | drawCoordSystem () |
void | initializeGL () override |
Override function to initialise OpenGL. More... | |
void | paintGL () override |
Override function for rendering. More... | |
void | resizeGL (int pWidth, int pHeight) override |
Class which hold and render scene.
|
strong |
Type of light source.
Enumerator | |
---|---|
Directional | |
Point | |
Spot |
|
explicit |
Constructor.
[in] | pParent | - parent widget. |
TODO: may be templates can be used.
|
virtual |
Destructor.
void CGLView::Camera_Rotate | ( | const GLfloat | pAngle_X, |
const GLfloat | pAngle_Y, | ||
const GLfloat | pAngle_Z | ||
) |
Rotate camera around axisees.
[in] | pAngle_X | - specifies the angle of rotation around axis oX, in degrees. |
[in] | pAngle_Y | - specifies the angle of rotation around axis oY, in degrees. |
[in] | pAngle_Z | - specifies the angle of rotation around axis oZ, in degrees. |
void CGLView::Camera_RotateScene | ( | const GLfloat | pAngle_X, |
const GLfloat | pAngle_Y, | ||
const GLfloat | pAngle_Z | ||
) |
Rotate scene around axisees.
[in] | pAngle_X | - specifies the angle of rotation around axis oX, in degrees. |
[in] | pAngle_Y | - specifies the angle of rotation around axis oY, in degrees. |
[in] | pAngle_Z | - specifies the angle of rotation around axis oZ, in degrees. |
void CGLView::Camera_Set | ( | const size_t | pCameraNumber | ) |
Set view from pointed camera.
[in] | pCamera_Index | - index of the camera (aiScene::mCameras). |
void CGLView::Camera_Translate | ( | const GLfloat | pTranslate_X, |
const GLfloat | pTranslate_Y, | ||
const GLfloat | pTranslate_Z | ||
) |
Translate camera along axises.
In local coordinates.
[in] | pTranslate_X | - specifies the X coordinate of translation vector. |
[in] | pTranslate_Y | - specifies the Y coordinate of translation vector. |
[in] | pTranslate_Z | - specifies the Z coordinate of translation vector. |
|
protected |
|
inline |
Enable drawing scene bounding box.
[in] | pEnable | - if true then bbox will be drawing, if false - will not be drawing. |
void CGLView::Enable_Textures | ( | const bool | pEnable | ) |
Control textures drawing.
[in] | pEnable | - if true then enable textures, false - disable textures. |
void CGLView::FreeScene | ( | ) |
Free all helper objects data.
|
overrideprotected |
Override function to initialise OpenGL.
void CGLView::Lighting_Disable | ( | ) |
Disable OpenGL lighting.
void CGLView::Lighting_DisableSource | ( | const size_t | pLightNumber | ) |
void Lighting_DisableSource(const size_t pLightNumber) Disable light source,
[in] | pLightNumber | - light source number. aiScene::mLights. |
TODO: return value;
void CGLView::Lighting_EditSource | ( | const size_t | pLightNumber, |
const SLightParameters & | pLightParameters | ||
) |
Edit light source properties.
[in] | pLightNumber | - light source number. aiScene::mLights. |
[in] | pLightParameters | - light source parameters. |
TODO: return value;
void CGLView::Lighting_Enable | ( | ) |
Enable OpenGL lighting.
void CGLView::Lighting_EnableSource | ( | const size_t | pLightNumber | ) |
TODO: function set.
Enable light source.
[in] | pLightNumber | - light source number. aiScene::mLights. |
TODO: return value;
|
signal |
Signal.
Emits when execution of paintGL is end.
[out] | pPaintTime_ms | - time spent for rendering, in milliseconds. |
[out] | pDistance | - distance between current camera and center of the scene. |
|
overrideprotected |
Override function for rendering.
TODO: display list
|
overrideprotected |
[in] | pWidth | - new width of viewport. |
[in] | pHeight | - new height of viewport. |
TODO: znear/zfar depend on scene size.
|
signal |
Signal.
Emit for every camera found in scene. Also for default camera.
[out] | pName | - name of the camera. |
|
signal |
Signal.
Emit for every light source found in scene. Also for default light source.
[out] | pName | - name of the light source. |
void CGLView::SetScene | ( | const aiScene * | pScene, |
const QString & | pScenePath | ||
) |
Set scene for rendering.
[in] | pScene | - pointer to scene. |
[in] | pScenePath | - path to the file of the scene. |
TODO: find light source node and apply all transformations