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 void
check(Model model)
Determine if there are any obvious problems with theModel
to be rendered.static boolean
checkPrimitives(Model model)
-
-
-
Method Detail
-
check
public static void check(Model model)
Determine if there are any obvious problems with theModel
to 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 aModel
that is missing vertices or line segments, or colors, then the user gets a helpful error message.- Parameters:
model
- theModel
to be checked
-
checkPrimitives
public static boolean checkPrimitives(Model model)
Check eachPrimitive
in theModel
to make sure that each index in thePrimitive
'svIndexList
refers to a validVertex
in theModel
'svertexList
and also that each index in thePrimitive
'scIndexList
refers to a validColor
in theModel
'scolorList
- Parameters:
model
- theModel
to be checked for consistent indexes- Returns:
- true if no problem is found, false if an invalid index is found
-
-