pub struct PlanarSceneNode { /* private fields */ }
Expand description

A node of the scene graph.

This may represent a group of other nodes, and/or contain an object that can be rendered.

Implementations

Creates a new scene node that is not rooted.

Creates a new empty, not rooted, node with identity transformations.

Removes this node from its parent.

The data of this scene node.

The data of this scene node.

Adds a node without object to this node children.

Adds a node as a child of parent.

Failures:

Fails if node already has a parent.

Adds a node containing an object to this node children.

Adds a rectangle as a children of this node. The rectangle is initially axis-aligned and centered at (0, 0).

Arguments
  • wx - the rectangle extent along the x axis
  • wy - the rectangle extent along the y axis

Adds a circle as a children of this node. The circle is initially centered at (0, 0, 0).

Arguments
  • r - the circle radius

Adds a 2D capsule as a children of this node. The capsule is initially centered at (0, 0).

Arguments
  • r - the circle radius

Creates and adds a new object using the geometry registered as geometry_name.

Creates and adds a new object to this node children using a 2D mesh.

Creates and adds a new object to this node children using a convex polyline

Applies a closure to each object contained by this node and its children.

Applies a closure to each object contained by this node and its children.

Render the scene graph rooted by this node.

Sets the material of the objects contained by this node and its children.

Sets the material of the objects contained by this node and its children.

Sets the width of the lines drawn for the objects contained by this node and its children.

Sets the color of the lines drawn for the objects contained by this node and its children.

Sets the size of the points drawn for the objects contained by this node and its children.

Activates or deactivates the rendering of the surfaces of the objects contained by this node and its children.

Activates or deactivates backface culling for the objects contained by this node and its children.

Mutably accesses the vertices of the objects contained by this node and its children.

The provided closure is called once per object.

Accesses the vertices of the objects contained by this node and its children.

The provided closure is called once per object.

Mutably accesses the faces of the objects contained by this node and its children.

The provided closure is called once per object.

Accesses the faces of the objects contained by this node and its children.

The provided closure is called once per object.

Mutably accesses the texture coordinates of the objects contained by this node and its children.

The provided closure is called once per object.

Accesses the texture coordinates of the objects contained by this node and its children.

The provided closure is called once per object.

Get the visibility status of node.

Sets the visibility of this node.

The node and its children are not rendered if it is not visible.

Sets the color of the objects contained by this node and its children.

Colors components must be on the range [0.0, 1.0].

Sets the texture of the objects contained by this node and its children.

The texture is loaded from a file and registered by the global TextureManager.

Arguments
  • path - relative path of the texture on the disk
  • name - &str to identify this texture in TextureManager

Sets the texture of the objects contained by this node and its children.

The texture is loaded from a file and registered by the global TextureManager.

Arguments
  • image_data - slice of bytes containing encoded image
  • name - &str to identify this texture in TextureManager

Sets the texture of the objects contained by this node and its children.

The texture must already have been registered as name.

Sets the texture of the objects contained by this node and its children.

Sets the local scaling factors of the object.

Appends a transformation to this node local transformation.

Prepends a transformation to this node local transformation.

Set this node local transformation.

Appends a translation to this node local transformation.

Prepends a translation to this node local transformation.

Sets the local translation of this node.

Appends a rotation to this node local transformation.

Appends a rotation to this node local transformation.

Prepends a rotation to this node local transformation.

Sets the local rotation of this node.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. 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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

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.