Foam::glTF Namespace Reference

Namespace for handling glTF creation. https://www.khronos.org/registry/glTF/. More...

Classes

class  accessor
 glTF accessor More...
 
class  animation
 glTF animation More...
 
class  base
 Base class for glTF entities. More...
 
class  bufferView
 glTF buffer view - provides a view/slice of the glTF buffer More...
 
class  List
 Container for glTF entities. More...
 
class  mesh
 glTF mesh More...
 
class  object
 glTF binary object More...
 
class  scene
 Main class to assemble glTF components into a scene. More...
 
class  sceneWriter
 Wrapper for glTF scene for file output. More...
 

Enumerations

enum class  componentTypes : int {
  BYTE = 5120 , UNSIGNED_BYTE = 5121 , SHORT = 5122 , UNSIGNED_SHORT = 5123 ,
  UNSIGNED_INT = 5125 , FLOAT = 5126
}
 
enum class  dataTypes {
  SCALAR , VEC2 , VEC3 , VEC4 ,
  MAT2 , MAT3 , MAT4
}
 
enum class  attributeTypes {
  POSITION , NORMAL , TANGENT , TEXCOORD_0 ,
  TEXCOORD_1 , COLOR_0 , JOINTS_0 , WEIGHTS_0
}
 
enum class  targetTypes : int { ARRAY_BUFFER = 34962 , ELEMENT_ARRAY_BUFFER = 34963 }
 
enum class  primitiveModes : int {
  POINTS = 0 , LINES = 1 , LINE_LOOP = 2 , LINE_STRIP = 3 ,
  TRIANGLES = 4 , TRIANGLE_STRIP = 5 , TRIANGLE_FAN = 6
}
 

Functions

template<class Type >
auto key (const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
 

Detailed Description

Namespace for handling glTF creation. https://www.khronos.org/registry/glTF/.

Enumeration Type Documentation

◆ componentTypes

enum class componentTypes : int
strong
Enumerator
BYTE 

1 byte

UNSIGNED_BYTE 

1 byte

SHORT 

2 bytes

UNSIGNED_SHORT 

2 bytes

UNSIGNED_INT 

4 bytes

FLOAT 

4 bytes

Definition at line 54 of file foamGltfBase.H.

◆ dataTypes

enum class dataTypes
strong
Enumerator
SCALAR 

1 component

VEC2 

2 components

VEC3 

3 components

VEC4 

4 components

MAT2 

4 components

MAT3 

9 components

MAT4 

16 components

Definition at line 65 of file foamGltfBase.H.

◆ attributeTypes

enum class attributeTypes
strong
Enumerator
POSITION 

VEC3 XYZ vertex positions; requires 'min' and 'max'.

NORMAL 

VEC3 Normalised XYZ vertex normals.

TANGENT 

VEC4 XYZW vertex tangents.

TEXCOORD_0 

VEC2 UV texture coordinates.

TEXCOORD_1 

VEC2 UV texture coordinates.

COLOR_0 

VEC3 (rgb), VEC4 (rgba)

JOINTS_0 

VEC4.

WEIGHTS_0 

VEC4.

Definition at line 76 of file foamGltfBase.H.

◆ targetTypes

enum class targetTypes : int
strong
Enumerator
ARRAY_BUFFER 

vertex attributes

ELEMENT_ARRAY_BUFFER 

vertex indices

Definition at line 89 of file foamGltfBase.H.

◆ primitiveModes

enum class primitiveModes : int
strong
Enumerator
POINTS 
LINES 
LINE_LOOP 
LINE_STRIP 
TRIANGLES 
TRIANGLE_STRIP 
TRIANGLE_FAN 

Definition at line 95 of file foamGltfBase.H.

Function Documentation

◆ key()

auto key ( const Type &  t) -> typename std::enable_if < std::is_enum<Type>::value, typename std::underlying_type<Type>::type >::type

Definition at line 108 of file foamGltfBase.H.

Referenced by scene::addColourToMesh(), scene::addMesh(), and accessor::set().

Here is the caller graph for this function: