2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * ***** END GPL LICENSE BLOCK *****
21 #ifndef __FREESTYLE_NATURE_H__
22 #define __FREESTYLE_NATURE_H__
24 /** \file blender/freestyle/intern/winged_edge/Nature.h
26 * \brief Different natures for both vertices and edges
27 * \author Emmanuel Turquin
33 /*! Namespace gathering the different possible natures of 0D and 1D elements of the ViewMap */
36 /* XXX Why not using enums??? */
37 /* In order to optimize for space (enum is int) - T.K. */
39 typedef unsigned short VertexNature;
40 /*! true for any 0D element */
41 static const VertexNature POINT = 0; // 0
42 /*! true for SVertex */
43 static const VertexNature S_VERTEX = (1 << 0); // 1
44 /*! true for ViewVertex */
45 static const VertexNature VIEW_VERTEX = (1 << 1); // 2
46 /*! true for NonTVertex */
47 static const VertexNature NON_T_VERTEX = (1 << 2); // 4
48 /*! true for TVertex */
49 static const VertexNature T_VERTEX = (1 << 3); // 8
51 static const VertexNature CUSP = (1 << 4); // 16
53 typedef unsigned short EdgeNature;
54 /*! true for non feature edges (always false for 1D elements of the ViewMap) */
55 static const EdgeNature NO_FEATURE = 0; // 0
56 /*! true for silhouettes */
57 static const EdgeNature SILHOUETTE = (1 << 0); // 1
58 /*! true for borders */
59 static const EdgeNature BORDER = (1 << 1); // 2
60 /*! true for creases */
61 static const EdgeNature CREASE = (1 << 2); // 4
62 /*! true for ridges */
63 static const EdgeNature RIDGE = (1 << 3); // 8
64 /*! true for valleys */
65 static const EdgeNature VALLEY = (1 << 4); // 16
66 /*! true for suggestive contours */
67 static const EdgeNature SUGGESTIVE_CONTOUR = (1 << 5); // 32
68 /*! true for material boundaries */
69 static const EdgeNature MATERIAL_BOUNDARY = (1 << 6); // 64
70 /*! true for user-defined edge marks */
71 static const EdgeNature EDGE_MARK = (1 << 7); // 128
73 } // end of namespace Nature
75 } /* namespace Freestyle */
77 #endif // __FREESTYLE_NATURE_H__