| 27 | } |
| 28 | |
| 29 | void 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 | |
| 52 | NAN_METHOD(BoundingBox::New) |
nothing calls this directly
no test coverage detected