001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.geometry.io.euclidean.threed.obj; 018 019import java.nio.charset.Charset; 020import java.nio.charset.StandardCharsets; 021 022/** Class containing constants for use with OBJ files. 023 */ 024public final class ObjConstants { 025 026 /** Default OBJ charset. */ 027 public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; 028 029 /** Character used to indicate the start of a comment line. */ 030 public static final char COMMENT_CHAR = '#'; 031 032 /** Character placed before new line sequences to indicate a line continuation. */ 033 public static final char LINE_CONTINUATION_CHAR = '\\'; 034 035 /** Keyword used to indicate a vertex definition line. */ 036 public static final String VERTEX_KEYWORD = "v"; 037 038 /** Keyword used to indicate a vertex normal definition line. */ 039 public static final String VERTEX_NORMAL_KEYWORD = "vn"; 040 041 /** Keyword used to indicate a texture coordinate definition line. */ 042 public static final String TEXTURE_COORDINATE_KEYWORD = "vt"; 043 044 /** Keyword used to indicate a face definition line. */ 045 public static final String FACE_KEYWORD = "f"; 046 047 /** Character used to separate face vertex attribute indices. */ 048 public static final char FACE_VERTEX_ATTRIBUTE_SEP_CHAR = '/'; 049 050 /** Keyword used to indicate a geometry group. */ 051 public static final String GROUP_KEYWORD = "g"; 052 053 /** Keyword used to indicate a geometry group. */ 054 public static final String SMOOTHING_GROUP_KEYWORD = "s"; 055 056 /** Keyword used to associate a name with the following geometry. */ 057 public static final String OBJECT_KEYWORD = "o"; 058 059 /** Keyword used to reference a material library file. */ 060 public static final String MATERIAL_LIBRARY_KEYWORD = "mtllib"; 061 062 /** Keyword used to apply a named material to subsequent geometry. */ 063 public static final String USE_MATERIAL_KEYWORD = "usemtl"; 064 065 /** Utility class; no instantiation. */ 066 private ObjConstants() {} 067}