-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FEATURE_ID_n semantic and InstanceAttributeSemantics
- Loading branch information
Showing
4 changed files
with
88 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
CesiumGltf/include/CesiumGltf/InstanceAttributeSemantics.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include <array> | ||
#include <string> | ||
|
||
namespace CesiumGltf { | ||
|
||
/** | ||
* @brief The standard glTF instance attribute semantics from | ||
* `EXT_mesh_gpu_instancing` plus additional instance attribute semantics from | ||
* extensions. | ||
*/ | ||
struct InstanceAttributeSemantics { | ||
/** | ||
* @brief XYZ translation vector. | ||
*/ | ||
static const std::string TRANSLATION; | ||
|
||
/** | ||
* @brief XYZW rotation quaternion. | ||
*/ | ||
static const std::string ROTATION; | ||
|
||
/** | ||
* @brief XYZ scale vector. | ||
*/ | ||
static const std::string SCALE; | ||
|
||
/** | ||
* @brief Feature IDs used in `EXT_instance_features`. | ||
*/ | ||
static const std::array<std::string, 8> FEATURE_ID_n; | ||
}; | ||
|
||
} // namespace CesiumGltf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <CesiumGltf/InstanceAttributeSemantics.h> | ||
|
||
namespace CesiumGltf { | ||
|
||
/** | ||
* @brief XYZ translation vector. | ||
*/ | ||
const std::string InstanceAttributeSemantics::TRANSLATION = "TRANSLATION"; | ||
|
||
/** | ||
* @brief XYZW rotation quaternion. | ||
*/ | ||
const std::string InstanceAttributeSemantics::ROTATION = "ROTATION"; | ||
|
||
/** | ||
* @brief XYZ scale vector. | ||
*/ | ||
const std::string InstanceAttributeSemantics::SCALE = "SCALE"; | ||
|
||
/** | ||
* @brief Feature IDs used in `EXT_mesh_features`. | ||
*/ | ||
const std::array<std::string, 8> InstanceAttributeSemantics::FEATURE_ID_n = { | ||
"_FEATURE_ID_0", | ||
"_FEATURE_ID_1", | ||
"_FEATURE_ID_2", | ||
"_FEATURE_ID_3", | ||
"_FEATURE_ID_4", | ||
"_FEATURE_ID_5", | ||
"_FEATURE_ID_6", | ||
"_FEATURE_ID_7"}; | ||
|
||
} // namespace CesiumGltf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters