pub trait ParseLibrary: XNode {
    const LIBRARY: &'static str;

    // Required methods
    fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>;
    fn mk_element(lib: Library<Self>) -> LibraryElement;
}
Expand description

A trait for nodes that can be placed in a library element.

Required Associated Constants§

source

const LIBRARY: &'static str

The name of the library element. For example, the Geometry element has LIBRARY = "library_geometries", and the corresponding library type is Library<Geometry>.

Required Methods§

source

fn extract_element(e: &LibraryElement) -> Option<&Library<Self>>

Extract the library from a single LibraryElement.

source

fn mk_element(lib: Library<Self>) -> LibraryElement

Make a LibraryElement from a Library.

Implementors§

source§

impl ParseLibrary for Animation

source§

const LIBRARY: &'static str = "library_animations"

source§

impl ParseLibrary for AnimationClip

source§

const LIBRARY: &'static str = "library_animation_clips"

source§

impl ParseLibrary for Camera

source§

const LIBRARY: &'static str = "library_cameras"

source§

impl ParseLibrary for Controller

source§

const LIBRARY: &'static str = "library_controllers"

source§

impl ParseLibrary for Effect

source§

const LIBRARY: &'static str = "library_effects"

source§

impl ParseLibrary for ForceField

source§

const LIBRARY: &'static str = "library_force_fields"

source§

impl ParseLibrary for Geometry

source§

const LIBRARY: &'static str = "library_geometries"

source§

impl ParseLibrary for Image

source§

const LIBRARY: &'static str = "library_images"

source§

impl ParseLibrary for Light

source§

const LIBRARY: &'static str = "library_lights"

source§

impl ParseLibrary for Material

source§

const LIBRARY: &'static str = "library_materials"

source§

impl ParseLibrary for Node

source§

const LIBRARY: &'static str = "library_nodes"

source§

impl ParseLibrary for PhysicsMaterial

source§

const LIBRARY: &'static str = "library_physics_materials"

source§

impl ParseLibrary for PhysicsModel

source§

const LIBRARY: &'static str = "library_physics_models"

source§

impl ParseLibrary for PhysicsScene

source§

const LIBRARY: &'static str = "library_physics_scenes"

source§

impl ParseLibrary for VisualScene

source§

const LIBRARY: &'static str = "library_visual_scenes"