MCPcopy Create free account
hub / github.com/RenderKit/embree / fix_bspline_end_points

Function fix_bspline_end_points

tutorials/common/scenegraph/xml_loader.cpp:1166–1180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164 }
1165
1166 void fix_bspline_end_points(const std::vector<unsigned>& indices, avector<Vec3ff>& positions)
1167 {
1168 for (size_t i=0; i<indices.size(); i++)
1169 {
1170 const size_t idx = indices[i];
1171 vfloat4 v0 = vfloat4::loadu(&positions[idx+0]);
1172 vfloat4 v1 = vfloat4::loadu(&positions[idx+1]);
1173 vfloat4 v2 = vfloat4::loadu(&positions[idx+2]);
1174 vfloat4 v3 = vfloat4::loadu(&positions[idx+3]);
1175 v0 = select(isnan(v0),2.0f*v1-v2,v0); // nan triggers edge rule
1176 v3 = select(isnan(v3),2.0f*v2-v1,v3); // nan triggers edge rule
1177 vfloat4::storeu(&positions[idx+0],v0);
1178 vfloat4::storeu(&positions[idx+3],v3);
1179 }
1180 }
1181
1182 Ref<SceneGraph::Node> XMLLoader::loadBezierCurves(const Ref<XML>& xml, SceneGraph::CurveSubtype subtype)
1183 {

Callers 2

loadCurvesMethod · 0.85
loadFurBallMethod · 0.85

Calls 5

loaduFunction · 0.50
selectFunction · 0.50
isnanFunction · 0.50
storeuFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected