pub struct ForceLayout3D { /* private fields */ }Expand description
3D 力导向布局(八叉树 Barnes–Hut),CPU 投影视图(G5)的数据源。
Implementations§
Source§impl ForceLayout3D
impl ForceLayout3D
Sourcepub fn new(config: LayoutConfig) -> Self
pub fn new(config: LayoutConfig) -> Self
便捷构造(LayoutSim::new 的固有形式,调用方无需 import trait)。
Sourcepub fn rebuild(&mut self, payload: &GraphPayload)
pub fn rebuild(&mut self, payload: &GraphPayload)
全量重建。见 LayoutSim::rebuild。
Sourcepub fn incremental(&mut self, payload: &GraphPayload)
pub fn incremental(&mut self, payload: &GraphPayload)
增量并入。见 LayoutSim::incremental。
Sourcepub fn step(&mut self)
pub fn step(&mut self)
一步迭代。见 LayoutSim::step。
Sourcepub fn is_cooled(&self) -> bool
pub fn is_cooled(&self) -> bool
是否已冷却。见 LayoutSim::is_cooled。
Sourcepub fn snapshot(&self) -> LayoutSnapshot<Vec3>
pub fn snapshot(&self) -> LayoutSnapshot<Vec3>
状态快照。见 LayoutSim::snapshot。
Sourcepub fn set_pinned(&mut self, id: NodeId, pinned: bool)
pub fn set_pinned(&mut self, id: NodeId, pinned: bool)
固定 / 解除固定节点。见 LayoutSim::set_pinned。
Trait Implementations§
Source§impl LayoutSim for ForceLayout3D
impl LayoutSim for ForceLayout3D
type Pos = Vec3
fn new(config: LayoutConfig) -> Self
Source§fn rebuild(&mut self, payload: &GraphPayload)
fn rebuild(&mut self, payload: &GraphPayload)
全量重建(丢弃旧位置)。
Source§fn incremental(&mut self, payload: &GraphPayload)
fn incremental(&mut self, payload: &GraphPayload)
增量并入:保留已有节点位置,新节点放在邻居附近。
fn set_pinned(&mut self, id: NodeId, pinned: bool)
fn step(&mut self)
fn is_cooled(&self) -> bool
fn snapshot(&self) -> LayoutSnapshot<Vec3>
Auto Trait Implementations§
impl Forget for ForceLayout3D
impl Freeze for ForceLayout3Dwhere
*const u8 is !null: Freeze,
PhantomData<SimPoint>: Freeze,
PhantomData<(u32, u32, f32)>: Freeze,
PhantomData<Vec3>: Freeze,
PhantomData<BhNode<3>>: Freeze,
PhantomData<[f32; 3]>: Freeze,
PhantomData<i32>: Freeze,
impl Move for ForceLayout3D
impl RefUnwindSafe for ForceLayout3D
impl Send for ForceLayout3Dwhere
RawVecInner: Send,
impl Sync for ForceLayout3Dwhere
RawVecInner: Sync,
impl Unpin for ForceLayout3D
impl UnsafeUnpin for ForceLayout3Dwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<SimPoint>: UnsafeUnpin,
PhantomData<(u32, u32, f32)>: UnsafeUnpin,
PhantomData<Vec3>: UnsafeUnpin,
PhantomData<BhNode<3>>: UnsafeUnpin,
PhantomData<[f32; 3]>: UnsafeUnpin,
PhantomData<i32>: UnsafeUnpin,
impl UnwindSafe for ForceLayout3Dwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more