41#ifndef Foam_gltf_base_H
42#define Foam_gltf_base_H
108 template<
class Type,
class = std::enable_if_t<std::is_enum_v<Type>>>
109 constexpr auto key(
const Type& t)
noexcept
111 return static_cast<std::underlying_type_t<Type>
>(t);
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Base class for glTF entities.
~base()=default
Destructor.
base(const word &name)
Construct with name.
void write(Ostream &os) const
Write.
const word & name() const noexcept
Return const access to the name.
label & id() noexcept
Return access to the ID.
void operator=(const base &gltf)
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Namespace for handling glTF creation. https://www.khronos.org/registry/glTF/.
@ NORMAL
VEC3 Normalised XYZ vertex normals.
@ TEXCOORD_0
VEC2 UV texture coordinates.
@ TANGENT
VEC4 XYZW vertex tangents.
@ COLOR_0
VEC3 (rgb), VEC4 (rgba).
@ POSITION
VEC3 XYZ vertex positions; requires 'min' and 'max'.
@ TEXCOORD_1
VEC2 UV texture coordinates.
constexpr auto key(const Type &t) noexcept
Helper function to return the enum value.
@ ELEMENT_ARRAY_BUFFER
vertex indices
@ ARRAY_BUFFER
vertex attributes
Ostream & indent(Ostream &os)
Indent stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).