#include <guiScene.h>
Inheritance diagram for GUIScene:
Collaboration diagram for GUIScene:Public Member Functions | |
| GUIScene (gui::IGUIEnvironment *env, scene::ISceneManager *smgr, gui::IGUIElement *parent, core::recti rect, s32 id=-1) | |
| ~GUIScene () | |
| scene::IAnimatedMeshSceneNode * | setMesh (scene::IAnimatedMesh *mesh=nullptr) |
| void | setTexture (u32 idx, video::ITexture *texture) |
| void | setBackgroundColor (const video::SColor &color) noexcept |
| void | setFrameLoop (f32 begin, f32 end) |
| Sets the frame loop range for the mesh. | |
| void | setAnimationSpeed (f32 speed) |
| Sets the animation speed (FPS) for the mesh. | |
| void | enableMouseControl (bool enable) noexcept |
| void | setRotation (v2f rot) noexcept |
| void | enableContinuousRotation (bool enable) noexcept |
| void | setStyles (const std::array< StyleSpec, StyleSpec::NUM_STATES > &styles) |
| virtual void | draw () |
| virtual bool | OnEvent (const SEvent &event) |
Private Member Functions | |
| void | calcOptimalDistance () |
| void | updateTargetPos () |
| void | updateCamera (scene::ISceneNode *target) |
| void | setCameraRotation (v3f rot) |
| bool | correctBounds (v3f &rot) |
| void | cameraLoop () |
| void | updateCameraPos () |
| v3f | getCameraRotation () const |
| void | rotateCamera (const v3f &delta) |
Private Attributes | |
| scene::ISceneManager * | m_smgr |
| video::IVideoDriver * | m_driver |
| scene::ICameraSceneNode * | m_cam |
| scene::ISceneNode * | m_target = nullptr |
| scene::IAnimatedMeshSceneNode * | m_mesh = nullptr |
| f32 | m_cam_distance = 50.f |
| u64 | m_last_time = 0 |
| v3f | m_cam_pos |
| v3f | m_target_pos |
| v3f | m_last_target_pos |
| v2f | m_curr_pos |
| v2f | m_last_pos |
| v2f | m_custom_rot |
| bool | m_mouse_ctrl = true |
| bool | m_update_cam = false |
| bool | m_inf_rot = false |
| bool | m_initial_rotation = true |
| video::SColor | m_bgcolor = 0 |
| GUIScene::GUIScene | ( | gui::IGUIEnvironment * | env, |
| scene::ISceneManager * | smgr, | ||
| gui::IGUIElement * | parent, | ||
| core::recti | rect, | ||
| s32 | id = -1 ) |
|
inlineprivate |
References m_cam, m_cam_distance, m_mesh, and m_update_cam.
Referenced by draw().
Here is the caller graph for this function:
|
private |
References correctBounds(), getCameraRotation(), m_cam, m_cam_distance, m_cam_pos, m_last_target_pos, m_target_pos, m_update_cam, setCameraRotation(), updateCameraPos(), and updateTargetPos().
Referenced by draw().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by cameraLoop(), and setCameraRotation().
Here is the caller graph for this function:
|
virtual |
References calcOptimalDistance(), cameraLoop(), porting::getDeltaMs(), porting::getTimeMs(), m_bgcolor, m_cam, m_custom_rot, m_driver, m_inf_rot, m_initial_rotation, m_last_time, m_mesh, m_smgr, m_target, rotateCamera(), and updateCamera().
Here is the call graph for this function:
|
inlinenoexcept |
References m_inf_rot.
Referenced by GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:
|
inlinenoexcept |
References m_mouse_ctrl.
Referenced by GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:
|
inlineprivate |
References m_cam_pos, and m_target_pos.
Referenced by cameraLoop(), and rotateCamera().
Here is the caller graph for this function:
|
virtual |
References m_curr_pos, m_last_pos, m_mouse_ctrl, and rotateCamera().
Here is the call graph for this function:
|
inlineprivate |
References getCameraRotation(), and setCameraRotation().
Referenced by draw(), and OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScene::setAnimationSpeed | ( | f32 | speed | ) |
Sets the animation speed (FPS) for the mesh.
References m_mesh.
Referenced by GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:
|
inlinenoexcept |
|
private |
References correctBounds(), m_cam, m_cam_distance, m_cam_pos, m_target_pos, and m_update_cam.
Referenced by cameraLoop(), and rotateCamera().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScene::setFrameLoop | ( | f32 | begin, |
| f32 | end ) |
Sets the frame loop range for the mesh.
References m_mesh.
Referenced by GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:| scene::IAnimatedMeshSceneNode * GUIScene::setMesh | ( | scene::IAnimatedMesh * | mesh = nullptr | ) |
References m_mesh, and m_smgr.
Referenced by ~GUIScene(), and GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:
|
inlinenoexcept |
References m_custom_rot.
Referenced by GUIFormSpecMenu::parseModel().
Here is the caller graph for this function:| void GUIScene::setStyles | ( | const std::array< StyleSpec, StyleSpec::NUM_STATES > & | styles | ) |
References StyleSpec::BGCOLOR, StyleSpec::getBool(), StyleSpec::getColor(), StyleSpec::getStyleFromStatePropagation(), m_bgcolor, StyleSpec::NOCLIP, setBackgroundColor(), and StyleSpec::STATE_DEFAULT.
Referenced by GUIFormSpecMenu::parseModel().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUIScene::setTexture | ( | u32 | idx, |
| video::ITexture * | texture ) |
|
private |
References m_last_target_pos, m_target, m_target_pos, m_update_cam, updateCameraPos(), and updateTargetPos().
Referenced by draw().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
References m_cam, and m_cam_pos.
Referenced by cameraLoop(), and updateCamera().
Here is the caller graph for this function:
|
private |
References m_last_target_pos, m_target, and m_target_pos.
Referenced by cameraLoop(), and updateCamera().
Here is the caller graph for this function:
|
private |
Referenced by draw(), setBackgroundColor(), and setStyles().
|
private |
Referenced by GUIScene(), calcOptimalDistance(), cameraLoop(), draw(), setCameraRotation(), and updateCameraPos().
|
private |
Referenced by calcOptimalDistance(), cameraLoop(), and setCameraRotation().
|
private |
Referenced by cameraLoop(), getCameraRotation(), setCameraRotation(), and updateCameraPos().
|
private |
Referenced by draw(), and setRotation().
|
private |
Referenced by GUIScene(), and draw().
|
private |
Referenced by draw(), and enableContinuousRotation().
|
private |
Referenced by draw().
|
private |
Referenced by cameraLoop(), updateCamera(), and updateTargetPos().
|
private |
Referenced by draw().
|
private |
Referenced by calcOptimalDistance(), draw(), setAnimationSpeed(), setFrameLoop(), setMesh(), and setTexture().
|
private |
Referenced by enableMouseControl(), and OnEvent().
|
private |
Referenced by GUIScene(), ~GUIScene(), draw(), and setMesh().
|
private |
Referenced by draw(), updateCamera(), and updateTargetPos().
|
private |
Referenced by cameraLoop(), getCameraRotation(), setCameraRotation(), updateCamera(), and updateTargetPos().
|
private |
Referenced by calcOptimalDistance(), cameraLoop(), setCameraRotation(), and updateCamera().