diff options
Diffstat (limited to 'tools/editor/spatial_editor_gizmos.h')
-rw-r--r-- | tools/editor/spatial_editor_gizmos.h | 104 |
1 files changed, 74 insertions, 30 deletions
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h index 3d7272f522..d6bdb39481 100644 --- a/tools/editor/spatial_editor_gizmos.h +++ b/tools/editor/spatial_editor_gizmos.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -45,6 +45,8 @@ #include "scene/3d/portal.h" #include "scene/3d/ray_cast.h" #include "scene/3d/navigation_mesh.h" +#include "scene/3d/reflection_probe.h" +#include "scene/3d/gi_probe.h" #include "scene/3d/vehicle_body.h" #include "scene/3d/collision_polygon.h" @@ -307,6 +309,44 @@ public: }; +class ReflectionProbeGizmo : public EditorSpatialGizmo { + + OBJ_TYPE(ReflectionProbeGizmo ,EditorSpatialGizmo); + + + ReflectionProbe* probe; + +public: + + virtual String get_handle_name(int p_idx) const; + virtual Variant get_handle_value(int p_idx) const; + virtual void set_handle(int p_idx,Camera *p_camera, const Point2& p_point); + virtual void commit_handle(int p_idx,const Variant& p_restore,bool p_cancel=false); + + void redraw(); + ReflectionProbeGizmo(ReflectionProbe* p_notifier=NULL); + +}; + +class GIProbeGizmo : public EditorSpatialGizmo { + + OBJ_TYPE(GIProbeGizmo ,EditorSpatialGizmo); + + + GIProbe* probe; + +public: + + virtual String get_handle_name(int p_idx) const; + virtual Variant get_handle_value(int p_idx) const; + virtual void set_handle(int p_idx,Camera *p_camera, const Point2& p_point); + virtual void commit_handle(int p_idx,const Variant& p_restore,bool p_cancel=false); + + void redraw(); + GIProbeGizmo(GIProbe* p_notifier=NULL); + +}; + class CollisionShapeSpatialGizmo : public EditorSpatialGizmo { @@ -339,6 +379,7 @@ public: }; + class RayCastSpatialGizmo : public EditorSpatialGizmo { OBJ_TYPE(RayCastSpatialGizmo,EditorSpatialGizmo); @@ -464,34 +505,38 @@ public: class SpatialEditorGizmos { public: - Ref<FixedMaterial> create_line_material(const Color& p_base_color); - Ref<FixedMaterial> create_solid_material(const Color& p_base_color); - Ref<FixedMaterial> handle2_material; - Ref<FixedMaterial> handle_material; - Ref<FixedMaterial> light_material; - Ref<FixedMaterial> light_material_omni_icon; - Ref<FixedMaterial> light_material_directional_icon; - Ref<FixedMaterial> camera_material; - Ref<FixedMaterial> skeleton_material; - Ref<FixedMaterial> room_material; - Ref<FixedMaterial> portal_material; - Ref<FixedMaterial> raycast_material; - Ref<FixedMaterial> visibility_notifier_material; - Ref<FixedMaterial> car_wheel_material; - Ref<FixedMaterial> joint_material; - - Ref<FixedMaterial> navmesh_edge_material; - Ref<FixedMaterial> navmesh_solid_material; - Ref<FixedMaterial> navmesh_edge_material_disabled; - Ref<FixedMaterial> navmesh_solid_material_disabled; - - Ref<FixedMaterial> listener_icon; - - Ref<FixedMaterial> sample_player_icon; - Ref<FixedMaterial> stream_player_icon; - Ref<FixedMaterial> visibility_notifier_icon; - - Ref<FixedMaterial> shape_material; + Ref<FixedSpatialMaterial> create_line_material(const Color& p_base_color); + Ref<FixedSpatialMaterial> create_solid_material(const Color& p_base_color); + Ref<FixedSpatialMaterial> handle2_material; + Ref<FixedSpatialMaterial> handle_material; + Ref<FixedSpatialMaterial> light_material; + Ref<FixedSpatialMaterial> light_material_omni_icon; + Ref<FixedSpatialMaterial> light_material_directional_icon; + Ref<FixedSpatialMaterial> camera_material; + Ref<FixedSpatialMaterial> skeleton_material; + Ref<FixedSpatialMaterial> reflection_probe_material; + Ref<FixedSpatialMaterial> reflection_probe_material_internal; + Ref<FixedSpatialMaterial> gi_probe_material; + Ref<FixedSpatialMaterial> gi_probe_material_internal; + Ref<FixedSpatialMaterial> room_material; + Ref<FixedSpatialMaterial> portal_material; + Ref<FixedSpatialMaterial> raycast_material; + Ref<FixedSpatialMaterial> visibility_notifier_material; + Ref<FixedSpatialMaterial> car_wheel_material; + Ref<FixedSpatialMaterial> joint_material; + + Ref<FixedSpatialMaterial> navmesh_edge_material; + Ref<FixedSpatialMaterial> navmesh_solid_material; + Ref<FixedSpatialMaterial> navmesh_edge_material_disabled; + Ref<FixedSpatialMaterial> navmesh_solid_material_disabled; + + Ref<FixedSpatialMaterial> listener_icon; + + Ref<FixedSpatialMaterial> sample_player_icon; + Ref<FixedSpatialMaterial> stream_player_icon; + Ref<FixedSpatialMaterial> visibility_notifier_icon; + + Ref<FixedSpatialMaterial> shape_material; Ref<Texture> handle_t; Ref<Mesh> pos3d_mesh; @@ -505,5 +550,4 @@ public: SpatialEditorGizmos(); }; - #endif // SPATIAL_EDITOR_GIZMOS_H |