2
* ***** BEGIN GPL/BL DUAL 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. 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
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.
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.
21
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
22
* All rights reserved.
24
* The Original Code is: all of this file.
26
* Contributor(s): none yet.
28
* ***** END GPL/BL DUAL LICENSE BLOCK *****
31
#ifndef BOP_MATERIAL_H
32
#define BOP_MATERIAL_H
37
#define N_FACE_VERTEX 4
43
char* m_faceVertexMaterial;
45
int m_faceVertexWidth;
47
int m_originalFaceVertices[N_FACE_VERTEX];
51
BOP_Material(int faceWidth, int faceVertexWidth);
52
BOP_Material(const BOP_Material& other);
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; };
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;
69
int getOriginalFaceVertex(int i) const {
70
if (0<=i&&i<N_FACE_VERTEX) return m_originalFaceVertices[i];
73
char* getOriginalFaceVertexMaterial(int originalFaceVertex);
74
void setIsQuad(bool quad) {m_isQuad = quad;};
75
bool isQuad() const {return m_isQuad;};
77
friend ostream &operator<<(ostream &stream, BOP_Material *m);