Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2005-07-14 22:04:27 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-14 22:04:27 +0400
commitb22e3414cafdc0fe0cf151665b753f817513375d (patch)
tree157bc5803f6e2c8b40ee50193397f5c77a461937 /source/blender/src/drawobject.c
parent3f769ff371547af297498feb6d282cdc2f08c92f (diff)
- add mesh_get_bb function to return mesh boundbox and calc if needed
- switch all mesh boundbox access to go through mesh_get_bb - switch object_handle_update to call mesh_changed instead of making the displist data immediately (delayed calculation)
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r--source/blender/src/drawobject.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index f41dc5d07af..03f730b5016 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -1932,8 +1932,9 @@ static void draw_mesh_object(Base *base, int dt)
baseDM->release(baseDM);
}
else {
- if(me->bb==NULL) tex_space_mesh(me);
- if(me->totface<=4 || boundbox_clip(ob->obmat, me->bb)) {
+ BoundBox *bb = mesh_get_bb(me);
+
+ if(me->totface<=4 || boundbox_clip(ob->obmat, bb)) {
DerivedMesh *baseDM = mesh_get_base_derived(ob);
DerivedMesh *realDM = mesh_get_derived(ob);
@@ -3222,11 +3223,7 @@ void get_local_bounds(Object *ob, float *centre, float *size)
/* uses boundbox, function used by Ketsji */
if(ob->type==OB_MESH) {
- bb= ( (Mesh *)ob->data )->bb;
- if(bb==0) {
- tex_space_mesh(ob->data);
- bb= ( (Mesh *)ob->data )->bb;
- }
+ bb = mesh_get_bb(ob->data);
}
else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) {
bb= ( (Curve *)ob->data )->bb;
@@ -3295,11 +3292,7 @@ static void draw_bounding_volume(Object *ob)
BoundBox *bb=0;
if(ob->type==OB_MESH) {
- bb= ( (Mesh *)ob->data )->bb;
- if(bb==0) {
- tex_space_mesh(ob->data);
- bb= ( (Mesh *)ob->data )->bb;
- }
+ bb= mesh_get_bb(ob->data);
}
else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) {
bb= ( (Curve *)ob->data )->bb;