pygfx.geometries.box_geometry
- pygfx.geometries.box_geometry(width=1, height=1, depth=1, width_segments=1, height_segments=1, depth_segments=1)
Generate a box (rectangular cuboid).
Creates a box (a rectangular cuboid) of the given size that is centered around the local frame’s origin. Faces may be subdivided by specifying the number of segments along each axis. This will result in all faces parallel to the given axis to be evenly divided into the requested number of segments.
- Parameters:
width (int) – Size along the x-axis.
height (int) – Size along the y-axis.
depth (int) – Size along the z-axis.
width_segments (int) – Number of segments along x-axis.
height_segments (int) – Number of segments along y-axis.
depth_segments (int) – Number of segments along z-axis.
- Returns:
box – A geometry object containing the requested box shape. Mathematically, it consists of a set of open orientable manifolds.
- Return type:
Examples
Transform Control without Matrix Updating
Gizmo to transform world objects
Volume and Volume Slice Rendering
Showing CPU usage in the title bar