A node in the node hierarchy. When the node contains skin
, all mesh.primitives
MUST contain JOINTS_0
and WEIGHTS_0
attributes. A node MAY have either a matrix
or any combination of translation
/rotation
/scale
(TRS) properties. TRS properties are converted to matrices and postmultiplied in the T * R * S
order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), matrix
MUST NOT be present.
More...
#include <CesiumGltf/Node.h>
|
int64_t | getSizeBytes () const |
| Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
|
|
int64_t | getSizeBytes () const |
| Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. Calling this method may be slow as it requires traversing the object's entire structure.
|
|
template<typename T > |
bool | hasExtension () const noexcept |
| Checks if an extension exists given its static type.
|
|
template<typename T > |
const T * | getExtension () const noexcept |
| Gets an extension given its static type.
|
|
template<typename T > |
T * | getExtension () noexcept |
| Gets an extension given its static type.
|
|
const JsonValue * | getGenericExtension (const std::string &extensionName) const noexcept |
| Gets a generic extension with the given name as a CesiumUtility::JsonValue .
|
|
JsonValue * | getGenericExtension (const std::string &extensionName) noexcept |
| Gets a generic extension with the given name as a CesiumUtility::JsonValue .
|
|
template<typename T , typename... ConstructorArgumentTypes> |
T & | addExtension (ConstructorArgumentTypes &&... constructorArguments) |
| Adds a statically-typed extension to this object.
|
|
template<typename T > |
void | removeExtension () |
| Removes a statically-typed extension from this object.
|
|
int64_t | getSizeBytes () const |
| Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object.
|
|
|
int32_t | camera = -1 |
| The index of the camera referenced by this node.
|
|
std::vector< int32_t > | children |
| The indices of this node's children.
|
|
int32_t | skin = -1 |
| The index of the skin referenced by this node.
|
|
std::vector< double > | matrix = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} |
| A floating-point 4x4 transformation matrix stored in column-major order.
|
|
int32_t | mesh = -1 |
| The index of the mesh in this node.
|
|
std::vector< double > | rotation = {0, 0, 0, 1} |
| The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
|
std::vector< double > | scale = {1, 1, 1} |
| The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
|
std::vector< double > | translation = {0, 0, 0} |
| The node's translation along the x, y, and z axes.
|
|
std::vector< double > | weights |
| The weights of the instantiated morph target. The number of array elements MUST match the number of morph targets of the referenced mesh. When defined, mesh MUST also be defined.
|
|
std::string | name |
| The user-defined name of this object.
|
|
std::unordered_map< std::string, std::any > | extensions |
| The extensions attached to this object.
|
|
JsonValue::Object | extras |
| Application-specific data.
|
|
JsonValue::Object | unknownProperties |
| Unknown properties that exist on this object but do not have any representation in the statically-typed classes.
|
|
|
static constexpr const char * | TypeName = "Node" |
| The original name of this type.
|
|
A node in the node hierarchy. When the node contains skin
, all mesh.primitives
MUST contain JOINTS_0
and WEIGHTS_0
attributes. A node MAY have either a matrix
or any combination of translation
/rotation
/scale
(TRS) properties. TRS properties are converted to matrices and postmultiplied in the T * R * S
order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), matrix
MUST NOT be present.
Definition at line 23 of file Node.h.
◆ getSizeBytes()
int64_t CesiumGltf::Node::getSizeBytes |
( |
| ) |
const |
|
inline |
Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
Definition at line 89 of file Node.h.
◆ camera
int32_t CesiumGltf::Node::camera = -1 |
The index of the camera referenced by this node.
Definition at line 32 of file Node.h.
◆ children
std::vector<int32_t> CesiumGltf::Node::children |
The indices of this node's children.
Definition at line 37 of file Node.h.
◆ matrix
std::vector<double> CesiumGltf::Node::matrix = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} |
A floating-point 4x4 transformation matrix stored in column-major order.
Definition at line 52 of file Node.h.
◆ mesh
int32_t CesiumGltf::Node::mesh = -1 |
The index of the mesh in this node.
Definition at line 57 of file Node.h.
◆ rotation
std::vector<double> CesiumGltf::Node::rotation = {0, 0, 0, 1} |
The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
Definition at line 63 of file Node.h.
◆ scale
std::vector<double> CesiumGltf::Node::scale = {1, 1, 1} |
The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
Definition at line 69 of file Node.h.
◆ skin
int32_t CesiumGltf::Node::skin = -1 |
The index of the skin referenced by this node.
When a skin is referenced by a node within a scene, all joints used by the skin MUST belong to the same scene. When defined, mesh
MUST also be defined.
Definition at line 46 of file Node.h.
◆ translation
std::vector<double> CesiumGltf::Node::translation = {0, 0, 0} |
The node's translation along the x, y, and z axes.
Definition at line 74 of file Node.h.
◆ TypeName
const char* CesiumGltf::Node::TypeName = "Node" |
|
staticconstexpr |
The original name of this type.
Definition at line 27 of file Node.h.
◆ weights
std::vector<double> CesiumGltf::Node::weights |
The weights of the instantiated morph target. The number of array elements MUST match the number of morph targets of the referenced mesh. When defined, mesh
MUST also be defined.
Definition at line 81 of file Node.h.
The documentation for this struct was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumGltf/generated/include/CesiumGltf/Node.h