Shapes 3D  3.0
 All Classes Functions Variables Pages
shapes3d.utils.Textures Class Reference

Public Member Functions

void pre ()
 

Static Public Member Functions

static void addMovie (PApplet pApplet, PImage movie, _ShapePart shapePart)
 
static void removeMovie (Movie movie, _ShapePart shapePart)
 
static PImage loadImage (PApplet app, String filename)
 
static PImage[] loadImage (PApplet app, String[] filename)
 
static PImage[][] makeTiles (PApplet app, PImage img, int nCols, int nRows)
 
static void printMovieUsage ()
 

Detailed Description

This class is used to load bitmap files and create images.

Although there maybe multiple requests for a particular bitmap file only one PImage is created for each file.

Author
Peter Lager

Member Function Documentation

static void shapes3d.utils.Textures.addMovie ( PApplet  pApplet,
PImage  movie,
_ShapePart  shapePart 
)
static

Add a movie that is going to be used as a texture.

Parameters
pAppletthe underly PApplet
moviethe movie to add
shapePartthe part to be textured with this movie
static PImage shapes3d.utils.Textures.loadImage ( PApplet  app,
String  filename 
)
static

Load an bitmap file return a reference to the PImage created.

Parameters
appthe PApplet to be used to load the image
filenamethe image filename
Returns
null if the file does not exist else the PImage object
static PImage [] shapes3d.utils.Textures.loadImage ( PApplet  app,
String[]  filename 
)
static

Load images from multiple files

Parameters
appthe PApplet to be used to load the image
filenamean array of filenames
Returns
an array of images
static PImage [][] shapes3d.utils.Textures.makeTiles ( PApplet  app,
PImage  img,
int  nCols,
int  nRows 
)
static

Make multiple images from a given image.

Parameters
appthe PApplet to be used to create the image tiles
imgthe tiled image
nColsnumber of tiles across
nRowsnumber of tiles down
Returns
an array of images (tiles)
static void shapes3d.utils.Textures.printMovieUsage ( )
static

Will print a list of movies and the shape parts using them. Useful when debugging library code.

static void shapes3d.utils.Textures.removeMovie ( Movie  movie,
_ShapePart  shapePart 
)
static

This method is called when the movie-texture for a shape part is being replaced by another movie or an image.

Parameters
moviethe current movie-texture
shapePartthe associated shape part

The documentation for this class was generated from the following file: