~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/BKE_subsurf.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
 
/* $Id: BKE_subsurf.h 29164 2010-06-02 18:04:31Z blendix $ 
2
 
 *
 
1
/*
3
2
 * ***** BEGIN GPL LICENSE BLOCK *****
4
3
 *
5
4
 * This program is free software; you can redistribute it and/or
25
24
 *
26
25
 * ***** END GPL LICENSE BLOCK *****
27
26
 */
28
 
#ifndef BKE_SUBSURF_H
29
 
#define BKE_SUBSURF_H
30
 
 
 
27
#ifndef __BKE_SUBSURF_H__
 
28
#define __BKE_SUBSURF_H__
 
29
 
 
30
/** \file BKE_subsurf.h
 
31
 *  \ingroup bke
 
32
 */
 
33
 
 
34
/* struct DerivedMesh is used directly */
 
35
#include "BKE_DerivedMesh.h"
 
36
 
 
37
struct DMFlagMat;
31
38
struct DMGridAdjacency;
32
39
struct DMGridData;
33
40
struct DerivedMesh;
34
 
struct EditMesh;
35
 
struct IndexNode;
36
 
struct ListBase;
 
41
struct MeshElemMap;
37
42
struct Mesh;
 
43
struct MPoly;
38
44
struct MultiresSubsurf;
39
45
struct Object;
40
46
struct PBVH;
41
47
struct SubsurfModifierData;
42
 
struct _CCGEdge;
43
 
struct _CCGFace;
44
 
struct _CCGSubsurf;
45
 
struct _CCGVert;
 
48
struct CCGEdge;
 
49
struct CCGFace;
 
50
struct CCGSubsurf;
 
51
struct CCGVert;
 
52
struct EdgeHash;
 
53
struct PBVH;
 
54
struct DMGridData;
 
55
struct DMGridAdjacency;
46
56
 
47
57
/**************************** External *****************************/
48
58
 
50
60
                                                struct DerivedMesh *dm,
51
61
                                                struct SubsurfModifierData *smd,
52
62
                                                int useRenderParams, float (*vertCos)[3],
53
 
                                                int isFinalCalc, int editMode);
 
63
                                                int isFinalCalc, int forEditMode, int inEditMode);
54
64
 
55
65
void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
56
66
 
 
67
/* get gridsize from 'level', level must be greater than zero */
 
68
int ccg_gridsize(int level);
 
69
 
 
70
/* x/y grid coordinates at 'low_level' can be multiplied by the result
 
71
 * of this function to convert to grid coordinates at 'high_level' */
 
72
int ccg_factor(int low_level, int high_level);
 
73
 
 
74
void subsurf_copy_grid_hidden(struct DerivedMesh *dm,
 
75
                                                          const struct MPoly *mpoly,
 
76
                                                          struct MVert *mvert,
 
77
                                                          const struct MDisps *mdisps);
 
78
 
 
79
typedef enum MultiresModifiedFlags {
 
80
        /* indicates the grids have been sculpted on, so MDisps
 
81
         * have to be updated */
 
82
        MULTIRES_COORDS_MODIFIED = 1,
 
83
        /* indicates elements have been hidden or unhidden */
 
84
        MULTIRES_HIDDEN_MODIFIED = 2
 
85
} MultiresModifiedFlags;
 
86
 
57
87
/**************************** Internal *****************************/
58
88
 
59
89
typedef struct CCGDerivedMesh {
60
90
        DerivedMesh dm;
61
91
 
62
 
        struct _CCGSubSurf *ss;
 
92
        struct CCGSubSurf *ss;
63
93
        int freeSS;
64
94
        int drawInteriorEdges, useSubsurfUv;
65
95
 
66
 
        struct {int startVert; struct _CCGVert *vert;} *vertMap;
67
 
        struct {int startVert; int startEdge; struct _CCGEdge *edge;} *edgeMap;
 
96
        struct {int startVert; struct CCGVert *vert;} *vertMap;
 
97
        struct {int startVert; int startEdge; struct CCGEdge *edge;} *edgeMap;
68
98
        struct {int startVert; int startEdge;
69
 
                        int startFace; struct _CCGFace *face;} *faceMap;
 
99
                        int startFace; struct CCGFace *face;} *faceMap;
70
100
 
71
101
        short *edgeFlags;
72
 
        char *faceFlags;
 
102
        struct DMFlagMat *faceFlags;
 
103
 
 
104
        int *reverseFaceMap;
73
105
 
74
106
        struct PBVH *pbvh;
75
 
        int pbvh_draw;
76
 
        struct ListBase *fmap;
77
 
        struct IndexNode *fmap_mem;
 
107
 
 
108
        struct MeshElemMap *pmap;
 
109
        int *pmap_mem;
78
110
 
79
111
        struct DMGridData **gridData;
80
112
        struct DMGridAdjacency *gridAdjacency;
81
113
        int *gridOffset;
82
 
        struct _CCGFace **gridFaces;
 
114
        struct CCGFace **gridFaces;
 
115
        struct DMFlagMat *gridFlagMats;
 
116
        unsigned int **gridHidden;
83
117
 
84
118
        struct {
85
119
                struct MultiresModifierData *mmd;
89
123
                float (*orco)[3];
90
124
 
91
125
                struct Object *ob;
92
 
                int modified;
93
 
 
94
 
                void (*update)(DerivedMesh*);
 
126
                MultiresModifiedFlags modified_flags;
95
127
        } multires;
 
128
 
 
129
        struct EdgeHash *ehash;
96
130
} CCGDerivedMesh;
97
131
 
98
132
#endif