cubemap#
- cubemap(path: str | Path = '', prefix: str = '', ext: str = '.jpg') Texture[source]#
Construct a cubemap from 6 images from a directory.
Each of the 6 images must be in the following format:
<prefix>negx<ext>
<prefix>negy<ext>
<prefix>negz<ext>
<prefix>posx<ext>
<prefix>posy<ext>
<prefix>posz<ext>
Prefix may be empty, and extension will default to
'.jpg'For example, if you have 6 images with the skybox2 prefix:
'skybox2-negx.jpg''skybox2-negy.jpg''skybox2-negz.jpg''skybox2-posx.jpg''skybox2-posy.jpg''skybox2-posz.jpg'
- Parameters:
- path
str|pathlib.Path, default: “” Directory containing the cubemap images.
- prefix
str, default: “” Prefix to the filename.
- ext
str, default: “.jpg” The filename extension. For example
'.jpg'.
- path
- Returns:
pyvista.TextureTexture with cubemap.
Examples#
Download Python source code | Download Jupyter notebook
Load a skybox given a directory, prefix, and file extension.
>>> import pyvista as pv
>>> skybox = pv.cubemap('my_directory', 'skybox', '.jpeg')