~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/editors/uvedit/uvedit_intern.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: uvedit_intern.h 27639 2010-03-21 01:14:04Z gsrb3d $
3
 
 *
 
1
/*
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
26
24
 * ***** END GPL LICENSE BLOCK *****
27
25
 */
28
26
 
29
 
#ifndef ED_UVEDIT_INTERN_H
30
 
#define ED_UVEDIT_INTERN_H
31
 
 
32
 
struct SpaceImage;
33
 
struct EditFace;
 
27
/** \file blender/editors/uvedit/uvedit_intern.h
 
28
 *  \ingroup eduv
 
29
 */
 
30
 
 
31
 
 
32
#ifndef __UVEDIT_INTERN_H__
 
33
#define __UVEDIT_INTERN_H__
 
34
 
 
35
struct MTexPoly;
 
36
struct Image;
34
37
struct MTFace;
 
38
struct Object;
35
39
struct Scene;
36
 
struct Image;
37
 
struct Object;
 
40
struct SpaceImage;
 
41
struct UvElementMap;
38
42
struct wmOperatorType;
39
 
 
40
 
#define UV_SELECT_ALL       1
41
 
#define UV_SELECT_PINNED    2
 
43
struct BMEditMesh;
 
44
struct BMFace;
 
45
struct BMLoop;
 
46
struct BMEdge;
 
47
struct BMVert;
42
48
 
43
49
/* id can be from 0 to 3 */
44
50
#define TF_PIN_MASK(id) (TF_PIN1 << id)
45
51
#define TF_SEL_MASK(id) (TF_SEL1 << id)
46
52
 
47
53
/* visibility and selection */
48
 
int uvedit_face_visible_nolocal(struct Scene *scene, struct EditFace *efa);
49
 
int uvedit_face_visible(struct Scene *scene, struct Image *ima, struct EditFace *efa, struct MTFace *tf);
50
 
 
51
 
int uvedit_face_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
52
 
void uvedit_face_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
53
 
void uvedit_face_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf);
54
 
 
55
 
int uvedit_edge_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
56
 
void uvedit_edge_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
57
 
void uvedit_edge_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
58
 
 
59
 
int uvedit_uv_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
60
 
void uvedit_uv_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
61
 
void uvedit_uv_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i);
 
54
int uvedit_face_visible_nolocal(struct Scene *scene, struct BMFace *efa);
62
55
 
63
56
/* geometric utilities */
 
57
 
64
58
void uv_center(float uv[][2], float cent[2], int quad);
65
59
float uv_area(float uv[][2], int quad);
66
60
void uv_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy);
67
61
 
 
62
float poly_uv_area(float uv[][2], int len);
 
63
void poly_copy_aspect(float uv_orig[][2], float uv[][2], float aspx, float aspy, int len);
 
64
void poly_uv_center(struct BMEditMesh *em, struct BMFace *f, float cent[2]);
 
65
 
 
66
/* find nearest */
 
67
 
 
68
typedef struct NearestHit {
 
69
        struct BMFace *efa;
 
70
        struct MTexPoly *tf;
 
71
        struct BMLoop *l, *nextl;
 
72
        struct MLoopUV *luv, *nextluv;
 
73
        int lindex; //index of loop within face
 
74
        int vert1, vert2; //index in mesh of edge vertices
 
75
} NearestHit;
 
76
 
 
77
void uv_find_nearest_vert(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, float co[2], float penalty[2], struct NearestHit *hit);
 
78
void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, float co[2], struct NearestHit *hit);
 
79
 
 
80
/* utility tool functions */
 
81
 
 
82
struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
 
83
void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit);
 
84
 
 
85
/* smart stitch */
 
86
 
 
87
/* object that stores display data for previewing before accepting stitching */
 
88
typedef struct StitchPreviewer {
 
89
        /* here we'll store the preview triangle indices of the mesh */
 
90
        float *preview_polys;
 
91
        /* uvs per polygon. */
 
92
        unsigned int *uvs_per_polygon;
 
93
        /*number of preview polygons */
 
94
        unsigned int num_polys;
 
95
        /* preview data. These will be either the previewed vertices or edges depending on stitch mode settings */
 
96
        float *preview_stitchable;
 
97
        float *preview_unstitchable;
 
98
        /* here we'll store the number of elements to be drawn */
 
99
        unsigned int num_stitchable;
 
100
        unsigned int num_unstitchable;
 
101
        unsigned int preview_uvs;
 
102
        /* ...and here we'll store the triangles*/
 
103
        float *static_tris;
 
104
        unsigned int num_static_tris;
 
105
} StitchPreviewer;
 
106
 
 
107
StitchPreviewer *uv_get_stitch_previewer(void);
 
108
 
68
109
/* operators */
 
110
 
69
111
void UV_OT_average_islands_scale(struct wmOperatorType *ot);
70
112
void UV_OT_cube_project(struct wmOperatorType *ot);
71
113
void UV_OT_cylinder_project(struct wmOperatorType *ot);
75
117
void UV_OT_reset(struct wmOperatorType *ot);
76
118
void UV_OT_sphere_project(struct wmOperatorType *ot);
77
119
void UV_OT_unwrap(struct wmOperatorType *ot);
 
120
void UV_OT_stitch(struct wmOperatorType *ot);
78
121
 
79
 
#endif /* ED_UVEDIT_INTERN_H */
 
122
#endif /* __UVEDIT_INTERN_H__ */
80
123