اكتشاف تنسيق ملف 3D

Detect orormat roقواعد اللغة ple وافرة

Tرمز المصدر يوضح كيفية الكشف عن تنسيق الملف (باستخدام مسار الملف أو تيار) والتحقق من امتداده.

// 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());