1st installment of gizmo scale 3D
This commit is contained in:
@@ -1130,7 +1130,11 @@ GLCanvas3D::Gizmos::~Gizmos()
|
||||
|
||||
bool GLCanvas3D::Gizmos::init()
|
||||
{
|
||||
#if ENABLE_GIZMOS_3D
|
||||
GLGizmoBase* gizmo = new GLGizmoScale3D;
|
||||
#else
|
||||
GLGizmoBase* gizmo = new GLGizmoScale;
|
||||
#endif // ENABLE_GIZMOS_3D
|
||||
if (gizmo == nullptr)
|
||||
return false;
|
||||
|
||||
@@ -1359,7 +1363,11 @@ float GLCanvas3D::Gizmos::get_scale() const
|
||||
return 1.0f;
|
||||
|
||||
GizmosMap::const_iterator it = m_gizmos.find(Scale);
|
||||
#if ENABLE_GIZMOS_3D
|
||||
return (it != m_gizmos.end()) ? reinterpret_cast<GLGizmoScale3D*>(it->second)->get_scale_x() : 1.0f;
|
||||
#else
|
||||
return (it != m_gizmos.end()) ? reinterpret_cast<GLGizmoScale*>(it->second)->get_scale() : 1.0f;
|
||||
#endif // ENABLE_GIZMOS_3D
|
||||
}
|
||||
|
||||
void GLCanvas3D::Gizmos::set_scale(float scale)
|
||||
@@ -1369,7 +1377,11 @@ void GLCanvas3D::Gizmos::set_scale(float scale)
|
||||
|
||||
GizmosMap::const_iterator it = m_gizmos.find(Scale);
|
||||
if (it != m_gizmos.end())
|
||||
#if ENABLE_GIZMOS_3D
|
||||
reinterpret_cast<GLGizmoScale3D*>(it->second)->set_scale(scale);
|
||||
#else
|
||||
reinterpret_cast<GLGizmoScale*>(it->second)->set_scale(scale);
|
||||
#endif // ENABLE_GIZMOS_3D
|
||||
}
|
||||
|
||||
float GLCanvas3D::Gizmos::get_angle_z() const
|
||||
|
||||
Reference in New Issue
Block a user