Blender V2.61 - r43446

BLI_uvproject.h

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