File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#include " UnityPrepareRendererResources.h"
22
33#include " CesiumFeaturesMetadataUtility.h"
4- #include " DotNet/UnityEngine/Shader.h"
54#include " TextureLoader.h"
65#include " TilesetMaterialProperties.h"
76#include " UnityLifetime.h"
@@ -100,36 +99,7 @@ std::vector<TIndex> generateIndices(const int32_t count) {
10099 }
101100 return syntheticIndexBuffer;
102101}
103- /*
104- template <typename TIndex>
105- void computeFlatNormals(
106- uint8_t* pWritePos,
107- size_t stride,
108- TIndex* indices,
109- int32_t indexCount,
110- const AccessorView<UnityEngine::Vector3>& positionView) {
111-
112- for (int i = 0; i < indexCount; i += 3) {
113-
114- TIndex i0 = indices[i];
115- TIndex i1 = indices[i + 1];
116- TIndex i2 = indices[i + 2];
117102
118- const glm::vec3& v0 =
119- *reinterpret_cast<const glm::vec3*>(&positionView[i0]);
120- const glm::vec3& v1 =
121- *reinterpret_cast<const glm::vec3*>(&positionView[i1]);
122- const glm::vec3& v2 =
123- *reinterpret_cast<const glm::vec3*>(&positionView[i2]);
124-
125- glm::vec3 normal = glm::normalize(glm::cross(v1 - v0, v2 - v0));
126- for (int j = 0; j < 3; j++) {
127- *reinterpret_cast<glm::vec3*>(pWritePos) = normal;
128- pWritePos += stride;
129- }
130- }
131- }
132- */
133103/* *
134104 * @brief The result after populating Unity mesh data with loaded glTF content.
135105 */
You can’t perform that action at this time.
0 commit comments