![]() |
Maria GDK 5.1.0.237
Documentation of native code in develop branch
|
#include <StkTransformControlsModel.h>
Public Types | |
| enum class | HitComponent { NONE , X_AXIS , Y_AXIS , Z_AXIS , X_ROTATION , Y_ROTATION , Z_ROTATION , X_SCALE , Y_SCALE , Z_SCALE } |
Public Types inherited from STK::GraphicsModel | |
| using | filter_fn = std::function< bool(const GraphicsModel &)> |
Public Member Functions | |
| TransformControlsModel (std::shared_ptr< ShaderProgramManager > prg_mgr, float size) | |
| void | setOpacity (float opacity) |
| void | setTargetModel (std::shared_ptr< GraphicsModel > target_model) |
| bool | isXAxisVisible () const |
| bool | isYAxisVisible () const |
| bool | isZAxisVisible () const |
| bool | isXRingVisible () const |
| bool | isYRingVisible () const |
| bool | isZRingVisible () const |
| void | setXAxisVisible (bool visible) |
| void | setYAxisVisible (bool visible) |
| void | setZAxisVisible (bool visible) |
| void | setXRingVisible (bool visible) |
| void | setYRingVisible (bool visible) |
| void | setZRingVisible (bool visible) |
| bool | isXAxisEnabled () const |
| bool | isYAxisEnabled () const |
| bool | isZAxisEnabled () const |
| bool | isXRingEnabled () const |
| bool | isYRingEnabled () const |
| bool | isZRingEnabled () const |
| void | setXAxisEnabled (bool enabled) |
| void | setYAxisEnabled (bool enabled) |
| void | setZAxisEnabled (bool enabled) |
| void | setXRingEnabled (bool enabled) |
| void | setYRingEnabled (bool enabled) |
| void | setZRingEnabled (bool enabled) |
| float | getXRotation () const |
| float | getXRotationTotal () const |
| float | getYRotation () const |
| float | getYRotationTotal () const |
| float | getZRotation () const |
| float | getZRotationTotal () const |
| float | getXTranslation () const |
| float | getXTranslationTotal () const |
| float | getYTranslation () const |
| float | getYTranslationTotal () const |
| float | getZTranslation () const |
| float | getZTranslationTotal () const |
| HitComponent | hitTest (const STK::Camera &cam, const STK::Viewport &vp, double x, double y, int hitRadius) |
| std::string | getHitComponentName (TransformControlsModel::HitComponent comp) const |
| bool | isActive () const |
| void | mousePressEvent (const STK::Camera &cam, const STK::Viewport &vp, double x, double y) |
| void | mouseMoveEvent (const STK::Camera &cam, const STK::Viewport &vp, double x, double y) |
| void | mouseReleaseEvent () |
| HitComponent | getActiveComponent () const |
| bool | getCurrentTransform (STK::Matrix4x4f &xfm) |
| void | setBaseTransform (const STK::Matrix4x4f &base_transform) |
| const STK::Matrix4x4f & | getBaseTransform () const |
| const STK::Matrix4x4f & | getAccumulatedTransform () const |
| void | setAccumulatedTransform (float rot_x, float rot_y, float rot_z, float trans_x, float trans_y, float trans_z, float scale) |
| void | setAccumulatedTransform (const STK::Matrix4x4f &xfm) |
| void | resetTransform () |
| STK::Matrix4x4f | getTargetModelTransform () |
| float | getScale () const |
Public Member Functions inherited from STK::MeshGraphicsModel | |
| MeshGraphicsModel (std::shared_ptr< ShaderProgramManager > prg_mgr, const std::string &name="") | |
| void | addMeshRender (std::shared_ptr< MeshRender > mesh_render) |
| unsigned int | addMeshGroup (std::shared_ptr< MaterialMeshGroup > mesh_grp, const unsigned int layer=0) |
| std::shared_ptr< MaterialMeshGroup > | getMeshGroup (const unsigned int id) |
| void | setMeshGroup (const unsigned int id, std::shared_ptr< MaterialMeshGroup > mesh_grp) |
| void | removeMeshGroup (const unsigned int id) |
| const std::map< unsigned int, std::shared_ptr< MaterialMeshGroup > > & | getMeshGroups () const |
| std::map< unsigned int, std::shared_ptr< MaterialMeshGroup > > & | getMeshGroups () |
| std::shared_ptr< STK::Material > | findMaterial (const std::string &name) const |
| void | needsUpdate (const bool needs_update) |
| std::shared_ptr< const MeshNode > | getRoot () const |
| std::shared_ptr< MeshNode > | getRoot () |
| void | setRoot (const std::shared_ptr< MeshNode > &node) |
| void | redraw (const STK::Camera &cam, const STK::Viewport &vp, int render_mask=STK::OpaqueMask, const std::vector< std::shared_ptr< STK::Uniform > > *uniforms=nullptr) override |
| void | calcBoundingSphere (STK::Vector3f ¢er, double &radius) override |
| void | drawShadowMap (const STK::Camera &cam, const STK::Viewport &vp, const Camera &shd_cam, const Viewport &shd_vp, STK::ShaderProgram *shader, STK::ShaderProgram *tex_shader) override |
| void | addAnimation (std::shared_ptr< AnimationController > anim) |
| const std::vector< std::shared_ptr< AnimationController > > & | getAnimations () const |
| int | findAnimations (const std::string &search, std::list< std::shared_ptr< AnimationController > > &anims) |
| std::shared_ptr< AnimationController > | findAnimation (const std::string &name) |
| Find the animation with the exact name. | |
| void | findMeshNodes (const std::string &search, std::vector< std::shared_ptr< STK::MeshNode > > &nodes) const |
| void | findMeshNodes (const std::regex &re, std::vector< std::shared_ptr< STK::MeshNode > > &nodes) const |
| std::shared_ptr< STK::MeshNode > | findMeshNode (const std::string &name) const |
| void | calcBoundingBox (STK::Vector3f &min, STK::Vector3f &max) override |
| std::shared_ptr< STK::ShaderProgramManager > | shaderProgramManager () |
| std::shared_ptr< MeshGraphicsModel > | refCopy () |
| void | redrawBackToFront (const Camera &cam, const STK::Viewport &, int render_mask, const std::vector< std::shared_ptr< Uniform > > *uniforms) |
Public Member Functions inherited from STK::GraphicsModel | |
| GraphicsModel (const std::string &name="") | |
| void | setName (const std::string &name) |
| const std::string & | getName () const |
| virtual void | filterChildren (const filter_fn &fn, std::vector< std::shared_ptr< GraphicsModel > > &matched) |
| void | setTransform (const STK::Matrix4x4f &transform) |
| const STK::Matrix4x4f & | getTransform () const |
| void | setEnvironmentMap (const std::shared_ptr< STK::CubeMap > &env_map) |
| std::shared_ptr< STK::CubeMap > | getEnvironmentMap () |
| std::shared_ptr< const STK::CubeMap > | getEnvironmentMap () const |
| void | setWireframe (bool wireframe) |
| bool | getWireframe () const |
| void | setInvisible (bool invisible) |
| bool | getInvisible () const |
| void | setCastShadows (bool cast_shadows) |
| bool | getCastShadows () const |
| void | setDebugGraphics (bool debug_gfx) |
| bool | getDebugGraphics () const |
| virtual void | redraw (const STK::Camera &cam, const STK::Viewport &vp, int render_mask=STK::OpaqueMask, const std::vector< std::shared_ptr< STK::Uniform > > *uniforms=nullptr)=0 |
| virtual void | drawShadowMap (const STK::Camera &cam, const STK::Viewport &vp, const STK::Camera &shd_cam, const STK::Viewport &shd_vp, STK::ShaderProgram *shader, STK::ShaderProgram *tex_shader)=0 |
| virtual void | calcBoundingSphere (STK::Vector3f ¢er, double &radius)=0 |
| virtual void | calcBoundingBox (STK::Vector3f &min, STK::Vector3f &max)=0 |
Additional Inherited Members | |
Static Public Member Functions inherited from STK::MeshGraphicsModel | |
| static void | getMeshModels (std::shared_ptr< STK::GraphicsModel > rootModel, std::vector< std::shared_ptr< STK::MeshGraphicsModel > > &mesh_models) |
Protected Types inherited from STK::MeshGraphicsModel | |
| using | visit_func = std::function< void(const std::shared_ptr< GraphicsModel > &)> |
Protected Member Functions inherited from STK::MeshGraphicsModel | |
| void | calcNodeBounds (const MeshNode &parent, const STK::Matrix4x4f &m, STK::Vector3f &min, STK::Vector3f &max) |
| void | drawHilitMeshes (const STK::Matrix4x4f &mesh_mvp, const STK::Matrix4x4f &pj, const std::vector< HilitMesh > &hilitMeshes) |
| void | update () |
| void | updateIfNeeded () |
Static Protected Member Functions inherited from STK::MeshGraphicsModel | |
| static void | visitTree (const std::shared_ptr< GraphicsModel > &root, visit_func func) |
Protected Attributes inherited from STK::MeshGraphicsModel | |
| std::shared_ptr< MeshNode > | root_ |
| std::map< unsigned int, std::shared_ptr< MaterialMeshGroup > > | material_meshes_ |
| bool | needs_update_ |
| std::shared_ptr< ShaderProgramManager > | prg_mgr_ |
| std::vector< std::shared_ptr< AnimationController > > | animations_ |
Protected Attributes inherited from STK::GraphicsModel | |
| std::string | name_ |
| STK::Matrix4x4f | transform_ |
| std::shared_ptr< STK::CubeMap > | env_map_ |
| bool | wireframe_ |
| bool | invisible_ |
| bool | cast_shadows_ |
| bool | debug_gfx_ |
TransformControlsModel - Short description. Detailed description.
|
inline |
Combined transform relative to original.
| bool TransformControlsModel::getCurrentTransform | ( | STK::Matrix4x4f & | xfm | ) |
Get current transform matrix. This method will return the currently active transform during a mouse operation, for example a rotation action. It will return true if an operation is active. If not, it will simply return the identity matrix.