[][src]Struct kiss3d::window::Window

pub struct Window { /* fields omitted */ }

Structure representing a window and a 3D scene.

This is the main interface with the 3d engine.

Methods

impl Window
[src]

Indicates whether this window should be closed.

The window width.

The window height.

The size of the window.

Sets the maximum number of frames per second. Cannot be 0. None means there is no limit.

Set window title

Set the window icon. On wasm this does nothing.

window.set_icon(image::open("foo.ico")?);

Closes the window.

Hides the window, without closing it. Use show to make it visible again.

Makes the window visible. Use hide to hide it.

Sets the background color.

Set the size of all subsequent points to be drawn until the next time this function is envoked.

Adds a 3D line to be drawn during the next render.

The line is being drawn only during the next frame after this call. Therefore, this call must be executed at as many frames as you want it to remain visible.

Draws a 2D line to be drawn during the next render.

The line is being drawn only during the next frame after this call. Therefore, this call must be executed at as many frames as you want it to remain visible.

Adds a point to be drawn during the next frame.

Adds a string to be drawn during the next frame.

Deprecated

: Use remove_node instead.

Removes an object from the scene.

Removes an object from the scene.

Removes a 2D object from the scene.

Adds a group to the scene.

A group is a node not containing any object.

Adds an obj model to the scene.

Arguments

  • path - relative path to the obj file.
  • scale - scale to apply to the model.

Adds an unnamed mesh to the scene.

Creates and adds a new object using the geometry generated by a given procedural generator. Creates and adds a new object using a mesh descriptor.

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

Adds a cube to the scene. The cube is initially axis-aligned and centered at (0, 0, 0).

Arguments

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

Adds a sphere to the scene. 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 the scene. 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 the scene. 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 the scene. 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.

Adds a rectangle to the scene. The rectangle is initially axis-aligned and centered at (0, 0, 0).

Arguments

  • wx - the cube extent along the x axis
  • wy - the cube extent along the y axis

Adds a circle to the scene. The circle is initially centered at (0, 0, 0).

Arguments

  • r - the circle radius

Adds a convex polygon to the scene.

Arguments

  • r - the circle radius

Returns whether this window is closed or not.

The hidpi factor of this screen.

Sets the light mode. Only one light is supported.

Opens a window, hide it then calls a user-defined procedure.

Arguments

  • title - the window title

Opens a window then calls a user-defined procedure.

Arguments

  • title - the window title

Opens a window with a custom size then calls a user-defined procedure.

Arguments

  • title - the window title.
  • width - the window width.
  • height - the window height.

Reference to the scene associated with this window.

Mutable reference to the scene associated with this window.

Read the pixels currently displayed to the screen.

Arguments:

  • out - the output buffer. It is automatically resized.

Read a section of pixels from the screen

Arguments:

  • out - the output buffer. It is automatically resized
  • x, y, width, height - the rectangle to capture

Get the current screen as an image

Gets the events manager that gives access to an event iterator.

Gets the status of a key.

Gets the last known position of the mouse.

The position of the mouse is automatically updated when the mouse moves over the canvas.

Runs the render and event loop until the window is closed.

Render one frame using the specified state.

Renders the scene using the default camera.

Returns false if the window should be closed.

Render using a specific post processing effect.

Returns false if the window should be closed.

Render using a specific camera.

Returns false if the window should be closed.

Render using a specific 2D and 3D camera.

Returns false if the window should be closed.

Render using a specific camera and post processing effect.

Returns false if the window should be closed.

Render using a specific 2D and 3D camera and post processing effect.

Returns false if the window should be closed.

Draws the scene with the given camera and post-processing effect.

Returns false if the window should be closed.

Auto Trait Implementations

impl !Send for Window

impl !Sync for Window

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

Sets value as a parameter of self.

impl<T> Same for T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Erased for T