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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-17 12:55:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-17 12:55:31 +0400
commit3afd8d6cc859255d0b52081fbee91b6c6a012b4c (patch)
tree262281013dbad763f94e4f3cd83d414aa24dd0bf /source/blender/blenlib/intern/uvproject.c
parentc00e7fb89dc6f44b74036256e55e00e9287b67db (diff)
move camera lens/angle conversion to BLI_math
Diffstat (limited to 'source/blender/blenlib/intern/uvproject.c')
-rw-r--r--source/blender/blenlib/intern/uvproject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c
index 0eb5504016e..8cfa083554b 100644
--- a/source/blender/blenlib/intern/uvproject.c
+++ b/source/blender/blenlib/intern/uvproject.c
@@ -39,9 +39,6 @@ typedef struct UvCameraInfo {
short do_persp, do_pano, do_rotmat;
} UvCameraInfo;
-/* ugly */
-extern float camera_get_angle(struct Camera *cam);
-
void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
{
float pv4[4];
@@ -138,7 +135,7 @@ UvCameraInfo *project_camera_info(Object *ob, float (*rotmat)[4], float winx, fl
uci.do_pano = (camera->flag & CAM_PANORAMA);
uci.do_persp = (camera->type==CAM_PERSP);
- uci.camangle= camera_get_angle(camera)/2.0f;
+ uci.camangle= lens_to_angle(camera->lens) / 2.0f;
uci.camsize= uci.do_persp ? uci.camsize= tanf(uci.camangle) : camera->ortho_scale;
if (invert_m4_m4(uci.caminv, ob->obmat)) {