Tesseract 0.28.4
Loading...
Searching...
No Matches
mesh_material.h File Reference

Tesseract Mesh Material read from a mesh file. More...

#include <tesseract/common/macros.h>
#include <Eigen/Core>
#include <cstdint>
#include <memory>
#include <tesseract/geometry/geometry.h>
#include <tesseract/common/fwd.h>
#include <tesseract/common/eigen_types.h>

Classes

class  tesseract::geometry::MeshMaterial
 Represents material information extracted from a mesh file. More...
class  tesseract::geometry::MeshTexture
 Represents a texture and UV coordinates extracted from a mesh file. More...

Enumerations

enum class  tesseract::geometry::MeshMaterialAlphaMode : std::uint8_t { OPAQUE = 0 , MASK = 1 , BLEND = 2 }
 How the alpha channel of the base color is interpreted (glTF 2.0 material.alphaMode). More...
enum class  tesseract::geometry::MeshTextureType : std::uint8_t {
  BASE_COLOR = 0 , METALLIC_ROUGHNESS = 1 , NORMAL = 2 , OCCLUSION = 3 ,
  EMISSIVE = 4
}
 The material slot a texture is applied to (glTF 2.0 texture references). More...
enum class  tesseract::geometry::MeshTextureWrapMode : std::uint8_t { REPEAT = 0 , CLAMP_TO_EDGE = 1 , MIRRORED_REPEAT = 2 }
 Texture coordinate wrapping mode (glTF 2.0 sampler.wrapS / wrapT).
enum class  tesseract::geometry::MeshTextureFilter : std::uint8_t {
  DEFAULT = 0 , NEAREST = 1 , LINEAR = 2 , NEAREST_MIPMAP_NEAREST = 3 ,
  LINEAR_MIPMAP_NEAREST = 4 , NEAREST_MIPMAP_LINEAR = 5 , LINEAR_MIPMAP_LINEAR = 6
}
 Texture filtering mode (glTF 2.0 sampler.magFilter / minFilter). More...

Functions

template<class Archive>
void tesseract::geometry::serialize (Archive &ar, MeshMaterial &obj)
template<class Archive>
void tesseract::geometry::serialize (Archive &ar, MeshTexture &obj)

Detailed Description

Tesseract Mesh Material read from a mesh file.

Author
John Wason
Date
December 21, 2020
License
Software License Agreement (Apache License)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Enumeration Type Documentation

◆ MeshMaterialAlphaMode

enum class tesseract::geometry::MeshMaterialAlphaMode : std::uint8_t
strong

How the alpha channel of the base color is interpreted (glTF 2.0 material.alphaMode).

Enumerator
OPAQUE 

Alpha is ignored and the mesh is rendered fully opaque.

MASK 

Fragments with alpha below the alpha cutoff are discarded, all others are opaque.

BLEND 

Alpha is used to blend the mesh with the background.

◆ MeshTextureType

enum class tesseract::geometry::MeshTextureType : std::uint8_t
strong

The material slot a texture is applied to (glTF 2.0 texture references).

Enumerator
BASE_COLOR 

Base color (albedo) in sRGB, multiplied by the base color factor. Alpha is the base alpha.

METALLIC_ROUGHNESS 

Linear texture with roughness in the green channel and metalness in the blue channel.

NORMAL 

Tangent space normal map.

OCCLUSION 

Ambient occlusion in the red channel.

EMISSIVE 

Emissive color in sRGB, multiplied by the emissive factor.

◆ MeshTextureFilter

enum class tesseract::geometry::MeshTextureFilter : std::uint8_t
strong

Texture filtering mode (glTF 2.0 sampler.magFilter / minFilter).

Enumerator
DEFAULT 

Not specified in the mesh file; the renderer chooses.