de.enough.polish.graphics3d.utils
Class Utilities3d

java.lang.Object
  extended by de.enough.polish.graphics3d.utils.Utilities3d

public class Utilities3d
extends Object

Generel 3D graphics utility class.

Implements helper functions associated with 3d graphics development

Author:
Anders Bo Pedersen, anders@wicore.dk

Constructor Summary
Utilities3d()
           
 
Method Summary
static int getNumTextureMatrixPerColumn(Image sourceImg, int maxTexDim)
          Returns the number of vertical subdivisions the argument image needs to be divided into to respect argument maxTexDim size
static int getNumTextureMatrixPerRow(Image sourceImg, int maxTexDim)
          Returns the number of horizontal subdivisions the argument image needs to be divided into to respect argument maxTexDim size
static Image[][] imageToTextureMatrix(Image sourceImg, int maxTexDim, Image[][] texMatrix)
          Divides argument image into a matrix of smaller images based on the allowed maxTexDim size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities3d

public Utilities3d()
Method Detail

imageToTextureMatrix

public static Image[][] imageToTextureMatrix(Image sourceImg,
                                             int maxTexDim,
                                             Image[][] texMatrix)
Divides argument image into a matrix of smaller images based on the allowed maxTexDim size. The resulting Image[row][column] contains the smaller images.

Parameters:
sourceImg -
maxTexDim -
texMatrix -
Returns:

getNumTextureMatrixPerRow

public static int getNumTextureMatrixPerRow(Image sourceImg,
                                            int maxTexDim)
Returns the number of horizontal subdivisions the argument image needs to be divided into to respect argument maxTexDim size

Parameters:
sourceImg -
maxTexDim -
Returns:

getNumTextureMatrixPerColumn

public static int getNumTextureMatrixPerColumn(Image sourceImg,
                                               int maxTexDim)
Returns the number of vertical subdivisions the argument image needs to be divided into to respect argument maxTexDim size

Parameters:
sourceImg -
maxTexDim -
Returns: