|
6 | 6 | #include "CesiumGltf/ExtensionModelExtStructuralMetadata.h" |
7 | 7 | #include "CesiumGltf/FeatureId.h" |
8 | 8 | #include "CesiumGltf/Model.h" |
| 9 | +#include "CesiumGltfInstancedComponent.h" |
9 | 10 | #include "CesiumGltfPrimitiveComponent.h" |
10 | 11 |
|
11 | 12 | static FCesiumFeatureIdAttribute EmptyFeatureIDAttribute; |
@@ -223,30 +224,31 @@ int64 UCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDFromHit( |
223 | 224 | return -1; |
224 | 225 | } |
225 | 226 |
|
226 | | - const CesiumPrimitiveData& primData = pGltfComponent->getPrimitiveData(); |
227 | | - if (!primData.pMeshPrimitive) { |
| 227 | + const CesiumPrimitiveData& primitiveData = pGltfComponent->getPrimitiveData(); |
| 228 | + if (!primitiveData.pMeshPrimitive) { |
228 | 229 | return -1; |
229 | 230 | } |
230 | | - auto VertexIndices = std::visit( |
| 231 | + |
| 232 | + auto vertexIndices = std::visit( |
231 | 233 | CesiumGltf::IndicesForFaceFromAccessor{ |
232 | 234 | Hit.FaceIndex, |
233 | | - primData.PositionAccessor.size(), |
234 | | - primData.pMeshPrimitive->mode}, |
235 | | - primData.IndexAccessor); |
| 235 | + primitiveData.positionAccessor.size(), |
| 236 | + primitiveData.pMeshPrimitive->mode}, |
| 237 | + primitiveData.indexAccessor); |
236 | 238 |
|
237 | | - int64 VertexIndex = VertexIndices[0]; |
| 239 | + int64 vertexIndex = vertexIndices[0]; |
238 | 240 |
|
239 | 241 | if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Attribute) { |
240 | 242 | FCesiumFeatureIdAttribute attribute = |
241 | 243 | std::get<FCesiumFeatureIdAttribute>(FeatureIDSet._featureID); |
242 | 244 | return UCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureID( |
243 | 245 | attribute, |
244 | | - VertexIndex); |
| 246 | + vertexIndex); |
245 | 247 | } |
246 | 248 |
|
247 | 249 | if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Implicit) { |
248 | | - return (VertexIndex >= 0 && VertexIndex < FeatureIDSet._featureCount) |
249 | | - ? VertexIndex |
| 250 | + return (vertexIndex >= 0 && vertexIndex < FeatureIDSet._featureCount) |
| 251 | + ? vertexIndex |
250 | 252 | : -1; |
251 | 253 | } |
252 | 254 |
|
|
0 commit comments