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:
authorNicholas Bishop <nicholasbishop@gmail.com>2011-01-08 04:45:02 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2011-01-08 04:45:02 +0300
commit053776bf577b6554ccb2c63253f6c0bfd99d5de0 (patch)
treeabc8522e18d69eb3b366c2ad10a6f604334da68a /source/blender/editors/sculpt_paint/paint_utils.c
parent2579347a9a2018326b1f1a9aebcfa59a46f71084 (diff)
Sculpt/Paint:
More cleanups: moved a function declaration to the correct module, removed old/incorrect comments, marked more things with TODO where appropriate, refactored copy-pasted function, de-duplicated code.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 6db8a5fd4ae..da8eff6c581 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -21,6 +21,8 @@
#include "RNA_define.h"
#include "BIF_gl.h"
+/* TODO: remove once projectf goes away */
+#include "BIF_glutil.h"
#include "RE_shader_ext.h"
@@ -35,6 +37,19 @@
#include "paint_intern.h"
+/* convert a point in model coordinates to 2D screen coordinates */
+/* TODO: can be deleted once all calls are replaced with
+ view3d_project_float() */
+void projectf(bglMats *mats, const float v[3], float p[2])
+{
+ double ux, uy, uz;
+
+ gluProject(v[0],v[1],v[2], mats->modelview, mats->projection,
+ (GLint *)mats->viewport, &ux, &uy, &uz);
+ p[0]= ux;
+ p[1]= uy;
+}
+
float paint_calc_object_space_radius(ViewContext *vc, float center[3],
float pixel_radius)
{