MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / Update

Method Update

src/BoundingBox.cc:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void BoundingBox::Update(BoundingBox* pThis,_NAN_METHOD_ARGS)
30{
31 // info could be one or several points
32 // or a array of point
33 for (int i=0; i<info.Length(); i++) {
34 if (info[i]->IsArray()) {
35 v8::Local<v8::Array> arr = v8::Local<v8::Array>::Cast(info[i]);
36
37 v8::Local<v8::Value> element0 = Nan::Get(arr,0).ToLocalChecked();
38
39 if ( element0->IsArray() || element0->IsObject()) {
40 // probably an array of point
41 } else {
42 // a single point
43 gp_Pnt point;
44 ReadPoint(info[i],&point);
45 pThis->m_box.Update(point.X(),point.Y(),point.Z());
46 }
47 }
48 }
49}
50
51
52NAN_METHOD(BoundingBox::New)

Callers

nothing calls this directly

Calls 1

ReadPointFunction · 0.85

Tested by

no test coverage detected