MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / FromCAPI

Function FromCAPI

dotnet/CAPI/include/NurbsCurve_CAPI.h:255–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253#ifdef __cplusplus
254
255inline LNLib::LN_NurbsCurve FromCAPI(LN_NurbsCurve_C c) {
256 LNLib::LN_NurbsCurve s;
257 s.Degree = c.degree;
258 s.KnotVector.assign(c.knot_vector, c.knot_vector + c.knot_vector_count);
259 s.ControlPoints.resize(c.control_point_count);
260 for (int i = 0; i < c.control_point_count; ++i) {
261 XYZW_C cp = c.control_points[i];
262 s.ControlPoints[i] = LNLib::XYZW(cp.wx, cp.wy, cp.wz, cp.w);
263 }
264 return s;
265}
266
267inline LN_NurbsCurve_C ToCAPI(const LNLib::LN_NurbsCurve& s) {
268 static thread_local std::vector<double> g_knot_buffer;

Callers

nothing calls this directly

Calls 1

XYZWClass · 0.50

Tested by

no test coverage detected