_canvas.setTitle("Ardor3D - Simple Md2 Example");
_canvas.getCanvasRenderer().getCamera().setLocation(new Vector3(0, 5, 20));
// Load the scene
final long time = System.currentTimeMillis();
final Md2Importer importer = new Md2Importer();
try {
importer.setTextureLocator(new MultiFormatResourceLocator(ResourceLocatorTool.getClassPathResource(
SimpleObjExample.class, "com/ardor3d/example/media/models/md2/"), ".dds", ".jpg", ".png", ".tga",
".pcx"));
} catch (final URISyntaxException ex) {
ex.printStackTrace();
}
final Md2DataStore storage = importer.load("md2/drfreak.md2");
System.out.println("Importing Took " + (System.currentTimeMillis() - time) + " ms");
final Mesh model = storage.getScene();
// md2 models are usually z-up - switch to y-up
model.setRotation(new Quaternion().fromAngleAxis(-MathUtils.HALF_PI, Vector3.UNIT_X));