Struct kiss3d::scene::SceneNode [] [src]

pub struct SceneNode { /* fields omitted */ }

A node of the scene graph.

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

Methods

impl SceneNode
[src]

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 cube as a children of this node. The cube is initially axis-aligned and centered at (0, 0, 0).

Arguments

  • wx - the cube extent along the z axis
  • wy - the cube extent along the y axis
  • wz - the cube extent along the z axis

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

Arguments

  • r - the sphere radius

Adds a cone to the scene. The cone is initially centered at (0, 0, 0) and points toward the positive y axis.

Arguments

  • h - the cone height
  • r - the cone base radius

Adds a cylinder to this node children. The cylinder is initially centered at (0, 0, 0) and has its principal axis aligned with the y axis.

Arguments

  • h - the cylinder height
  • r - the cylinder base radius

Adds a capsule to this node children. The capsule is initially centered at (0, 0, 0) and has its principal axis aligned with the y axis.

Arguments

  • h - the capsule height
  • r - the capsule caps radius

Adds a double-sided quad to this node children. The quad is initially centered at (0, 0, 0). The quad itself is composed of a user-defined number of triangles regularly spaced on a grid. This is the main way to draw height maps.

Arguments

  • w - the quad width.
  • h - the quad height.
  • wsubdivs - number of horizontal subdivisions. This correspond to the number of squares which will be placed horizontally on each line. Must not be 0.
  • hsubdivs - number of vertical subdivisions. This correspond to the number of squares which will be placed vertically on each line. Must not be 0. update.

Adds a double-sided quad with the specified vertices.

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 mesh.

Creates and adds a new object using a mesh descriptor.

Creates and adds multiple nodes created from an obj file.

This will create a new node serving as a root of the scene described by the obj file. This newly created node is added to this node's children.

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 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.

Recomputes the normals of the meshes of the objects contained by this node and its children.

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

The provided closure is called once per object.

Accesses the normals 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

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.

Move and orient the object such that it is placed at the point eye and have its x axis oriented toward at.

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

impl Clone for SceneNode
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more