refactor(scenegraph): remove new function

This commit is contained in:
Nova
2022-06-04 14:22:57 -04:00
parent efe870c193
commit fedbe17b7a
2 changed files with 1 additions and 13 deletions

View File

@@ -13,11 +13,10 @@ impl<'a> Client<'a> {
pub fn from_connection(connection: UnixStream) -> RcCell<Self> {
let client = RcCell::new(Client {
weak_ref: WeakCell::new(),
scenegraph: None,
scenegraph: Default::default(),
messenger: Messenger::new(connection),
});
client.borrow_mut().weak_ref = client.downgrade();
client.borrow_mut().scenegraph = Some(Scenegraph::new(client.clone()));
client
}
pub fn dispatch(&self) -> Result<(), std::io::Error> {

View File

@@ -11,17 +11,6 @@ pub struct Scenegraph<'a> {
pub nodes: HashMap<String, RcCell<Node<'a>>>,
}
impl<'a> Scenegraph<'a> {
pub fn new(client: RcCell<Client<'a>>) -> Self {
// root: Spatial::new(Some(client), "/", Default::default()),
// hmd: Spatial::new(Some(client), "/hmd", Default::default()),
Scenegraph {
client: client.downgrade(),
nodes: HashMap::new(),
}
}
}
impl<'a> Default for Scenegraph<'a> {
fn default() -> Self {
Scenegraph {