parent
a8207b2dc7
commit
035d74f54a
|
@ -351,7 +351,7 @@ private:
|
|||
};
|
||||
|
||||
void _cull_convex(Octant *p_octant, _CullConvexData *p_cull);
|
||||
void _cull_AABB(Octant *p_octant, const Rect3 &p_aabb, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask);
|
||||
void _cull_aabb(Octant *p_octant, const Rect3 &p_aabb, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask);
|
||||
void _cull_segment(Octant *p_octant, const Vector3 &p_from, const Vector3 &p_to, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask);
|
||||
void _cull_point(Octant *p_octant, const Vector3 &p_point, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask);
|
||||
|
||||
|
@ -380,7 +380,7 @@ public:
|
|||
int get_subindex(OctreeElementID p_id) const;
|
||||
|
||||
int cull_convex(const Vector<Plane> &p_convex, T **p_result_array, int p_result_max, uint32_t p_mask = 0xFFFFFFFF);
|
||||
int cull_AABB(const Rect3 &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array = NULL, uint32_t p_mask = 0xFFFFFFFF);
|
||||
int cull_aabb(const Rect3 &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array = NULL, uint32_t p_mask = 0xFFFFFFFF);
|
||||
int cull_segment(const Vector3 &p_from, const Vector3 &p_to, T **p_result_array, int p_result_max, int *p_subindex_array = NULL, uint32_t p_mask = 0xFFFFFFFF);
|
||||
|
||||
int cull_point(const Vector3 &p_point, T **p_result_array, int p_result_max, int *p_subindex_array = NULL, uint32_t p_mask = 0xFFFFFFFF);
|
||||
|
@ -1095,7 +1095,7 @@ void Octree<T, use_pairs, AL>::_cull_convex(Octant *p_octant, _CullConvexData *p
|
|||
}
|
||||
|
||||
template <class T, bool use_pairs, class AL>
|
||||
void Octree<T, use_pairs, AL>::_cull_AABB(Octant *p_octant, const Rect3 &p_aabb, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask) {
|
||||
void Octree<T, use_pairs, AL>::_cull_aabb(Octant *p_octant, const Rect3 &p_aabb, T **p_result_array, int *p_result_idx, int p_result_max, int *p_subindex_array, uint32_t p_mask) {
|
||||
|
||||
if (*p_result_idx == p_result_max)
|
||||
return; //pointless
|
||||
|
@ -1160,7 +1160,7 @@ void Octree<T, use_pairs, AL>::_cull_AABB(Octant *p_octant, const Rect3 &p_aabb,
|
|||
for (int i = 0; i < 8; i++) {
|
||||
|
||||
if (p_octant->children[i] && p_octant->children[i]->aabb.intersects_inclusive(p_aabb)) {
|
||||
_cull_AABB(p_octant->children[i], p_aabb, p_result_array, p_result_idx, p_result_max, p_subindex_array, p_mask);
|
||||
_cull_aabb(p_octant->children[i], p_aabb, p_result_array, p_result_idx, p_result_max, p_subindex_array, p_mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1336,14 +1336,14 @@ int Octree<T, use_pairs, AL>::cull_convex(const Vector<Plane> &p_convex, T **p_r
|
|||
}
|
||||
|
||||
template <class T, bool use_pairs, class AL>
|
||||
int Octree<T, use_pairs, AL>::cull_AABB(const Rect3 &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array, uint32_t p_mask) {
|
||||
int Octree<T, use_pairs, AL>::cull_aabb(const Rect3 &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array, uint32_t p_mask) {
|
||||
|
||||
if (!root)
|
||||
return 0;
|
||||
|
||||
int result_count = 0;
|
||||
pass++;
|
||||
_cull_AABB(root, p_aabb, p_result_array, &result_count, p_result_max, p_subindex_array, p_mask);
|
||||
_cull_aabb(root, p_aabb, p_result_array, &result_count, p_result_max, p_subindex_array, p_mask);
|
||||
|
||||
return result_count;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ int BroadPhaseOctree::cull_segment(const Vector3 &p_from, const Vector3 &p_to, C
|
|||
|
||||
int BroadPhaseOctree::cull_aabb(const Rect3 &p_aabb, CollisionObjectSW **p_results, int p_max_results, int *p_result_indices) {
|
||||
|
||||
return octree.cull_AABB(p_aabb, p_results, p_max_results, p_result_indices);
|
||||
return octree.cull_aabb(p_aabb, p_results, p_max_results, p_result_indices);
|
||||
}
|
||||
|
||||
void *BroadPhaseOctree::_pair_callback(void *self, OctreeElementID p_A, CollisionObjectSW *p_object_A, int subindex_A, OctreeElementID p_B, CollisionObjectSW *p_object_B, int subindex_B) {
|
||||
|
|
|
@ -2902,7 +2902,7 @@ Vector<RID> VisualServerRaster::instances_cull_aabb(const AABB& p_aabb, RID p_sc
|
|||
|
||||
int culled=0;
|
||||
Instance *cull[1024];
|
||||
culled=scenario->octree.cull_AABB(p_aabb,cull,1024);
|
||||
culled=scenario->octree.cull_aabb(p_aabb,cull,1024);
|
||||
|
||||
for (int i=0;i<culled;i++) {
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ Vector<ObjectID> VisualServerScene::instances_cull_aabb(const Rect3 &p_aabb, RID
|
|||
|
||||
int culled = 0;
|
||||
Instance *cull[1024];
|
||||
culled = scenario->octree.cull_AABB(p_aabb, cull, 1024);
|
||||
culled = scenario->octree.cull_aabb(p_aabb, cull, 1024);
|
||||
|
||||
for (int i = 0; i < culled; i++) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue