pub struct Node {
Show 14 fields pub id: Option<String>, pub name: Option<String>, pub sid: Option<String>, pub ty: NodeType, pub layer: Vec<String>, pub asset: Option<Box<Asset>>, pub transforms: Vec<Transform>, pub instance_camera: Vec<Instance<Camera>>, pub instance_controller: Vec<Instance<Controller>>, pub instance_geometry: Vec<Instance<Geometry>>, pub instance_light: Vec<Instance<Light>>, pub instance_node: Vec<Instance<Node>>, pub children: Vec<Node>, pub extra: Vec<Extra>,
}
Expand description

Embodies the hierarchical relationship of elements in a scene.

The Node element declares a point of interest in a scene. A node denotes one point on a branch of the scene graph. The Node element is essentially the root of a subgraph of the entire scene graph.

Fields

id: Option<String>

A text string containing the unique identifier of the element.

name: Option<String>

The text string name of this element.

sid: Option<String>

A text string value containing the subidentifier of this element. This value must be unique within the scope of the parent element.

ty: NodeType

The type of the Node element.

layer: Vec<String>

The layers to which this node belongs.

asset: Option<Box<Asset>>

Asset management information about this element.

transforms: Vec<Transform>

Any combination of geometric transforms.

instance_camera: Vec<Instance<Camera>>

Allows the node to instantiate a camera object.

instance_controller: Vec<Instance<Controller>>

Allows the node to instantiate a controller object.

instance_geometry: Vec<Instance<Geometry>>

Allows the node to instantiate a geometry object.

instance_light: Vec<Instance<Light>>

Allows the node to instantiate a light object.

instance_node: Vec<Instance<Node>>

Allows the node to instantiate a hierarchy of other nodes.

children: Vec<Node>

Allows the node to recursively define hierarchy.

extra: Vec<Extra>

Provides arbitrary additional information about this element.

Implementations

Construct a new default node with the given id and name.

Add a transform to this node’s transformation stack.

Returns true if this node has no sub-elements.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Get the ID of the node.
Extract the relevant LocalMap field from a LocalMaps.
Extract the relevant LocalMap field from a LocalMaps.
The name of the library element. For example, the Geometry element has LIBRARY = "library_geometries", and the corresponding library type is Library<Geometry>. Read more
Extract the library from a single LibraryElement.
Make a LibraryElement from a Library.
Run the function f on all elements of type Self in the document doc.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.