1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.geometry.io.euclidean.threed.obj; 18 19 import java.nio.charset.Charset; 20 import java.nio.charset.StandardCharsets; 21 22 /** Class containing constants for use with OBJ files. 23 */ 24 public final class ObjConstants { 25 26 /** Default OBJ charset. */ 27 public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; 28 29 /** Character used to indicate the start of a comment line. */ 30 public static final char COMMENT_CHAR = '#'; 31 32 /** Character placed before new line sequences to indicate a line continuation. */ 33 public static final char LINE_CONTINUATION_CHAR = '\\'; 34 35 /** Keyword used to indicate a vertex definition line. */ 36 public static final String VERTEX_KEYWORD = "v"; 37 38 /** Keyword used to indicate a vertex normal definition line. */ 39 public static final String VERTEX_NORMAL_KEYWORD = "vn"; 40 41 /** Keyword used to indicate a texture coordinate definition line. */ 42 public static final String TEXTURE_COORDINATE_KEYWORD = "vt"; 43 44 /** Keyword used to indicate a face definition line. */ 45 public static final String FACE_KEYWORD = "f"; 46 47 /** Character used to separate face vertex attribute indices. */ 48 public static final char FACE_VERTEX_ATTRIBUTE_SEP_CHAR = '/'; 49 50 /** Keyword used to indicate a geometry group. */ 51 public static final String GROUP_KEYWORD = "g"; 52 53 /** Keyword used to indicate a geometry group. */ 54 public static final String SMOOTHING_GROUP_KEYWORD = "s"; 55 56 /** Keyword used to associate a name with the following geometry. */ 57 public static final String OBJECT_KEYWORD = "o"; 58 59 /** Keyword used to reference a material library file. */ 60 public static final String MATERIAL_LIBRARY_KEYWORD = "mtllib"; 61 62 /** Keyword used to apply a named material to subsequent geometry. */ 63 public static final String USE_MATERIAL_KEYWORD = "usemtl"; 64 65 /** Utility class; no instantiation. */ 66 private ObjConstants() {} 67 }