- java.lang.Object
-
- tech.fastj.graphics.util.ModelUtil
-
public class ModelUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Polygon2D[]
loadModel(Path fileLocation)
Gets aPolygon2D
array, loaded from a.psdf
file.static void
writeModel(Path destinationPath, Model2D model)
Writes a model file containing the current state of thePolygon2D
s that make up the specifiedModel2D
.
-
-
-
Method Detail
-
loadModel
public static Polygon2D[] loadModel(Path fileLocation)
Gets aPolygon2D
array, loaded from a.psdf
file.This method allows the user to load an array of
Polygon2D
s from a single file, decreasing the amount of models that have to be programmed in.Furthermore, this allows for easy use of the
Model2D
class, allowing you to directly use the resulting array from this method to create aModel2D
object.- Parameters:
fileLocation
- Location of the file.- Returns:
- An array of
Polygon2D
s.
-
writeModel
public static void writeModel(Path destinationPath, Model2D model)
Writes a model file containing the current state of thePolygon2D
s that make up the specifiedModel2D
.- Parameters:
destinationPath
- The destination path of the model file that will be written.model
- TheModel2D
that will be written to the file.
-
-