1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
//-*-C++-*-
/*
**************************************************************************
description
--------------------
copyright : (C) 2001 by Luis Carvalho
email : [email protected]
**************************************************************************
**************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
**************************************************************************/
#ifndef PMFINISH_H
#define PMFINISH_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "pmtexturebase.h"
#include "pmcolor.h"
/**
* Class for povray finishs
*/
class PMFinish : public PMTextureBase
{
typedef PMTextureBase Base;
public:
/**
* Creates an PMFinish
*/
PMFinish( PMPart* part );
/**
* Copy constructor
*/
PMFinish( const PMFinish& f );
/**
* Deletes the object
*/
virtual ~PMFinish( );
/** */
virtual PMObject* copy( ) const { return new PMFinish( *this ); }
/** */
virtual TQString description( ) const;
/** */
virtual PMMetaObject* tqmetaObject( ) const;
/** */
virtual void cleanUp( ) const;
/** */
virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMFinishEdit
*/
virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const;
/** */
virtual TQString pixmap( ) const { return TQString( "pmfinish" ); }
/** */
virtual void restoreMemento( PMMemento* s );
PMColor ambientColor( ) const { return m_ambientColor; }
double phong( ) const { return m_phong; }
double phongSize( ) const { return m_phongSize; }
double diffuse( ) const { return m_diffuse; }
double brilliance( ) const { return m_brilliance; }
double crand( ) const { return m_crand; }
bool conserveEnergy( ) const { return m_conserveEnergy; }
double specular( ) const { return m_specular; }
double roughness( ) const { return m_roughness; }
double metallic( ) const { return m_metallic; }
bool irid( ) const { return m_irid; }
double iridAmount( ) const { return m_iridAmount; }
double iridThickness( ) const { return m_iridThickness; }
double iridTurbulence( ) const { return m_iridTurbulence; }
PMColor reflectionColor( ) const { return m_reflectionColor; }
PMColor reflectionMinColor( ) const { return m_reflectionMinColor;}
bool reflectionFresnel( ) const { return m_reflectionFresnel; }
double reflectionFalloff( ) const { return m_reflectionFalloff; }
double reflectionExponent( ) const { return m_reflectionExponent; }
double reflectionMetallic( ) const { return m_reflectionMetallic; }
bool isAmbientEnabled( ) const { return m_enableAmbient; }
bool isPhongEnabled( ) const { return m_enablePhong; }
bool isPhongSizeEnabled( ) const { return m_enablePhongSize; }
bool isDiffuseEnabled( ) const { return m_enableDiffuse; }
bool isBrillianceEnabled( ) const { return m_enableBrilliance; }
bool isCrandEnabled( ) const { return m_enableCrand; }
bool isSpecularEnabled( ) const { return m_enableSpecular; }
bool isRoughnessEnabled( ) const { return m_enableRoughness; }
bool isMetallicEnabled( ) const { return m_enableMetallic; }
bool isReflectionEnabled( ) const { return m_enableReflection; }
bool isReflectionMinEnabled( ) const { return m_enableReflectionMin; }
bool isRefFalloffEnabled( ) const { return m_enableRefFalloff; }
bool isRefExponentEnabled( ) const { return m_enableRefExponent; }
bool isRefMetallicEnabled( ) const { return m_enableRefMetallic; }
//This is here for povrat31serialization (It won't compile otherwise)
bool isExponentEnabled( ) const { return m_enableRefExponent; }
void setAmbientColor( const PMColor& c );
void setPhong( double c );
void setPhongSize( double c );
void setDiffuse( double c );
void setBrilliance( double c );
void setCrand( double c );
void setConserveEnergy( bool c );
void setSpecular( double c );
void setRoughness( double c );
void setMetallic( double c );
void setIrid( bool c );
void setIridAmount( double c );
void setIridThickness( double c );
void setIridTurbulence( double c );
void setReflectionColor( const PMColor& c );
void setReflectionMinColor( const PMColor& c );
void setReflectionFresnel( bool c );
void setReflectionFalloff( double c );
void setReflectionExponent( double c );
void setReflectionMetallic( double c );
void enableAmbient( bool c );
void enablePhong( bool c );
void enablePhongSize( bool c );
void enableDiffuse( bool c );
void enableBrilliance( bool c );
void enableCrand( bool c );
void enableSpecular( bool c );
void enableRoughness( bool c );
void enableMetallic( bool c );
void enableReflection( bool c );
void enableReflectionMin( bool c );
void enableRefFalloff( bool c );
void enableRefExponent( bool c );
void enableRefMetallic( bool c );
private:
/**
* IDs for @ref PMMementoData
*/
enum PMFinishMementoID { PMAmbientColorID, PMPhongID, PMPhongSizeID,
PMMetallicID, PMDiffuseID, PMBrillianceID,
PMCrandID, PMConserveEnergyID, PMSpecularID,
PMRoughnessID,
PMIridID, PMIridAmountID, PMIridThicknessID,
PMReflectionColorID, PMReflectionMinColorID,
PMReflectionFresnelID, PMReflectionFalloffID,
PMReflectionExponentID, PMReflectionMetallicID,
PMIridTurbulenceID, PMEnableAmbientID,
PMEnablePhongID, PMEnablePhongSizeID,
PMEnableMetallicID,
PMEnableDiffuseID, PMEnableBrillianceID,
PMEnableCrandID, PMEnableSpecularID,
PMEnableRoughnessID, PMEnableReflectionID,
PMEnableReflectionMinID, PMEnableRefFalloffID,
PMEnableRefExponentID, PMEnableRefMetallicID };
PMColor m_ambientColor;
double m_phong;
double m_phongSize;
double m_diffuse;
double m_brilliance;
double m_crand;
bool m_conserveEnergy;
double m_specular;
double m_roughness;
double m_metallic;
bool m_irid;
double m_iridAmount;
double m_iridThickness;
double m_iridTurbulence;
PMColor m_reflectionColor;
PMColor m_reflectionMinColor;
bool m_reflectionFresnel;
double m_reflectionFalloff;
double m_reflectionExponent;
double m_reflectionMetallic;
bool m_enableAmbient;
bool m_enableDiffuse;
bool m_enableBrilliance;
bool m_enableCrand;
bool m_enablePhong;
bool m_enablePhongSize;
bool m_enableMetallic;
bool m_enableSpecular;
bool m_enableRoughness;
bool m_enableReflection;
bool m_enableReflectionMin;
bool m_enableRefFalloff;
bool m_enableRefExponent;
bool m_enableRefMetallic;
static PMMetaObject* s_pMetaObject;
};
#endif
|