Class ModelPipelineImportDef


  • public final class ModelPipelineImportDef
    extends Table
    • Constructor Detail

      • ModelPipelineImportDef

        public ModelPipelineImportDef()
    • Method Detail

      • getRootAsModelPipelineImportDef

        public static ModelPipelineImportDef getRootAsModelPipelineImportDef​(java.nio.ByteBuffer _bb)
      • __init

        public void __init​(int _i,
                           java.nio.ByteBuffer _bb)
      • name

        public java.lang.String name()
        The short name of the asset that is referenced by the individual model components (eg. renderables, collidables, etc.) below.
      • nameAsByteBuffer

        public java.nio.ByteBuffer nameAsByteBuffer()
      • nameInByteBuffer

        public java.nio.ByteBuffer nameInByteBuffer​(java.nio.ByteBuffer _bb)
      • file

        public java.lang.String file()
        The location of disk of the asset.
      • fileAsByteBuffer

        public java.nio.ByteBuffer fileAsByteBuffer()
      • fileInByteBuffer

        public java.nio.ByteBuffer fileInByteBuffer​(java.nio.ByteBuffer _bb)
      • recenter

        public boolean recenter()
        Inserts an extra node into the asset hierarchy so that the resulting model is centered around the origin.
      • scale

        public float scale()
        Multiplier applied to the model to change its scale.
      • axisSystem

        public int axisSystem()
        The axis system used by the model asset.
      • smoothingAngle

        public float smoothingAngle()
        The limit angle (in degrees) between two normals being considered for tangent space smoothing.
      • maxBoneWeights

        public int maxBoneWeights()
        Limit per-vertex bone weights to the N most significant bones.
      • reportErrorsToStdout

        public boolean reportErrorsToStdout()
        some clients do not use LOG to report errors
      • flipTextureCoordinates

        public boolean flipTextureCoordinates()
        Inverts vertical texture coordinates when enabled (D3D/OGL difference).
      • flattenHierarchyAndTransformVerticesToRootSpace

        public boolean flattenHierarchyAndTransformVerticesToRootSpace()
        Pre-transforms vertices by their node hierarchy so that all vertices are in the same object-space, and the node hierarchy is flattened.
      • useSpecularGlossinessTexturesIfPresent

        public boolean useSpecularGlossinessTexturesIfPresent()
        If a model contains both metallic-roughness textures and specular-glossiness textures, this flag causes the import to only use the specular-glossiness textures. Otherwise, it uses the metallic-rougness textures.
      • fixInfacingNormals

        public boolean fixInfacingNormals()
        Toggle for Assimp's aiProcess_FixInfacingNormals process.
      • ensureVertexOrientationWNotZero

        public boolean ensureVertexOrientationWNotZero()
        Encodes a sign into the w value of the orientation quaternion such that >0 implies a right handed space, and <0 implies a left handed space. w==0 should never happen. This allows orientation components to be encoded in a
      • cmPerUnit

        public float cmPerUnit()
        Distinct from 'scale'; defines the unit we expect positions to be in. Kept as 0 for backwards compatibility, this would be 100.0 for contexts where world units would be measured in meters, and 2.54 for inches.
      • targetMeshes

        public java.lang.String targetMeshes​(int j)
        The names of the nodes that contain the target meshes to import from the asset. If a node has a mesh and its name is present in this list, the mesh data will be added to the output model. If this list is empty, all meshes will be added to the output model.
      • targetMeshesLength

        public int targetMeshesLength()
      • mergeMaterials

        public boolean mergeMaterials()
      • createModelPipelineImportDef

        public static int createModelPipelineImportDef​(FlatBufferBuilder builder,
                                                       int nameOffset,
                                                       int fileOffset,
                                                       boolean recenter,
                                                       float scale,
                                                       int axis_system,
                                                       float smoothing_angle,
                                                       int max_bone_weights,
                                                       boolean report_errors_to_stdout,
                                                       boolean flip_texture_coordinates,
                                                       boolean flatten_hierarchy_and_transform_vertices_to_root_space,
                                                       boolean use_specular_glossiness_textures_if_present,
                                                       boolean fix_infacing_normals,
                                                       boolean ensure_vertex_orientation_w_not_zero,
                                                       float cm_per_unit,
                                                       int target_meshesOffset,
                                                       boolean merge_materials)
      • startModelPipelineImportDef

        public static void startModelPipelineImportDef​(FlatBufferBuilder builder)
      • addName

        public static void addName​(FlatBufferBuilder builder,
                                   int nameOffset)
      • addFile

        public static void addFile​(FlatBufferBuilder builder,
                                   int fileOffset)
      • addRecenter

        public static void addRecenter​(FlatBufferBuilder builder,
                                       boolean recenter)
      • addScale

        public static void addScale​(FlatBufferBuilder builder,
                                    float scale)
      • addAxisSystem

        public static void addAxisSystem​(FlatBufferBuilder builder,
                                         int axisSystem)
      • addSmoothingAngle

        public static void addSmoothingAngle​(FlatBufferBuilder builder,
                                             float smoothingAngle)
      • addMaxBoneWeights

        public static void addMaxBoneWeights​(FlatBufferBuilder builder,
                                             int maxBoneWeights)
      • addReportErrorsToStdout

        public static void addReportErrorsToStdout​(FlatBufferBuilder builder,
                                                   boolean reportErrorsToStdout)
      • addFlipTextureCoordinates

        public static void addFlipTextureCoordinates​(FlatBufferBuilder builder,
                                                     boolean flipTextureCoordinates)
      • addFlattenHierarchyAndTransformVerticesToRootSpace

        public static void addFlattenHierarchyAndTransformVerticesToRootSpace​(FlatBufferBuilder builder,
                                                                              boolean flattenHierarchyAndTransformVerticesToRootSpace)
      • addUseSpecularGlossinessTexturesIfPresent

        public static void addUseSpecularGlossinessTexturesIfPresent​(FlatBufferBuilder builder,
                                                                     boolean useSpecularGlossinessTexturesIfPresent)
      • addFixInfacingNormals

        public static void addFixInfacingNormals​(FlatBufferBuilder builder,
                                                 boolean fixInfacingNormals)
      • addEnsureVertexOrientationWNotZero

        public static void addEnsureVertexOrientationWNotZero​(FlatBufferBuilder builder,
                                                              boolean ensureVertexOrientationWNotZero)
      • addCmPerUnit

        public static void addCmPerUnit​(FlatBufferBuilder builder,
                                        float cmPerUnit)
      • addTargetMeshes

        public static void addTargetMeshes​(FlatBufferBuilder builder,
                                           int targetMeshesOffset)
      • createTargetMeshesVector

        public static int createTargetMeshesVector​(FlatBufferBuilder builder,
                                                   int[] data)
      • startTargetMeshesVector

        public static void startTargetMeshesVector​(FlatBufferBuilder builder,
                                                   int numElems)
      • addMergeMaterials

        public static void addMergeMaterials​(FlatBufferBuilder builder,
                                             boolean mergeMaterials)
      • endModelPipelineImportDef

        public static int endModelPipelineImportDef​(FlatBufferBuilder builder)