#include <foamGltfAccessor.H>


Public Member Functions | |
| accessor () | |
| Default construct. | |
| accessor (const word &name) | |
| Construct from name. | |
| ~accessor ()=default | |
| Destructor. | |
| label & | bufferViewId () noexcept |
| Return the buffer view index. | |
| label & | byteOffset () noexcept |
| Return the byte offset. | |
| label & | componentType () noexcept |
| Return the component type. | |
| label & | count () noexcept |
| Return the data size. | |
| string & | type () noexcept |
| Return the type. | |
| template<class Type> | |
| void | set (const Field< Type > &fld, bool calcMinMax=true) |
| Set the accessor. | |
| void | write (Ostream &os) const |
| Write. | |
| template<class Type> | |
| Foam::string | getValueType () |
| template<class Type> | |
| Foam::string | toString (const Type &val) |
| Public Member Functions inherited from base | |
| base () | |
| Default construct. | |
| base (const word &name) | |
| Construct with name. | |
| ~base ()=default | |
| Destructor. | |
| label & | id () noexcept |
| Return access to the ID. | |
| const word & | name () const noexcept |
| Return const access to the name. | |
| void | write (Ostream &os) const |
| Write. | |
| 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. | |
| template<class Type> | |
| static string | toString (const Type &val) |
| Stringify the value. | |
Protected Attributes | |
| label | bufferViewId_ |
| Buffer view index. | |
| label | byteOffset_ |
| Byte offset. | |
| label | componentType_ |
| Component type. | |
| label | count_ |
| Data size. | |
| string | type_ |
| Data type. | |
| string | max_ |
| Max value. Note: stored as a string for convenience. | |
| string | min_ |
| Min value. Note: stored as a string for convenience. | |
| bool | minMax_ |
| Flag to indicate whether min and max values are available. | |
| Protected Attributes inherited from base | |
| word | name_ |
| Name. | |
| label | id_ |
| ID. | |
glTF accessor
Definition at line 62 of file foamGltfAccessor.H.
| accessor | ( | ) |
Default construct.
Definition at line 25 of file foamGltfAccessor.C.
References base::base(), bufferViewId_, byteOffset_, componentType_, count_, max_, min_, minMax_, and type_.

|
explicit |
Construct from name.
Definition at line 39 of file foamGltfAccessor.C.
References base::base(), bufferViewId_, byteOffset_, componentType_, count_, max_, min_, minMax_, base::name(), and type_.

|
default |
Destructor.
References byteOffset(), componentType(), count(), fld(), Foam::noexcept, os(), set(), type(), and write().

|
staticprotected |
|
staticprotected |
Stringify the value.
References base::name().
Referenced by set().


|
noexcept |
Return the buffer view index.
Definition at line 55 of file foamGltfAccessor.C.
References bufferViewId_, and Foam::noexcept.
|
noexcept |
Return the byte offset.
Definition at line 61 of file foamGltfAccessor.C.
References byteOffset_, and Foam::noexcept.
Referenced by ~accessor().

|
noexcept |
Return the component type.
Definition at line 67 of file foamGltfAccessor.C.
References componentType_, and Foam::noexcept.
Referenced by ~accessor().

|
noexcept |
Return the data size.
Definition at line 73 of file foamGltfAccessor.C.
References count_, and Foam::noexcept.
Referenced by ~accessor().

|
noexcept |
Return the type.
Definition at line 79 of file foamGltfAccessor.C.
References Foam::noexcept, and type_.
Referenced by ~accessor().

| void set | ( | const Field< Type > & | fld, |
| bool | calcMinMax = true ) |
Set the accessor.
Definition at line 79 of file foamGltfAccessorTemplates.C.
References componentType_, count_, fld(), Foam::glTF::FLOAT, getValueType(), Foam::glTF::key(), Foam::max(), max_, maxValue, Foam::min(), min_, minMax_, minValue, toString(), and type_.
Referenced by ~accessor().


| void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 85 of file foamGltfAccessor.C.
References bufferViewId_, byteOffset_, componentType_, count_, Foam::indent(), max_, min_, minMax_, Foam::nl, os(), type_, and base::write().
Referenced by Foam::operator<<(), and ~accessor().


| Foam::string getValueType | ( | ) |
Definition at line 27 of file foamGltfAccessorTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and exprTypeTraits< Type >::value.

| Foam::string toString | ( | const Type & | val | ) |
Definition at line 61 of file foamGltfAccessorTemplates.C.
References Foam::component(), and OStringStream::str().

|
protected |
Buffer view index.
Definition at line 73 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), bufferViewId(), and write().
|
protected |
Byte offset.
Definition at line 78 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), byteOffset(), and write().
|
protected |
Component type.
Definition at line 83 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), componentType(), set(), and write().
|
protected |
Data size.
Definition at line 88 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), count(), set(), and write().
|
protected |
Data type.
Definition at line 93 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), set(), type(), and write().
|
protected |
Max value. Note: stored as a string for convenience.
Definition at line 98 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), set(), and write().
|
protected |
Min value. Note: stored as a string for convenience.
Definition at line 103 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), set(), and write().
|
protected |
Flag to indicate whether min and max values are available.
Definition at line 108 of file foamGltfAccessor.H.
Referenced by accessor(), accessor(), set(), and write().