-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #959 from CesiumGS/shared-assets-kring
Tweaks to asset sharing to support Unreal implementation
- Loading branch information
Showing
3 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
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,51 @@ | ||
#pragma once | ||
|
||
#include <array> | ||
#include <string> | ||
|
||
namespace CesiumGltf { | ||
|
||
/** | ||
* @brief The standard glTF vertex attribute semantics from the specification. | ||
*/ | ||
struct VertexAttributeSemantics { | ||
/** | ||
* @brief Unitless XYZ vertex positions. | ||
*/ | ||
static const std::string POSITION; | ||
|
||
/** | ||
* @brief Normalized XYZ vertex normals. | ||
*/ | ||
static const std::string NORMAL; | ||
|
||
/** | ||
* @brief XYZW vertex tangents where the XYZ portion is normalized, and the W | ||
* component is a sign value (-1 or +1) indicating handedness of the tangent | ||
* basis. | ||
*/ | ||
static const std::string TANGENT; | ||
|
||
/** | ||
* @brief ST texture coordinates | ||
*/ | ||
static const std::array<std::string, 8> TEXCOORD_n; | ||
|
||
/** | ||
* @brief RGB or RGBA vertex color linear multiplier. | ||
*/ | ||
static const std::array<std::string, 8> COLOR_n; | ||
|
||
/** | ||
* @brief The indices of the joints from the corresponding skin.joints array | ||
* that affect the vertex. | ||
*/ | ||
static const std::array<std::string, 8> JOINTS_n; | ||
|
||
/** | ||
* @brief The weights indicating how strongly the joint influences the vertex. | ||
*/ | ||
static const std::array<std::string, 8> WEIGHTS_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include <CesiumGltf/VertexAttributeSemantics.h> | ||
|
||
namespace CesiumGltf { | ||
|
||
/** | ||
* @brief Unitless XYZ vertex positions. | ||
*/ | ||
const std::string VertexAttributeSemantics::POSITION = "POSITION"; | ||
|
||
/** | ||
* @brief Normalized XYZ vertex normals. | ||
*/ | ||
const std::string VertexAttributeSemantics::NORMAL = "NORMAL"; | ||
|
||
/** | ||
* @brief XYZW vertex tangents where the XYZ portion is normalized, and the W | ||
* component is a sign value (-1 or +1) indicating handedness of the tangent | ||
* basis. | ||
*/ | ||
const std::string VertexAttributeSemantics::TANGENT = "TANGENT"; | ||
|
||
/** | ||
* @brief ST texture coordinates | ||
*/ | ||
const std::array<std::string, 8> VertexAttributeSemantics::TEXCOORD_n = { | ||
"TEXCOORD_0", | ||
"TEXCOORD_1", | ||
"TEXCOORD_2", | ||
"TEXCOORD_3", | ||
"TEXCOORD_4", | ||
"TEXCOORD_5", | ||
"TEXCOORD_6", | ||
"TEXCOORD_7"}; | ||
|
||
/** | ||
* @brief RGB or RGBA vertex color linear multiplier. | ||
*/ | ||
const std::array<std::string, 8> VertexAttributeSemantics::COLOR_n = { | ||
"COLOR_0", | ||
"COLOR_1", | ||
"COLOR_2", | ||
"COLOR_3", | ||
"COLOR_4", | ||
"COLOR_5", | ||
"COLOR_6", | ||
"COLOR_7"}; | ||
|
||
/** | ||
* @brief The indices of the joints from the corresponding skin.joints array | ||
* that affect the vertex. | ||
*/ | ||
const std::array<std::string, 8> VertexAttributeSemantics::JOINTS_n = { | ||
"JOINTS_0", | ||
"JOINTS_1", | ||
"JOINTS_2", | ||
"JOINTS_3", | ||
"JOINTS_4", | ||
"JOINTS_5", | ||
"JOINTS_6", | ||
"JOINTS_7"}; | ||
|
||
/** | ||
* @brief The weights indicating how strongly the joint influences the vertex. | ||
*/ | ||
const std::array<std::string, 8> VertexAttributeSemantics::WEIGHTS_n = { | ||
"WEIGHTS_0", | ||
"WEIGHTS_1", | ||
"WEIGHTS_2", | ||
"WEIGHTS_3", | ||
"WEIGHTS_4", | ||
"WEIGHTS_5", | ||
"WEIGHTS_6", | ||
"WEIGHTS_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