MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / parseGeometry

Function parseGeometry

Source/ThirdParty/OpenFBX/ofbx.cpp:3128–3150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3126}
3127
3128static OptionalError<Object*> parseGeometry(const Element& element, GeometryImpl& geom, std::vector<ParseDataJob> &jobs, Allocator& allocator) {
3129 assert(element.first_property);
3130
3131 const Element* vertices_element = findChild(element, "Vertices");
3132 if (!vertices_element || !vertices_element->first_property)
3133 {
3134 return &geom;
3135 }
3136
3137 const Element* polys_element = findChild(element, "PolygonVertexIndex");
3138 if (!polys_element || !polys_element->first_property) return Error("Indices missing");
3139
3140 if (!pushJob(jobs, *vertices_element->first_property, geom.positions.values)) return Error("Invalid vertices");
3141 if (!pushJob(jobs, *polys_element->first_property, geom.positions.indices)) return Error("Invalid vertices");
3142
3143 if (!parseGeometryMaterials(geom, element, jobs)) return Error("Invalid materials");
3144 if (!parseGeometryUVs(geom, element, jobs)) return Error("Invalid vertex attributes");
3145 if (!parseGeometryTangents(geom, element, jobs)) return Error("Invalid vertex attributes");
3146 if (!parseGeometryColors(geom, element, jobs)) return Error("Invalid vertex attributes");
3147 if (!parseGeometryNormals(geom, element, jobs)) return Error("Invalid vertex attributes");
3148
3149 return &geom;
3150}
3151
3152
3153bool ShapeImpl::postprocess(GeometryImpl& geom, Allocator& allocator) {

Callers 1

parseObjectsFunction · 0.85

Calls 8

findChildFunction · 0.85
ErrorClass · 0.85
pushJobFunction · 0.85
parseGeometryMaterialsFunction · 0.85
parseGeometryUVsFunction · 0.85
parseGeometryTangentsFunction · 0.85
parseGeometryColorsFunction · 0.85
parseGeometryNormalsFunction · 0.85

Tested by

no test coverage detected