Home | History | Annotate | Download | only in BVH

Lines Matching defs:objects

34   void operator()(const ObjectList &objects, BoxIter boxBegin, BoxIter boxEnd, VolumeList &outBoxes)
37 eigen_assert(outBoxes.size() == objects.size());
43 void operator()(const ObjectList &objects, int, int, VolumeList &outBoxes)
45 outBoxes.reserve(objects.size());
46 for(int i = 0; i < (int)objects.size(); ++i)
47 outBoxes.push_back(bounding_box(objects[i]));
63 * Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers
96 objects.clear();
100 objects.insert(objects.end(), begin, end);
101 int n = static_cast<int>(objects.size());
110 internal::get_boxes_helper<ObjectList, VolumeList, BIter>()(objects, boxBegin, boxEnd, objBoxes);
122 tmp.swap(objects);
124 objects[i] = tmp[objCenters[i].second];
137 if(!objects.empty())
138 outOBegin = &(objects[0]);
139 outOEnd = outOBegin + objects.size(); //output all objects--necessary when the tree has only one object
151 else if(children[idx] >= numBoxes) { //if both children are objects
153 outOBegin = &(objects[children[idx] - numBoxes]);
158 outOBegin = &(objects[children[idx + 1] - numBoxes]);
180 //Build the part of the tree between objects[from] and objects[to] (not including objects[to]).
188 children.push_back(from + (int)objects.size() - 1); //there are objects.size() - 1 tree nodes
189 children.push_back(from + (int)objects.size());
199 children.push_back(mid + (int)objects.size() - 1);
215 std::vector<int> children; //children of x are children[2x] and children[2x+1], indices bigger than boxes.size() index into objects.
217 ObjectList objects;