org.lwjgl.assimp.AIFace Java Examples

The following examples show how to use org.lwjgl.assimp.AIFace. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StaticMeshesLoader.java    From lwjglbook with Apache License 2.0 5 votes vote down vote up
protected static void processIndices(AIMesh aiMesh, List<Integer> indices) {
    int numFaces = aiMesh.mNumFaces();
    AIFace.Buffer aiFaces = aiMesh.mFaces();
    for (int i = 0; i < numFaces; i++) {
        AIFace aiFace = aiFaces.get(i);
        IntBuffer buffer = aiFace.mIndices();
        while (buffer.remaining() > 0) {
            indices.add(buffer.get());
        }
    }
}
 
Example #2
Source File: StaticMeshesLoader.java    From lwjglbook with Apache License 2.0 5 votes vote down vote up
private static void processIndices(AIMesh aiMesh, List<Integer> indices) {
    int numFaces = aiMesh.mNumFaces();
    AIFace.Buffer aiFaces = aiMesh.mFaces();
    for (int i = 0; i < numFaces; i++) {
        AIFace aiFace = aiFaces.get(i);
        IntBuffer buffer = aiFace.mIndices();
        while (buffer.remaining() > 0) {
            indices.add(buffer.get());
        }
    }
}
 
Example #3
Source File: StaticMeshesLoader.java    From lwjglbook with Apache License 2.0 5 votes vote down vote up
protected static void processIndices(AIMesh aiMesh, List<Integer> indices) {
    int numFaces = aiMesh.mNumFaces();
    AIFace.Buffer aiFaces = aiMesh.mFaces();
    for (int i = 0; i < numFaces; i++) {
        AIFace aiFace = aiFaces.get(i);
        IntBuffer buffer = aiFace.mIndices();
        while (buffer.remaining() > 0) {
            indices.add(buffer.get());
        }
    }
}
 
Example #4
Source File: AssimpAPI.java    From WraithEngine with Apache License 2.0 5 votes vote down vote up
@Override
public void getTriangle(short[] data, int pos, int index)
{
    AIFace face = mesh.mFaces()
                      .get(index);

    IntBuffer indices = face.mIndices();
    data[pos] = (short) indices.get(0);
    data[pos + 1] = (short) indices.get(1);
    data[pos + 2] = (short) indices.get(2);
}
 
Example #5
Source File: AssimpAPI.java    From WraithEngine with Apache License 2.0 5 votes vote down vote up
@Override
public void getTriangle(short[] data, int pos, int index)
{
    AIFace face = mesh.mFaces()
                      .get(index);

    IntBuffer indices = face.mIndices();
    data[pos] = (short) indices.get(0);
    data[pos + 1] = (short) indices.get(1);
    data[pos + 2] = (short) indices.get(2);
}