Public Member Functions | |
accessor () | |
Default construct. More... | |
accessor (const word &name) | |
Construct from name. More... | |
~accessor ()=default | |
Destructor. More... | |
label & | bufferViewId () noexcept |
Return the buffer view index. More... | |
label & | byteOffset () noexcept |
Return the byte offset. More... | |
label & | componentType () noexcept |
Return the component type. More... | |
label & | count () noexcept |
Return the data size. More... | |
string & | type () noexcept |
Return the type. More... | |
template<class Type > | |
void | set (const Field< Type > &fld, bool calcMinMax=true) |
Set the accessor. More... | |
void | write (Ostream &os) const |
Write. More... | |
template<class Type > | |
Foam::string | getValueType () |
template<class Type > | |
Foam::string | toString (const Type &val) |
Public Member Functions inherited from base | |
base () | |
Default construct. More... | |
base (const word &name) | |
Construct with name. More... | |
~base ()=default | |
Destructor. More... | |
label & | id () noexcept |
Return access to the ID. More... | |
const word & | name () const noexcept |
Return const access to the name. More... | |
void | write (Ostream &os) const |
Write. More... | |
void | operator= (const base &gltf) |
Static Protected Member Functions | |
template<class Type > | |
static string | getValueType () |
Return the glTF value type for the given OpenFOAM type. More... | |
template<class Type > | |
static string | toString (const Type &val) |
Stringify the value. More... | |
Protected Attributes | |
label | bufferViewId_ |
Buffer view index. More... | |
label | byteOffset_ |
Byte offset. More... | |
label | componentType_ |
Component type. More... | |
label | count_ |
Data size. More... | |
string | type_ |
Data type. More... | |
string | max_ |
Max value. Note: stored as a string for convenience. More... | |
string | min_ |
Min value. Note: stored as a string for convenience. More... | |
bool | minMax_ |
Flag to indicate whether min and max values are available. More... | |
Protected Attributes inherited from base | |
word | name_ |
Name. More... | |
label | id_ |
ID. More... | |
glTF accessor
Definition at line 62 of file foamGltfAccessor.H.
accessor | ( | ) |
Default construct.
Definition at line 25 of file foamGltfAccessor.C.
Construct from name.
Definition at line 39 of file foamGltfAccessor.C.
|
default |
Destructor.
|
staticprotected |
Return the glTF value type for the given OpenFOAM type.
|
staticprotected |
|
noexcept |
Return the buffer view index.
Definition at line 55 of file foamGltfAccessor.C.
|
noexcept |
Return the byte offset.
Definition at line 61 of file foamGltfAccessor.C.
|
noexcept |
Return the component type.
Definition at line 67 of file foamGltfAccessor.C.
|
noexcept |
Return the data size.
Definition at line 73 of file foamGltfAccessor.C.
|
noexcept |
Return the type.
Definition at line 79 of file foamGltfAccessor.C.
void set | ( | const Field< Type > & | fld, |
bool | calcMinMax = true |
||
) |
Set the accessor.
Definition at line 79 of file foamGltfAccessorTemplates.C.
References fld, Foam::glTF::FLOAT, Foam::glTF::key(), Foam::max(), maxValue, Foam::min(), minValue, and accessor::toString().
void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 85 of file foamGltfAccessor.C.
References Foam::indent(), Foam::nl, os(), and base::write().
Referenced by Foam::operator<<().
Foam::string getValueType | ( | ) |
Definition at line 27 of file foamGltfAccessorTemplates.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Foam::string toString | ( | const Type & | val | ) |
Definition at line 61 of file foamGltfAccessorTemplates.C.
References Foam::component(), and StringStreamAllocator< StreamType >::str().
|
protected |
Buffer view index.
Definition at line 73 of file foamGltfAccessor.H.
|
protected |
Byte offset.
Definition at line 78 of file foamGltfAccessor.H.
|
protected |
Component type.
Definition at line 83 of file foamGltfAccessor.H.
|
protected |
Data size.
Definition at line 88 of file foamGltfAccessor.H.
|
protected |
Data type.
Definition at line 93 of file foamGltfAccessor.H.
|
protected |
Max value. Note: stored as a string for convenience.
Definition at line 98 of file foamGltfAccessor.H.
|
protected |
Min value. Note: stored as a string for convenience.
Definition at line 103 of file foamGltfAccessor.H.
|
protected |
Flag to indicate whether min and max values are available.
Definition at line 108 of file foamGltfAccessor.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.