~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to intern/boolop/intern/BOP_Material.h

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
3
 
 *
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. The Blender
8
 
 * Foundation also sells licenses for use in proprietary software under
9
 
 * the Blender License.  See http://www.blender.org/BL/ for information
10
 
 * about this.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program; if not, write to the Free Software Foundation,
19
 
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
 
 *
21
 
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
22
 
 * All rights reserved.
23
 
 *
24
 
 * The Original Code is: all of this file.
25
 
 *
26
 
 * Contributor(s): none yet.
27
 
 *
28
 
 * ***** END GPL/BL DUAL LICENSE BLOCK *****
29
 
 */
30
 
 
31
 
#ifndef BOP_MATERIAL_H
32
 
#define BOP_MATERIAL_H
33
 
 
34
 
#include <iostream>
35
 
using namespace std;
36
 
 
37
 
#define N_FACE_VERTEX 4
38
 
 
39
 
class BOP_Material 
40
 
{
41
 
private:
42
 
        char* m_faceMaterial;
43
 
        char* m_faceVertexMaterial;
44
 
        int   m_faceWidth;
45
 
        int   m_faceVertexWidth;
46
 
        int   m_originalFace;
47
 
        int   m_originalFaceVertices[N_FACE_VERTEX];
48
 
        bool  m_isQuad;
49
 
 
50
 
public:
51
 
        BOP_Material(int faceWidth, int faceVertexWidth);
52
 
        BOP_Material(const BOP_Material& other);
53
 
        ~BOP_Material();
54
 
        void setFaceMaterial(char* faceMaterial);
55
 
        void setFaceVertexMaterial(char* faceVertexMaterial);
56
 
        void setFaceVertexMaterial(char* faceVertexMaterial, int i);
57
 
        void duplicate(const BOP_Material& other);
58
 
        BOP_Material& operator = (const BOP_Material& other);
59
 
        char* getFaceMaterial() const;
60
 
        char* getFaceVertexMaterial(int i) const;
61
 
        int getFaceWidth() const { return m_faceWidth; };
62
 
        int getFaceVertexWidth() const { return m_faceVertexWidth; };
63
 
 
64
 
        void setOriginalFace(int originalFace) {m_originalFace = originalFace;};
65
 
        int getOriginalFace() const {return m_originalFace;};
66
 
        void setOriginalFaceVertex(int originalFaceVertex, int i) {
67
 
                if (0<=i&&i<N_FACE_VERTEX) m_originalFaceVertices[i] = originalFaceVertex;
68
 
        };
69
 
        int getOriginalFaceVertex(int i) const {
70
 
                if (0<=i&&i<N_FACE_VERTEX) return m_originalFaceVertices[i];
71
 
                else return -1;
72
 
        };
73
 
        char* getOriginalFaceVertexMaterial(int originalFaceVertex);
74
 
        void setIsQuad(bool quad) {m_isQuad = quad;};
75
 
        bool isQuad() const {return m_isQuad;};
76
 
 
77
 
        friend ostream &operator<<(ostream &stream, BOP_Material *m);
78
 
};
79
 
 
80
 
#endif