diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-26 20:29:37 +0300 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-26 20:29:37 +0300 |
commit | 5c87aefa4b15004393615c5e6b99c17c8e6a8333 (patch) | |
tree | 4739fc1b67b3fcedb76caa02cbdac7c872203fb5 /source/blender/blenkernel | |
parent | 9b8a0357186f1bfe299d6f475bd9ce5a4feeb43e (diff) |
- integrated get_mvert_weight and color_temperature
into drawobject.c (just used for calculating weight
map)
- removed two_sided (replace with glLightModeli calls)
- huge rewrite of drawobject.c for meshes, extracting simple
drawing functions and then reworking to bring some order
and clarity back to the code.
A lot was changed here so it is likely I missed a few
things in testing although I tried to be very careful.
Please let me know if you find any changes in drawing.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_deform.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 42 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 21 |
4 files changed, 0 insertions, 65 deletions
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index b15ccc6ecf3..4e1977fe07c 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -44,7 +44,6 @@ struct bDeformGroup; void copy_defgroups (struct ListBase *lb1, struct ListBase *lb2); struct bDeformGroup* copy_defgroup (struct bDeformGroup *ingroup); -void color_temperature (float input, unsigned char *r, unsigned char *g, unsigned char *b); struct bDeformGroup *get_named_vertexgroup (Object *ob, char *name); int get_defgroup_num (struct Object *ob, struct bDeformGroup *dg); diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 2bbe0a5fdca..6f4040ace60 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -73,7 +73,6 @@ void tface_to_mcol(struct Mesh *me); void free_dverts(struct MDeformVert *dvert, int totvert); void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert); /* __NLA */ int mesh_uses_displist(struct Mesh *me); -float get_mvert_weight (struct Object *ob, int vert, int defgroup); int update_realtime_texture(struct TFace *tface, double time); void mesh_delete_material_index(struct Mesh *me, int index); void mesh_set_smooth_flag(struct Mesh *me, int enableSmooth); diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index d4b1e9defff..fbf72fb71b2 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -65,48 +65,6 @@ #include <config.h> #endif -void color_temperature (float input, unsigned char *r, unsigned char *g, unsigned char *b) -{ - - /* blue to red */ - - float fr = (float)(*r); - float fg = (float)(*g); - float fb = (float)(*b); - - if (input < 0.0F) - input = 0.0F; - - if (input > 1.0F) - input = 1.0F; - - if (input<=0.25f){ - fr=0.0f; - fg=255.0f * (input*4.0f); - fb=255.0f; - } - else if (input<=0.50f){ - fr=0.0f; - fg=255.0f; - fb=255.0f * (1.0f-((input-0.25f)*4.0f)); - } - else if (input<=0.75){ - fr=255.0f * ((input-0.50f)*4.0f); - fg=255.0f; - fb=0.0f; - } - else if (input<=1.0){ - fr=255.0f; - fg=255.0f * (1.0f-((input-0.75f)*4.0f)); - fb=0.0f; - } - - (*r) = (unsigned char)(fr * ((input/2.0f)+0.5f)); - (*g) = (unsigned char)(fg * ((input/2.0f)+0.5f)); - (*b) = (unsigned char)(fb * ((input/2.0f)+0.5f)); - - -} void copy_defgroups(ListBase *outbase, ListBase *inbase) { diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index a9cd8c5f2af..99f9175d53b 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -114,27 +114,6 @@ int update_realtime_texture(TFace *tface, double time) return inc; } -float get_mvert_weight (Object *ob, int vert, int defgroup) -{ - int i; - Mesh *me; - float result; - - me=ob->data; - - if (!me->dvert) - return 0.0F; - - result=0.0F; - - for (i=0; i<me->dvert[vert].totweight; i++){ - if (me->dvert[vert].dw[i].def_nr==defgroup) - result+=me->dvert[vert].dw[i].weight; - } - - return result; -} - void unlink_mesh(Mesh *me) { int a; |