Blender  V2.59
BLI_uvproject.h
Go to the documentation of this file.
00001 /*
00002  * $Id: BLI_uvproject.h 34966 2011-02-18 13:58:08Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * ***** END GPL LICENSE BLOCK *****
00021  */
00022 #ifndef BKE_UVPROJECT_H
00023 #define BKE_UVPROJECT_H
00024 
00029 struct UvCameraInfo;
00030 struct Object;
00031 
00032 /* create uv info from the camera, needs to be freed */
00033 struct UvCameraInfo *project_camera_info(struct Object *ob, float rotmat[4][4], float winx, float winy);
00034 
00035 /* apply uv from uvinfo (camera) */
00036 void project_from_camera(float target[2], float source[3], struct UvCameraInfo *uci);
00037 
00038 /* apply uv from perspective matrix */
00039 void project_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy);
00040 
00041 /* apply ortho uv's */
00042 void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4]);
00043 
00044 /* so we can adjust scale with keeping the struct private */
00045 void project_camera_info_scale(struct UvCameraInfo *uci, float scale_x, float scale_y);
00046 
00047 #endif