Package renderer.scene.util
Class CheckModel
- java.lang.Object
-
- renderer.scene.util.CheckModel
-
public class CheckModel extends Object
Several static utility methods for checking and/or debugging aModel.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheck(Model model)Determine if there are any obvious problems with theModelto be rendered.static booleancheckPrimitives(Model model)
-
-
-
Method Detail
-
check
public static void check(Model model)
Determine if there are any obvious problems with theModelto be rendered. The purpose of these checks is to make the renderer a bit more user friendly. If a user makes a simple mistake and tries to render aModelthat is missing vertices or line segments, or colors, then the user gets a helpful error message.- Parameters:
model- theModelto be checked
-
checkPrimitives
public static boolean checkPrimitives(Model model)
Check eachPrimitivein theModelto make sure that each index in thePrimitive'svIndexListrefers to a validVertexin theModel'svertexListand also that each index in thePrimitive'scIndexListrefers to a validColorin theModel'scolorList- Parameters:
model- theModelto be checked for consistent indexes- Returns:
- true if no problem is found, false if an invalid index is found
-
-