本文整理汇总了Java中ru.gloomyfolken.tcn2obj.tcn.TechneModel类的典型用法代码示例。如果您正苦于以下问题:Java TechneModel类的具体用法?Java TechneModel怎么用?Java TechneModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TechneModel类属于ru.gloomyfolken.tcn2obj.tcn包,在下文中一共展示了TechneModel类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doTcn
import ru.gloomyfolken.tcn2obj.tcn.TechneModel; //导入依赖的package包/类
private static void doTcn(File baseDir) throws Exception
{
List<File> files = getFiles(baseDir, tcn);
TcnConverter tcnConverter = new TcnConverter();
for (File tcnFile : files)
{
System.out.println("Processing " + tcnFile.getAbsolutePath());
try
{
String filename = tcnFile.getName().substring(0, tcnFile.getName().length() - obj.length());
File objFile = new File(tcnFile.getParentFile(), filename + ".obj");
TechneModel tcnModel = new TechneModel(tcnFile);
ObjModel objModel = tcnConverter.tcn2obj(tcnModel, 0.0625f);
saveFile(objFile, objModel.toStringList());
}
catch (Exception e)
{
System.err.println("Error with "+tcnFile);
e.printStackTrace();
}
}
}
示例2: main
import ru.gloomyfolken.tcn2obj.tcn.TechneModel; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
File baseDir = new File(".");
List<File> files = getFiles(baseDir, tcn);
Converter converter = new Converter();
for (File tcnFile : files){
System.out.println("Processing " + tcnFile.getAbsolutePath());
String filename = tcnFile.getName().substring(0, tcnFile.getName().length()-obj.length());
File objFile = new File(tcnFile.getParentFile(), filename + ".obj");
if (objFile.exists()){
System.out.println("File " + objFile.getAbsolutePath() + " already exists.");
continue;
}
TechneModel tcnModel = new TechneModel(tcnFile);
ObjModel objModel = converter.tcn2obj(tcnModel, 0.0625f);
saveFile(objFile, objModel.toStringList());
}
System.out.println("Done!");
}
示例3: tcn2obj
import ru.gloomyfolken.tcn2obj.tcn.TechneModel; //导入依赖的package包/类
public ObjModel tcn2obj(TechneModel tcn, float scale){
ObjModel obj = new ObjModel();
for (TechneBox box : tcn.boxes){
obj.shapes.add(convertBoxToShape(obj, box, scale));
}
return obj;
}