Rileva il formato del file 3D

Rileva il campione di programmazione del formato

Questo codice sorgente illustra come rilevare il formato del file (utilizzando il percorso o il flusso del file) e controllarne l’estensione.

// the path to the documents directory.
String MyDir = RunExamples.getDataDir();
// detect format of 3D file
FileFormat inputFormat = FileFormat.detect(MyDir + "document.fbx");
// display the file format
System.out.println("File Format: " + inputFormat.toString());