Metaball tessellation optimization (Octree to BVH)

Speedup is non-linear, 2x-10x faster is quite normal.
Patch T43678.

- Switched from an Octree to BVH.
- Finding first points of surface no longer "wastes" density function evaluation: every result is cached.
- Use MemArena instead of using own memory management.
- Correct calculation of metaelem bounding box.
- Remove mball_count(): mballs are now counted "on the go".
This commit is contained in:
2015-04-07 12:44:39 +10:00
committed by Campbell Barton
parent 9510137d12
commit 98f4106694
4 changed files with 661 additions and 1309 deletions

View File

@@ -45,8 +45,6 @@ struct MetaBall *BKE_mball_copy(struct MetaBall *mb);
void BKE_mball_make_local(struct MetaBall *mb);
void BKE_mball_cubeTable_free(void);
bool BKE_mball_is_basis_for(struct Object *ob1, struct Object *ob2);
bool BKE_mball_is_basis(struct Object *ob);
struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);

View File

@@ -31,4 +31,6 @@ void BKE_mball_polygonize(
struct EvaluationContext *eval_ctx, struct Scene *scene,
struct Object *ob, struct ListBase *dispbase);
void BKE_mball_cubeTable_free(void);
#endif /* __BKE_MBALL_TESSELLATE_H__ */

File diff suppressed because it is too large Load Diff

View File

@@ -60,7 +60,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mball.h"
#include "BKE_mball_tessellate.h"
#include "BKE_node.h"
#include "BKE_report.h"