KudanAR - Android  1.6.0
ARTexture3D Class Reference

Inherits ARTexture.

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 ()
 
int getTextureID ()
 
void setTextureID (int textureID)
 
int getWidth ()
 
int getHeight ()
 

Additional Inherited Members

- Protected Attributes inherited from ARTexture
long mNativeMem
 
int mTextureID
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ARTexture3D()

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

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

◆ bindTexture()

void ARTexture3D.bindTexture ( int  unit)

Binds cube map in OpenGL.

Parameters
unitTexture unit.

Reimplemented from ARTexture.

◆ loadData()

void ARTexture3D.loadData ( )

Loads the cube's texture data.

Reimplemented from ARTexture.

◆ prepareRenderer()

void ARTexture3D.prepareRenderer ( int  unit)

Prepares renderer to draw texture cube.

Parameters
unitTexture unit.

Reimplemented from ARTexture.


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