Class CheckModel


  • public class CheckModel
    extends Object
    Several static utility methods for checking and/or debugging a Model.
    • Method Detail

      • check

        public static void check​(Model model)
        Determine if there are any obvious problems with the Model 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 a Model that is missing vertices or line segments, or colors, then the user gets a helpful error message.
        Parameters:
        model - the Model to be checked
      • checkPrimitives

        public static boolean checkPrimitives​(Model model)
        Check each Primitive in the Model to make sure that each index in the Primitive's vIndexList refers to a valid Vertex in the Model's vertexList and also that each index in the Primitive's cIndexList refers to a valid Color in the Model's colorList
        Parameters:
        model - the Model to be checked for consistent indexes
        Returns:
        true if no problem is found, false if an invalid index is found