1) In AIScene there is: one Mesh, one Material.
Mesh this cube.
Material this Bitmap texture.
how get Texture of Material?
2) where is texture coord in AIScene
This code should help:
AIScene scene = ...;
PointerBuffer meshes = scene.mMeshes();
for ( int i = 0; i < meshes.remaining(); i++ ) {
AIMesh mesh = AIMesh.create(meshes.get(i));
AIVector3D.Buffer texCoords = mesh.mTextureCoords(0);
}
PointerBuffer textures = scene.mTextures();
for ( int i = 0; i < textures.remaining(); i++ ) {
AITexture texture = AITexture.create(textures.get(i));
}
Quote
PointerBuffer meshes = scene.mMeshes();
for ( int i = 0; i < meshes.remaining(); i++ ) {
AIMesh mesh = AIMesh.create(meshes.get(i));
AIVector3D.Buffer texCoords = mesh.mTextureCoords(0);
}
Thank you!
Quote
PointerBuffer textures = scene.mTextures();
for ( int i = 0; i < textures.remaining(); i++ ) {
AITexture texture = AITexture.create(textures.get(i));
}
The problem is that the textures 0 (scene.mNumTextures () = 0 always), and the material is always the same amount as textures.