Tech ENABLE_RAYCAST_PICKING - Raytraced picking of Scale Gizmo
This commit is contained in:
parent
9962a5a873
commit
0cedf331b1
@ -363,7 +363,7 @@ void GLGizmoMove3D::on_render()
|
|||||||
#if ENABLE_RAYCAST_PICKING
|
#if ENABLE_RAYCAST_PICKING
|
||||||
void GLGizmoMove3D::on_register_raycasters_for_picking()
|
void GLGizmoMove3D::on_register_raycasters_for_picking()
|
||||||
{
|
{
|
||||||
// this gizmo is rendered on top of the scene, so the raytraced picker should take it into account
|
// the gizmo grabbers are rendered on top of the scene, so the raytraced picker should take it into account
|
||||||
m_parent.set_raycaster_gizmos_on_top(true);
|
m_parent.set_raycaster_gizmos_on_top(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,7 +885,7 @@ void GLGizmoRotate3D::on_render()
|
|||||||
#if ENABLE_RAYCAST_PICKING
|
#if ENABLE_RAYCAST_PICKING
|
||||||
void GLGizmoRotate3D::on_register_raycasters_for_picking()
|
void GLGizmoRotate3D::on_register_raycasters_for_picking()
|
||||||
{
|
{
|
||||||
// this gizmo is rendered on top of the scene, so the raytraced picker should take it into account
|
// the gizmo grabbers are rendered on top of the scene, so the raytraced picker should take it into account
|
||||||
m_parent.set_raycaster_gizmos_on_top(true);
|
m_parent.set_raycaster_gizmos_on_top(true);
|
||||||
for (GLGizmoRotate& g : m_gizmos) {
|
for (GLGizmoRotate& g : m_gizmos) {
|
||||||
g.register_raycasters_for_picking(true);
|
g.register_raycasters_for_picking(true);
|
||||||
|
@ -643,6 +643,19 @@ void GLGizmoScale3D::on_render()
|
|||||||
#endif // ENABLE_WORLD_COORDINATE
|
#endif // ENABLE_WORLD_COORDINATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_RAYCAST_PICKING
|
||||||
|
void GLGizmoScale3D::on_register_raycasters_for_picking()
|
||||||
|
{
|
||||||
|
// the gizmo grabbers are rendered on top of the scene, so the raytraced picker should take it into account
|
||||||
|
m_parent.set_raycaster_gizmos_on_top(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GLGizmoScale3D::on_unregister_raycasters_for_picking()
|
||||||
|
{
|
||||||
|
m_parent.set_raycaster_gizmos_on_top(false);
|
||||||
|
}
|
||||||
|
#endif // ENABLE_RAYCAST_PICKING
|
||||||
|
|
||||||
#if !ENABLE_RAYCAST_PICKING
|
#if !ENABLE_RAYCAST_PICKING
|
||||||
void GLGizmoScale3D::on_render_for_picking()
|
void GLGizmoScale3D::on_render_for_picking()
|
||||||
{
|
{
|
||||||
|
@ -93,9 +93,12 @@ protected:
|
|||||||
virtual void on_stop_dragging() override;
|
virtual void on_stop_dragging() override;
|
||||||
virtual void on_dragging(const UpdateData& data) override;
|
virtual void on_dragging(const UpdateData& data) override;
|
||||||
virtual void on_render() override;
|
virtual void on_render() override;
|
||||||
#if !ENABLE_RAYCAST_PICKING
|
#if ENABLE_RAYCAST_PICKING
|
||||||
|
virtual void on_register_raycasters_for_picking() override;
|
||||||
|
virtual void on_unregister_raycasters_for_picking() override;
|
||||||
|
#else
|
||||||
virtual void on_render_for_picking() override;
|
virtual void on_render_for_picking() override;
|
||||||
#endif // !ENABLE_RAYCAST_PICKING
|
#endif // ENABLE_RAYCAST_PICKING
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if ENABLE_LEGACY_OPENGL_REMOVAL
|
#if ENABLE_LEGACY_OPENGL_REMOVAL
|
||||||
|
Loading…
Reference in New Issue
Block a user