mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-11 22:50:08 +00:00
removed AbstractSceneGraph + BaseSceneGraph, merged in SceneGraph
This commit is contained in:
@@ -37,7 +37,7 @@ use crate::{
|
||||
ok_or_continue, pool::Handle, some_or_continue, SafeLock,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{Button, ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -33,7 +33,7 @@ use crate::{
|
||||
},
|
||||
engine::{Engine, GraphicsContext},
|
||||
fxhash::FxHashMap,
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
graphics::{framebuffer::ReadTarget, gpu_texture::GpuTextureKind},
|
||||
gui::{
|
||||
font::Font, formatted_text::WrapMode, screen::ScreenBuilder, text::TextBuilder,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
fyrox::{
|
||||
core::{pool::Handle, reflect::Reflect, some_or_return},
|
||||
engine::Engine,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
dropdown_list::{DropdownListBuilder, DropdownListMessage},
|
||||
|
||||
@@ -29,7 +29,7 @@ use crate::{
|
||||
},
|
||||
pool::Handle,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::message::{KeyCode, KeyboardModifiers, MouseButton},
|
||||
renderer::bundle::{RenderContext, RenderDataBundleStorage},
|
||||
scene::{
|
||||
|
||||
@@ -40,7 +40,6 @@ use crate::{
|
||||
Message,
|
||||
};
|
||||
use fyrox::core::algebra::Vector2;
|
||||
use fyrox::graph::BaseSceneGraph;
|
||||
use fyrox::gui::widget::WidgetMessage;
|
||||
use fyrox::gui::window::WindowAlignment;
|
||||
use fyrox::scene::collider::BitMask;
|
||||
|
||||
@@ -34,7 +34,7 @@ use crate::{
|
||||
pool::Handle,
|
||||
reflect::prelude::*,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
fyrox::{
|
||||
core::{color::Color, pool::Handle, sstorage::ImmutableString},
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
graphics::{
|
||||
error::FrameworkError,
|
||||
framebuffer::{Attachment, GpuFrameBuffer},
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
math::Matrix4Ext,
|
||||
pool::Handle,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
scene::{
|
||||
base::BaseBuilder,
|
||||
graph::Graph,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
math::{plane::Plane, Matrix4Ext},
|
||||
pool::Handle,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
scene::{
|
||||
base::BaseBuilder,
|
||||
graph::Graph,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
math::{plane::Plane, Matrix4Ext},
|
||||
pool::Handle,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
scene::{
|
||||
base::BaseBuilder,
|
||||
graph::Graph,
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::scene::{EntityInfo, GameScene, SelectionContainer};
|
||||
use fyrox::core::reflect::Reflect;
|
||||
use fyrox::core::some_or_return;
|
||||
use fyrox::engine::Engine;
|
||||
use fyrox::graph::BaseSceneGraph;
|
||||
use fyrox::graph::SceneGraph;
|
||||
use fyrox::gui::inspector::PropertyChanged;
|
||||
use fyrox::scene::SceneContainer;
|
||||
use std::{
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
uuid::{uuid, Uuid},
|
||||
TypeUuidProvider,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{BuildContext, UiNode},
|
||||
scene::node::Node,
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ use crate::{
|
||||
TypeUuidProvider,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
inspector::{
|
||||
editors::{
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ use crate::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::EventLoop,
|
||||
fxhash::{FxHashMap, FxHashSet},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
button::ButtonBuilder,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
fyrox::{
|
||||
core::pool::Handle,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
menu::{self, MenuItemMessage},
|
||||
message::UiMessage,
|
||||
|
||||
@@ -33,7 +33,7 @@ use crate::fyrox::{
|
||||
node::blendspace::BlendSpacePoint, node::PoseNode, parameter::Parameter,
|
||||
parameter::ParameterContainer, Machine, MachineLayer,
|
||||
},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
brush::Brush,
|
||||
define_widget_deref,
|
||||
|
||||
@@ -29,7 +29,7 @@ use crate::fyrox::{
|
||||
uuid_provider,
|
||||
visitor::prelude::*,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
define_widget_deref,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use crate::fyrox::core::pool::ErasedHandle;
|
||||
use crate::fyrox::core::variable::InheritableVariable;
|
||||
use crate::fyrox::graph::{BaseSceneGraph, SceneGraphNode};
|
||||
use crate::fyrox::graph::{SceneGraph, SceneGraphNode};
|
||||
use crate::fyrox::{
|
||||
core::{
|
||||
algebra::Vector2,
|
||||
|
||||
@@ -32,7 +32,7 @@ use crate::{
|
||||
},
|
||||
AnimationContainer,
|
||||
},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
check_box::CheckBoxMessage,
|
||||
dock::{DockingManagerBuilder, DockingManagerMessage, TileBuilder, TileContent},
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::fyrox::{
|
||||
color::Color, pool::Handle, reflect::prelude::*, type_traits::prelude::*, uuid::uuid,
|
||||
visitor::prelude::*,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::{BorderBuilder, BorderMessage},
|
||||
brush::Brush,
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
generic_animation::machine::parameter::{
|
||||
Parameter, ParameterContainer, ParameterDefinition,
|
||||
},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
inspector::{
|
||||
editors::{
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
engine::Engine,
|
||||
generic_animation::machine::Machine,
|
||||
generic_animation::machine::{PoseNode, State, Transition},
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::inspector::PropertyChanged,
|
||||
scene::SceneContainer,
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
fyrox::{
|
||||
core::pool::Handle,
|
||||
generic_animation::machine::{Machine, State, Transition},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
menu::MenuItemMessage,
|
||||
message::UiMessage,
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::fyrox::graph::{PrefabData, SceneGraph, SceneGraphNode};
|
||||
use crate::fyrox::graph::{PrefabData, SceneGraphNode};
|
||||
use crate::fyrox::{
|
||||
core::pool::{ErasedHandle, Handle},
|
||||
generic_animation::machine::{Machine, MachineLayer, State, Transition},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
message::{MessageDirection, UiMessage},
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::fyrox::{
|
||||
node::{blendspace::BlendSpace, blendspace::BlendSpacePoint, BasePoseNode},
|
||||
BlendAnimations, BlendAnimationsByIndex, MachineLayer, PlayAnimation, PoseNode, State,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
menu::MenuItemMessage,
|
||||
message::UiMessage,
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::fyrox::{
|
||||
machine::{MachineLayer, PoseNode, State},
|
||||
Animation,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
message::{MessageDirection, UiMessage},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
core::pool::Handle,
|
||||
fxhash::FxHashSet,
|
||||
generic_animation::machine::{mask::LayerMask, Machine, MachineLayer},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
check_box::{CheckBoxBuilder, CheckBoxMessage},
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::fyrox::{
|
||||
signal::AnimationSignal, track::Track, value::ValueBinding, Animation, AnimationContainer,
|
||||
RootMotionSettings,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
};
|
||||
use crate::plugins::animation::selection::AnimationSelection;
|
||||
use crate::{
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
engine::ApplicationLoopController,
|
||||
fxhash::FxHashSet,
|
||||
generic_animation::{signal::AnimationSignal, AnimationContainer},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
brush::Brush,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::fyrox::graph::BaseSceneGraph;
|
||||
use crate::fyrox::graph::SceneGraph;
|
||||
use crate::fyrox::{
|
||||
core::{
|
||||
algebra::{Point2, Vector2},
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
},
|
||||
engine::Engine,
|
||||
generic_animation::{Animation, AnimationContainer},
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::inspector::PropertyChanged,
|
||||
scene::SceneContainer,
|
||||
},
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::{
|
||||
pool::ErasedHandle, pool::Handle,
|
||||
},
|
||||
generic_animation::{Animation, AnimationContainer, RootMotionSettings},
|
||||
graph::{BaseSceneGraph, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{PrefabData, SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{Button, ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -44,7 +44,7 @@ use crate::{
|
||||
value::{ValueBinding, ValueType},
|
||||
Animation,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
graphics::DrawParameters,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
|
||||
@@ -52,7 +52,7 @@ use crate::{
|
||||
Uuid,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::{message::UiMessage, BuildContext, UiNode},
|
||||
material::{
|
||||
shader::{ShaderResource, ShaderResourceExtension},
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
fyrox::{
|
||||
core::{algebra::Vector3, pool::Handle, reflect::Reflect, TypeUuidProvider},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
message::UiMessage,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use crate::{
|
||||
fyrox::{
|
||||
core::dyntype::{DynTypeConstructorContainer, DynTypeContainer},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
core::{
|
||||
parking_lot::Mutex, pool::Handle, reflect::prelude::*, type_traits::prelude::*,
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
algebra::Vector2, color::Color, pool::Handle, reflect::prelude::*,
|
||||
type_traits::prelude::*, uuid_provider, visitor::prelude::*,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
draw::{CommandTexture, Draw, DrawingContext},
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
color::Color, pool::ErasedHandle, pool::Handle, reflect::prelude::*,
|
||||
type_traits::prelude::*, visitor::prelude::*, SafeLock,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -29,7 +29,7 @@ use crate::{
|
||||
color::Color, log::Log, parking_lot::Mutex, pool::Handle, reflect::prelude::*,
|
||||
type_traits::prelude::*, uuid::uuid, visitor::prelude::*, PhantomDataSendSync,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::fyrox::{
|
||||
uuid_provider, visitor::prelude::*,
|
||||
},
|
||||
engine::SerializationContext,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
dropdown_list::{DropdownList, DropdownListMessage},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::fyrox::graph::BaseSceneGraph;
|
||||
use crate::fyrox::graph::SceneGraph;
|
||||
use crate::fyrox::{
|
||||
core::{
|
||||
algebra::Vector2, parking_lot::Mutex, pool::Handle, reflect::prelude::*,
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
futures::executor::block_on, log::Log, make_relative_path, pool::Handle,
|
||||
reflect::prelude::*, type_traits::prelude::*, visitor::prelude::*,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
define_widget_deref,
|
||||
|
||||
@@ -26,7 +26,7 @@ use crate::{
|
||||
algebra::Vector2, make_relative_path, pool::Handle, reflect::prelude::*,
|
||||
type_traits::prelude::*, uuid_provider, visitor::prelude::*,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
grid::{Column, GridBuilder, Row},
|
||||
image::{ImageBuilder, ImageMessage},
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
scene::commands::terrain::{AddTerrainLayerCommand, DeleteTerrainLayerCommand},
|
||||
Command,
|
||||
};
|
||||
use fyrox::graph::BaseSceneGraph;
|
||||
use fyrox::graph::SceneGraph;
|
||||
|
||||
pub struct SceneNodePropertyChangedHandler;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
type_traits::prelude::*,
|
||||
},
|
||||
engine::SerializationContext,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::ButtonMessage,
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
color::Color, log::Log, parking_lot::Mutex, reflect::prelude::*,
|
||||
type_traits::prelude::*, uuid_provider, visitor::prelude::*, SafeLock,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
Uuid,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
grid::{Column, GridBuilder, Row},
|
||||
|
||||
@@ -29,7 +29,7 @@ use crate::{
|
||||
reflect::prelude::*,
|
||||
some_or_return,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
grid::{Column, GridBuilder, Row},
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::{
|
||||
log::Log, parking_lot::lock_api::Mutex, pool::Handle, reflect::Reflect, some_or_return,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
dock::DockingManagerMessage,
|
||||
|
||||
@@ -88,7 +88,7 @@ use crate::fyrox::{
|
||||
},
|
||||
engine::Engine,
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
brush::Brush,
|
||||
|
||||
@@ -38,7 +38,7 @@ use crate::{
|
||||
SafeLock,
|
||||
},
|
||||
fxhash::{FxHashMap, FxHashSet},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
define_widget_deref,
|
||||
|
||||
@@ -30,7 +30,7 @@ use crate::{
|
||||
asset::item::AssetItem,
|
||||
fyrox::{
|
||||
core::pool::Handle,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
brush::Brush,
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
color::Color,
|
||||
pool::Handle,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
grid::{Column, GridBuilder, Row},
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
algebra::{UnitQuaternion, Vector3},
|
||||
pool::{Handle, Ticket},
|
||||
},
|
||||
graph::{BaseSceneGraph, LinkScheme, SceneGraphNode},
|
||||
graph::{LinkScheme, SceneGraph, SceneGraphNode},
|
||||
scene::{
|
||||
base::Base,
|
||||
graph::{Graph, SubGraph},
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::fyrox::{
|
||||
asset::manager::ResourceManager,
|
||||
core::{log::Log, pool::Handle, reflect::prelude::*, type_traits::prelude::*},
|
||||
engine::SerializationContext,
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
scene::{graph::SubGraph, node::Node, Scene},
|
||||
};
|
||||
use crate::{
|
||||
|
||||
@@ -39,7 +39,7 @@ use crate::{
|
||||
},
|
||||
engine::{Engine, SerializationContext},
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
inspector::PropertyChanged,
|
||||
message::UiMessage,
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::fyrox::{
|
||||
sstorage::ImmutableString, type_traits::prelude::*, uuid_provider, visitor::prelude::*,
|
||||
},
|
||||
fxhash::FxHashSet,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::{
|
||||
type_traits::prelude::*, visitor::prelude::*,
|
||||
},
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
core::{color::Color, math::Rect, pool::Handle, uuid::Uuid},
|
||||
engine::Engine,
|
||||
fxhash::FxHashMap,
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
graphics::PolygonFillMode,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
|
||||
@@ -5,11 +5,10 @@ use crate::{
|
||||
ui_scene::{commands::UiSceneContext, UiScene},
|
||||
Message,
|
||||
};
|
||||
use fyrox::graph::SceneGraph;
|
||||
use fyrox::{
|
||||
core::{pool::Handle, variable::InheritableVariable},
|
||||
engine::Engine,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
formatted_text::{RunSet, WrapMode},
|
||||
message::UiMessage,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::fyrox::core::pool::Handle;
|
||||
use crate::fyrox::graph::BaseSceneGraph;
|
||||
use crate::fyrox::graph::SceneGraph;
|
||||
use crate::fyrox::gui::{UiNode, UserInterface};
|
||||
use crate::ui_scene::selection::UiSelection;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! Ui graph manipulation commands.
|
||||
|
||||
use crate::command::{CommandContext, CommandTrait};
|
||||
use crate::fyrox::graph::{BaseSceneGraph, LinkScheme, SceneGraphNode};
|
||||
use crate::fyrox::graph::{LinkScheme, SceneGraph, SceneGraphNode};
|
||||
use crate::fyrox::{
|
||||
core::pool::Handle,
|
||||
gui::{SubGraph, UiNode, UserInterface},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::{
|
||||
fyrox::graph::BaseSceneGraph,
|
||||
fyrox::graph::SceneGraph,
|
||||
fyrox::{
|
||||
core::{
|
||||
algebra::Vector2,
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::fyrox::{
|
||||
TypeUuidProvider,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{BuildContext, UiNode},
|
||||
};
|
||||
use crate::{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
use crate::{
|
||||
fyrox::graph::{BaseSceneGraph, SceneGraphNode},
|
||||
fyrox::graph::{SceneGraph, SceneGraphNode},
|
||||
fyrox::{
|
||||
core::pool::Handle,
|
||||
gui::{
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
},
|
||||
engine::Engine,
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
draw::{CommandTexture, Draw},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
fyrox::{
|
||||
core::{pool::Handle, reflect::Reflect, some_or_return},
|
||||
engine::Engine,
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
gui::{inspector::PropertyChanged, UiNode, UserInterface},
|
||||
scene::SceneContainer,
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::fyrox::{
|
||||
futures::executor::block_on, make_pretty_type_name, make_relative_path, pool::ErasedHandle,
|
||||
pool::Handle, reflect::Reflect,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::Border, button::Button, canvas::Canvas, check_box::CheckBox,
|
||||
file_browser::FileBrowser, grid::Grid, image::Image, inspector::Inspector,
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
core::{
|
||||
algebra::Vector2, color::Color, pool::ErasedHandle, pool::Handle, visitor::Visitor,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
button::ButtonBuilder,
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::{
|
||||
make_relative_path,
|
||||
pool::{ErasedHandle, Handle},
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
resource::model::{Model, ModelResourceExtension},
|
||||
scene::{node::Node, Scene},
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
algebra::Vector2, color::Color, pool::ErasedHandle, pool::Handle, reflect::prelude::*,
|
||||
type_traits::prelude::*, uuid_provider, visitor::prelude::*,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
draw::{CommandTexture, Draw, DrawingContext},
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
asset::untyped::UntypedResource,
|
||||
core::{algebra::Vector2, algebra::Vector3, pool::Handle, reflect::Reflect},
|
||||
engine::SerializationContext,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
constructor::WidgetConstructorContainer,
|
||||
file_browser::FileSelectorMessage,
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
asset::item::AssetItem,
|
||||
fyrox::{
|
||||
core::pool::{ErasedHandle, Handle},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
gui::{
|
||||
border::BorderBuilder,
|
||||
button::{ButtonBuilder, ButtonMessage},
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::{
|
||||
some_or_return,
|
||||
},
|
||||
engine::Engine,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
gui::inspector::PropertyChanged,
|
||||
scene::{graph::Graph, node::Node, SceneContainer},
|
||||
},
|
||||
|
||||
+12
-57
@@ -25,11 +25,11 @@
|
||||
pub mod constructor;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{AbstractSceneGraph, BaseSceneGraph, SceneGraph};
|
||||
pub use crate::SceneGraph;
|
||||
}
|
||||
|
||||
use fxhash::FxHashMap;
|
||||
use fyrox_core::pool::{ErasedHandle, ObjectOrVariant, PayloadContainer, PoolError};
|
||||
use fyrox_core::pool::{ObjectOrVariant, PayloadContainer, PoolError};
|
||||
use fyrox_core::reflect::ReflectHandle;
|
||||
use fyrox_core::{
|
||||
log::{Log, MessageKind},
|
||||
@@ -468,11 +468,7 @@ fn reset_property_modified_flag(entity: &mut dyn Reflect, path: &str) {
|
||||
})
|
||||
}
|
||||
|
||||
pub trait AbstractSceneNode: ComponentProvider + Reflect + NameProvider {}
|
||||
|
||||
impl<T: SceneGraphNode> AbstractSceneNode for T {}
|
||||
|
||||
pub trait SceneGraphNode: AbstractSceneNode + Clone + 'static {
|
||||
pub trait SceneGraphNode: ComponentProvider + Reflect + NameProvider + Clone + 'static {
|
||||
type Base: Clone;
|
||||
type SceneGraph: SceneGraph<Node = Self>;
|
||||
type ResourceData: PrefabData<Graph = Self::SceneGraph>;
|
||||
@@ -674,21 +670,11 @@ impl<N> Default for LinkScheme<N> {
|
||||
}
|
||||
}
|
||||
|
||||
pub trait AbstractSceneGraph: 'static {
|
||||
fn try_get_node_untyped(
|
||||
&self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&dyn AbstractSceneNode, PoolError>;
|
||||
fn try_get_node_untyped_mut(
|
||||
&mut self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&mut dyn AbstractSceneNode, PoolError>;
|
||||
}
|
||||
|
||||
/// BaseSceneGraph is a dyn-compatible trait for all scene graphs to implement.
|
||||
/// Methods that would not be dyn-compatible are available through the
|
||||
/// [`SceneGraph`] trait.
|
||||
pub trait BaseSceneGraph: AbstractSceneGraph {
|
||||
/// SceneGraph is a non-dyn-compatible trait for all scene graphs to implement.
|
||||
/// To use a scene graph as a dyn object, use `dyn SceneGraph` because
|
||||
/// [`SceneGraph`] is dyn-compatible.
|
||||
pub trait SceneGraph: 'static {
|
||||
type ObjectType: Sized;
|
||||
type Prefab: PrefabData<Graph = Self>;
|
||||
type NodeContainer: PayloadContainer<Element = Self::Node>;
|
||||
type Node: SceneGraphNode<SceneGraph = Self, ResourceData = Self::Prefab>;
|
||||
@@ -838,13 +824,7 @@ pub trait BaseSceneGraph: AbstractSceneGraph {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// SceneGraph is a non-dyn-compatible trait for all scene graphs to implement.
|
||||
/// To use a scene graph as a dyn object, use `dyn BaseSceneGraph` because
|
||||
/// [`BaseSceneGraph`] is dyn-compatible.
|
||||
pub trait SceneGraph: BaseSceneGraph {
|
||||
type ObjectType: Sized;
|
||||
/// Creates new iterator that iterates over internal collection giving (handle; node) pairs.
|
||||
fn pair_iter(&self) -> impl Iterator<Item = (Handle<Self::Node>, &Self::Node)>;
|
||||
|
||||
@@ -1478,14 +1458,11 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::{
|
||||
AbstractSceneGraph, AbstractSceneNode, BaseSceneGraph, NodeHandleMap, NodeMapping,
|
||||
PrefabData, SceneGraph, SceneGraphNode,
|
||||
};
|
||||
use crate::{NodeHandleMap, NodeMapping, PrefabData, SceneGraph, SceneGraphNode};
|
||||
use fyrox_core::pool::{ObjectOrVariant, ObjectOrVariantHelper, PoolError};
|
||||
use fyrox_core::{
|
||||
define_as_any_trait,
|
||||
pool::{ErasedHandle, Handle, PayloadContainer, Pool},
|
||||
pool::{Handle, PayloadContainer, Pool},
|
||||
reflect::prelude::*,
|
||||
type_traits::prelude::*,
|
||||
visitor::prelude::*,
|
||||
@@ -1812,27 +1789,8 @@ mod test {
|
||||
}
|
||||
}
|
||||
|
||||
impl AbstractSceneGraph for Graph {
|
||||
fn try_get_node_untyped(
|
||||
&self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&dyn AbstractSceneNode, PoolError> {
|
||||
self.nodes
|
||||
.try_borrow(handle.into())
|
||||
.map(|n| n as &dyn AbstractSceneNode)
|
||||
}
|
||||
|
||||
fn try_get_node_untyped_mut(
|
||||
&mut self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&mut dyn AbstractSceneNode, PoolError> {
|
||||
self.nodes
|
||||
.try_borrow_mut(handle.into())
|
||||
.map(|n| n as &mut dyn AbstractSceneNode)
|
||||
}
|
||||
}
|
||||
|
||||
impl BaseSceneGraph for Graph {
|
||||
impl SceneGraph for Graph {
|
||||
type ObjectType = Node;
|
||||
type Prefab = Graph;
|
||||
type NodeContainer = NodeContainer;
|
||||
type Node = Node;
|
||||
@@ -1932,10 +1890,7 @@ mod test {
|
||||
.try_borrow(handle)
|
||||
.map(|n| n.0.deref().type_name())
|
||||
}
|
||||
}
|
||||
|
||||
impl SceneGraph for Graph {
|
||||
type ObjectType = Node;
|
||||
fn pair_iter(&self) -> impl Iterator<Item = (Handle<Self::Node>, &Self::Node)> {
|
||||
self.nodes.pair_iter()
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ use crate::{
|
||||
};
|
||||
use fyrox_core::dyntype::DynTypeConstructorContainer;
|
||||
use fyrox_core::visitor::error::VisitError;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use std::{
|
||||
ops::Deref,
|
||||
sync::{mpsc::Sender, Arc},
|
||||
|
||||
@@ -54,7 +54,7 @@ use crate::{
|
||||
},
|
||||
engine::{error::EngineError, input::InputState, task::TaskPoolHandler},
|
||||
event::Event,
|
||||
graph::{BaseSceneGraph, NodeMapping, SceneGraph},
|
||||
graph::{NodeMapping, SceneGraph},
|
||||
graphics::error::FrameworkError,
|
||||
gui::{
|
||||
constructor::WidgetConstructorContainer,
|
||||
@@ -3144,7 +3144,7 @@ mod test {
|
||||
visitor::prelude::*,
|
||||
},
|
||||
engine::{task::TaskPoolHandler, GraphicsContext, ScriptProcessor},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
scene::{base::BaseBuilder, node::Node, pivot::PivotBuilder, Scene, SceneContainer},
|
||||
script::{
|
||||
ScriptContext, ScriptDeinitContext, ScriptMessageContext, ScriptMessagePayload,
|
||||
|
||||
@@ -34,7 +34,7 @@ use crate::{
|
||||
pool::Handle,
|
||||
sstorage::ImmutableString,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
graphics::{
|
||||
error::FrameworkError,
|
||||
framebuffer::{GpuFrameBuffer, ResourceBindGroup, ResourceBinding},
|
||||
@@ -79,7 +79,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use fxhash::{FxBuildHasher, FxHashMap, FxHasher};
|
||||
use fyrox_graph::{SceneGraph, SceneGraphNode};
|
||||
use fyrox_graph::SceneGraphNode;
|
||||
use fyrox_resource::manager::ResourceManager;
|
||||
use std::{
|
||||
fmt::{Debug, Formatter},
|
||||
|
||||
@@ -97,7 +97,7 @@ use crate::{
|
||||
};
|
||||
use cache::DynamicSurfaceCache;
|
||||
use fxhash::FxHashMap;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use lazy_static::lazy_static;
|
||||
use observer::{Observer, ObserversCollection};
|
||||
use resources::RendererResources;
|
||||
|
||||
@@ -32,7 +32,7 @@ use crate::{
|
||||
pool::Handle,
|
||||
ImmutableString,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
graphics::{
|
||||
error::FrameworkError,
|
||||
framebuffer::Attachment,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
use crate::{
|
||||
core::{algebra::Vector3, pool::Handle},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
graphics::{
|
||||
error::FrameworkError,
|
||||
query::{GpuQuery, QueryKind, QueryResult},
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
math::{self, triangulator::triangulate, RotationOrder},
|
||||
pool::Handle,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
material,
|
||||
material::MaterialResourceBinding,
|
||||
resource::{
|
||||
|
||||
@@ -32,7 +32,7 @@ use crate::scene::graph::Graph;
|
||||
use crate::scene::mesh::Mesh;
|
||||
use crate::scene::node::Node;
|
||||
use fyrox_animation::track::TrackBinding;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use gltf::animation::util::ReadOutputs;
|
||||
use gltf::animation::Channel;
|
||||
use gltf::animation::{Interpolation, Property};
|
||||
|
||||
@@ -29,8 +29,8 @@ use crate::core::algebra::{Matrix4, Unit};
|
||||
use crate::core::log::Log;
|
||||
use crate::core::pool::Handle;
|
||||
use crate::core::TypeUuidProvider;
|
||||
use crate::graph::BaseSceneGraph;
|
||||
use crate::graph::NodeMapping;
|
||||
use crate::graph::SceneGraph;
|
||||
use crate::gui::core::io::FileError;
|
||||
use crate::material::MaterialResource;
|
||||
use crate::resource::model::{MaterialSearchOptions, Model, ModelImportOptions};
|
||||
|
||||
@@ -22,7 +22,6 @@ use crate::core::log::Log;
|
||||
use crate::core::pool::Handle;
|
||||
use crate::core::NameProvider;
|
||||
use crate::fxhash::{FxHashMap, FxHashSet};
|
||||
use crate::graph::BaseSceneGraph;
|
||||
use crate::graph::SceneGraph;
|
||||
use crate::scene::graph::Graph;
|
||||
use crate::scene::node::Node;
|
||||
|
||||
@@ -59,7 +59,7 @@ use crate::{
|
||||
},
|
||||
engine::SerializationContext,
|
||||
generic_animation::AnimationContainer,
|
||||
graph::{BaseSceneGraph, NodeHandleMap, NodeMapping, PrefabData, SceneGraph, SceneGraphNode},
|
||||
graph::{NodeHandleMap, NodeMapping, PrefabData, SceneGraph, SceneGraphNode},
|
||||
resource::fbx::{self, error::FbxError},
|
||||
scene::{
|
||||
animation::Animation, base::SceneNodeId, graph::Graph, node::Node, transform::Transform,
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::{BaseSceneGraph, SceneGraph};
|
||||
use fyrox_graph::SceneGraph;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
/// Scene specific root motion settings.
|
||||
|
||||
@@ -41,7 +41,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
pub mod absm;
|
||||
|
||||
@@ -35,7 +35,7 @@ use crate::{
|
||||
ImmutableString,
|
||||
},
|
||||
engine::SerializationContext,
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
resource::model::ModelResource,
|
||||
scene::{node::Node, transform::Transform},
|
||||
script::{Script, ScriptTrait},
|
||||
|
||||
@@ -34,7 +34,7 @@ use crate::{
|
||||
variable::InheritableVariable,
|
||||
visitor::{Visit, VisitResult, Visitor},
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
resource::texture::{
|
||||
TextureKind, TexturePixelKind, TextureResource, TextureResourceExtension, TextureWrapMode,
|
||||
},
|
||||
|
||||
@@ -50,7 +50,7 @@ use fyrox_core::algebra::{Isometry3, Translation3};
|
||||
use fyrox_core::uuid_provider;
|
||||
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::{BaseSceneGraph, SceneGraph};
|
||||
use fyrox_graph::SceneGraph;
|
||||
use rapier3d::geometry::{self, ColliderHandle};
|
||||
use std::fmt::Write;
|
||||
use std::{
|
||||
|
||||
@@ -43,7 +43,7 @@ use crate::{
|
||||
};
|
||||
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::BaseSceneGraph;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
/// Decal is an image that gets projected to a geometry of a scene. Blood splatters, bullet holes, scratches
|
||||
|
||||
@@ -36,7 +36,7 @@ use crate::{
|
||||
visitor::prelude::*,
|
||||
ImmutableString, TypeUuidProvider,
|
||||
},
|
||||
graph::BaseSceneGraph,
|
||||
graph::SceneGraph,
|
||||
scene::{
|
||||
base::{Base, BaseBuilder},
|
||||
collider::InteractionGroups,
|
||||
@@ -51,7 +51,6 @@ use crate::{
|
||||
};
|
||||
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::SceneGraph;
|
||||
use rapier2d::geometry::ColliderHandle;
|
||||
use std::{
|
||||
cell::Cell,
|
||||
|
||||
@@ -44,7 +44,7 @@ use crate::{
|
||||
use fyrox_core::uuid_provider;
|
||||
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::{BaseSceneGraph, SceneGraph};
|
||||
use fyrox_graph::SceneGraph;
|
||||
use rapier2d::dynamics::ImpulseJointHandle;
|
||||
use std::{
|
||||
cell::{Cell, RefCell},
|
||||
|
||||
@@ -38,7 +38,7 @@ use crate::{
|
||||
visitor::prelude::*,
|
||||
BiDirHashMap, ImmutableString, SafeLock,
|
||||
},
|
||||
graph::{BaseSceneGraph, SceneGraphNode},
|
||||
graph::{SceneGraph, SceneGraphNode},
|
||||
scene::{
|
||||
self,
|
||||
collider::{self},
|
||||
@@ -58,7 +58,6 @@ use crate::{
|
||||
tilemap::TileMap,
|
||||
},
|
||||
};
|
||||
use fyrox_graph::SceneGraph;
|
||||
pub use rapier2d::geometry::shape::*;
|
||||
use rapier2d::parry::query::DefaultQueryDispatcher;
|
||||
use rapier2d::{
|
||||
|
||||
@@ -36,7 +36,7 @@ use crate::{
|
||||
variable::InheritableVariable,
|
||||
visitor::prelude::*,
|
||||
},
|
||||
graph::{constructor::ConstructorProvider, BaseSceneGraph},
|
||||
graph::{constructor::ConstructorProvider, SceneGraph},
|
||||
material::{Material, MaterialResource},
|
||||
renderer::{self, bundle::RenderContext},
|
||||
scene::{
|
||||
|
||||
@@ -53,7 +53,7 @@ use crate::{
|
||||
};
|
||||
|
||||
use fyrox_graph::constructor::ConstructorProvider;
|
||||
use fyrox_graph::{BaseSceneGraph, SceneGraph};
|
||||
use fyrox_graph::SceneGraph;
|
||||
use rapier2d::prelude::RigidBodyHandle;
|
||||
use std::{
|
||||
cell::Cell,
|
||||
|
||||
@@ -64,7 +64,7 @@ impl GraphEventBroadcaster {
|
||||
/// # use fyrox_impl::scene::graph::event::GraphEvent;
|
||||
/// # use fyrox_impl::scene::graph::Graph;
|
||||
/// # use fyrox_impl::scene::pivot::PivotBuilder;
|
||||
/// # use fyrox_impl::graph::BaseSceneGraph;
|
||||
/// # use fyrox_impl::graph::SceneGraph;
|
||||
///
|
||||
/// let mut graph = Graph::new();
|
||||
///
|
||||
|
||||
@@ -50,11 +50,11 @@ use crate::{
|
||||
instant,
|
||||
log::{Log, MessageKind},
|
||||
math::{aabb::AxisAlignedBoundingBox, Matrix4Ext},
|
||||
pool::{ErasedHandle, Handle, MultiBorrowContext, Pool, Ticket},
|
||||
pool::{Handle, MultiBorrowContext, Pool, Ticket},
|
||||
reflect::prelude::*,
|
||||
visitor::{Visit, VisitResult, Visitor},
|
||||
},
|
||||
graph::{AbstractSceneGraph, AbstractSceneNode, BaseSceneGraph, NodeHandleMap, SceneGraph},
|
||||
graph::{NodeHandleMap, SceneGraph},
|
||||
material::{MaterialResourceBinding, MaterialTextureBinding},
|
||||
resource::model::{Model, ModelResource, ModelResourceExtension},
|
||||
scene::{
|
||||
@@ -1429,7 +1429,7 @@ impl Graph {
|
||||
/// # use fyrox_impl::scene::node::Node;
|
||||
/// # use fyrox_impl::scene::graph::Graph;
|
||||
/// # use fyrox_impl::scene::pivot::Pivot;
|
||||
/// # use fyrox_graph::BaseSceneGraph;
|
||||
/// # use fyrox_graph::SceneGraph;
|
||||
/// let mut graph = Graph::new();
|
||||
/// graph.add_node(Node::new(Pivot::default()));
|
||||
/// graph.add_node(Node::new(Pivot::default()));
|
||||
@@ -1453,7 +1453,7 @@ impl Graph {
|
||||
/// # use fyrox_impl::scene::node::Node;
|
||||
/// # use fyrox_impl::scene::graph::Graph;
|
||||
/// # use fyrox_impl::scene::pivot::Pivot;
|
||||
/// # use fyrox_graph::BaseSceneGraph;
|
||||
/// # use fyrox_graph::SceneGraph;
|
||||
/// let mut graph = Graph::new();
|
||||
/// graph.add_node(Node::new(Pivot::default()));
|
||||
/// graph.add_node(Node::new(Pivot::default()));
|
||||
@@ -1911,27 +1911,8 @@ impl Visit for Graph {
|
||||
}
|
||||
}
|
||||
|
||||
impl AbstractSceneGraph for Graph {
|
||||
fn try_get_node_untyped(
|
||||
&self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&dyn AbstractSceneNode, PoolError> {
|
||||
self.pool
|
||||
.try_borrow(handle.into())
|
||||
.map(|n| n as &dyn AbstractSceneNode)
|
||||
}
|
||||
|
||||
fn try_get_node_untyped_mut(
|
||||
&mut self,
|
||||
handle: ErasedHandle,
|
||||
) -> Result<&mut dyn AbstractSceneNode, PoolError> {
|
||||
self.pool
|
||||
.try_borrow_mut(handle.into())
|
||||
.map(|n| n as &mut dyn AbstractSceneNode)
|
||||
}
|
||||
}
|
||||
|
||||
impl BaseSceneGraph for Graph {
|
||||
impl SceneGraph for Graph {
|
||||
type ObjectType = Node;
|
||||
type Prefab = Model;
|
||||
type NodeContainer = NodeContainer;
|
||||
type Node = Node;
|
||||
@@ -2085,10 +2066,7 @@ impl BaseSceneGraph for Graph {
|
||||
.try_borrow(handle)
|
||||
.map(|n| n.0.deref().type_name())
|
||||
}
|
||||
}
|
||||
|
||||
impl SceneGraph for Graph {
|
||||
type ObjectType = Node;
|
||||
#[inline]
|
||||
fn pair_iter(&self) -> impl Iterator<Item = (Handle<Self::Node>, &Self::Node)> {
|
||||
self.pool.pair_iter()
|
||||
@@ -2130,7 +2108,7 @@ mod test {
|
||||
visitor::prelude::*,
|
||||
},
|
||||
engine::{self, SerializationContext},
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graph::SceneGraph,
|
||||
resource::model::{Model, ModelResourceExtension},
|
||||
scene::{
|
||||
base::BaseBuilder,
|
||||
|
||||
@@ -78,7 +78,7 @@ use std::{
|
||||
};
|
||||
use strum_macros::{AsRefStr, EnumString, VariantNames};
|
||||
|
||||
use fyrox_graph::{BaseSceneGraph, SceneGraph, SceneGraphNode};
|
||||
use fyrox_graph::{SceneGraph, SceneGraphNode};
|
||||
pub use rapier3d::geometry::shape::*;
|
||||
use rapier3d::parry::query::DefaultQueryDispatcher;
|
||||
use rapier3d::prelude::FrictionModel;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user