KudanAR - Android
ARTexture3D Class Reference
+ Inheritance diagram for ARTexture3D:
+ Collaboration diagram for ARTexture3D:

Public Member Functions

 ARTexture3D (String posX, String negX, String posY, String negY, String posZ, String negZ)
 
void bindTexture (int unit)
 
void loadData ()
 
void prepareRenderer (int unit)
 
- Public Member Functions inherited from ARTexture
 ARTexture ()
 
void finalize ()
 
void createTexture ()
 
void bindTexture (int unit)
 
void loadData ()
 
void prepareRenderer (int unit)
 
int getTextureID ()
 
void setTextureID (int textureID)
 
int getWidth ()
 
int getHeight ()
 

Additional Inherited Members

- Protected Attributes inherited from ARTexture
int mNativeMem
 
int mTextureID
 

Detailed Description

An ARTexture3D is a texture representing a cube for use in environment mapping.

Constructor & Destructor Documentation

ARTexture3D ( String  posX,
String  negX,
String  posY,
String  negY,
String  posZ,
String  negZ 
)
inline

Initialise an ARTexture3D with the names of 6 images to be loaded from assets. The images must be in the correct order for the mapping to work properly. The order of images cannot be altered once initialised.

Example of use:

String rightImage = "rightImage.jpg";
String leftImage = "leftImage.jpg"
String topImage = "topImage.jpg";
String bottomImage = "bottomImage.jpg";
String frontImage = "frontImage.jpg";
String backImage = "backImage.jpg";
ARTexture3D cubeMap = new ARTexture3D(rightImage, leftImage, topImage, bottomImage, frontImage, backImage);
Parameters
posXThe name of the image to use for the right face of the cube.
negXThe name of the image to use for the left face of the cube.
posYThe name of the image to use for the top face of the cube.
negYThe name of the image to use for the bottom face of the cube.
posZThe name of the image to use for the front face of the cube.
negZThe name of the image to use for the back face of the cube.

Member Function Documentation

void bindTexture ( int  unit)
inline

Binds cube map in OpenGL.

Parameters
unitTexture unit.
void loadData ( )
inline

Loads the cube's texture data.

void prepareRenderer ( int  unit)
inline

Prepares renderer to draw texture cube.

Parameters
unitTexture unit.

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