#include <MaterialParam.h>
Public Member Functions | |
MaterialParam (void) | |
virtual | ~MaterialParam (void) |
void | init (void) |
void | free (void) |
void | clear (void) |
void | dup (MaterialParam m) |
bool | isSetTexture (void) |
bool | isSetBumpMap (void) |
bool | isSetSpecMap (void) |
bool | isSetTextureParams (void) |
bool | isSetParams (void) |
bool | isSetGlow (void) |
bool | isSetBright (void) |
bool | isSetShininess (void) |
bool | isSetTransparent (void) |
bool | isTransparency (void) |
void | setTextureName (const char *name) |
void | setBumpMapName (const char *name) |
void | setSpecMapName (const char *name) |
char * | getTextureName (void) |
char * | getBumpMapName (void) |
char * | getSpecMapName (void) |
void | setAdditionalName (const char *name) |
void | addAdditionalName (const char *name) |
char * | getAdditionalName (void) |
void | setupFullName (const char *extname) |
void | setTransparent (double a) |
void | setShininess (double s) |
void | setGlow (double g) |
void | setBright (double b) |
void | setGlossiness (double g) |
void | setEnvironment (double e) |
void | setLight (double l) |
double | getTransparent (void) |
double | getShininess (void) |
double | getGlow (void) |
double | getBright (void) |
double | getGlossiness (void) |
double | getEnvironment (void) |
double | getLight (void) |
void | printParam (FILE *fp) |
bool | isSetColor (void) |
bool | isSetAlpha (void) |
void | setColor (double r, double g, double b, double a=1.0) |
void | setColor (double v, int c) |
void | setShiftU (double u) |
void | setShiftV (double v) |
void | setScaleU (double u) |
void | setScaleV (double v) |
void | setRotate (double r) |
void | setFlipU (bool h) |
void | setFlipV (bool h) |
void | setShift (double u, double v) |
void | setScale (double u, double v) |
void | setAlphaChannel (bool h) |
void | setAlphaMode (int m) |
void | setAlphaCutoff (double m) |
double | getColor (int c) |
double | getShiftU (void) |
double | getShiftV (void) |
double | getScaleU (void) |
double | getScaleV (void) |
double | getRotate (void) |
bool | getAlphaChannel (void) |
int | getAlphaMode (void) |
double | getAlphaCutoff (void) |
void | execTrans (UVMap< double > *uv, int n) |
Rotate -> Scale -> Shift. | |
void | execShift (UVMap< double > *uv, int n) |
void | execScale (UVMap< double > *uv, int n) |
void | execRotate (UVMap< double > *uv, int n) |
void | execInvTrans (UVMap< double > *uv, int n) |
Shift -> Scale -> Rotate. | |
void | execInvShift (UVMap< double > *uv, int n) |
void | execInvScale (UVMap< double > *uv, int n) |
void | execInvRotate (UVMap< double > *uv, int n) |
void | execFlipU (UVMap< double > *uv, int n) |
void | execFlipV (UVMap< double > *uv, int n) |
char * | getBase64Params (char obj='\0') |
Public Attributes | |
bool | enable |
int | mapping |
マッピング方法 | |
int | mflags |
メディアフラグ | |
int | others |
その他のフラグ | |
TextureParam | texture |
テクスチャ | |
TextureParam | bumpmap |
Bumpmap テクスチャ. | |
TextureParam | specmap |
Specular マップ テクスチャ. | |
Private Attributes | |
Buffer | addname |
テクスチャ追加名. | |
double | transparent |
テクスチャのアルファチャンネルの係数. | |
double | shininess |
輝き | |
double | glow |
発光: | |
double | bright |
明るさ | |
double | glossiness |
光沢 | |
double | environment |
環境光 | |
double | light |
周りを照らすライト |
Definition at line 153 of file MaterialParam.h.
MaterialParam | ( | void | ) | [inline] |
Definition at line 178 of file MaterialParam.h.
References MaterialParam::init().
00178 { init();}
virtual ~MaterialParam | ( | void | ) | [inline, virtual] |
Definition at line 179 of file MaterialParam.h.
void addAdditionalName | ( | const char * | name | ) | [inline] |
Definition at line 211 of file MaterialParam.h.
References MaterialParam::addname, and cat_s2Buffer.
00211 { if(name!=NULL) cat_s2Buffer (name, &addname);}
void clear | ( | void | ) | [inline] |
Definition at line 184 of file MaterialParam.h.
References MaterialParam::free(), and MaterialParam::init().
Referenced by MeshObjectNode::delMaterialParam().
void dup | ( | MaterialParam | m | ) |
Definition at line 256 of file MaterialParam.cpp.
References MaterialParam::addname, MaterialParam::bumpmap, TextureParam::dup(), dup_Buffer(), MaterialParam::specmap, and MaterialParam::texture.
Referenced by jbxl::newMaterialParam(), and MeshObjectNode::setMaterialParam().
00257 { 00258 *this = m; 00259 00260 texture.dup(m.texture); 00261 bumpmap.dup(m.bumpmap); 00262 specmap.dup(m.specmap); 00263 00264 addname = dup_Buffer(m.addname); 00265 }
void execFlipU | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 275 of file MaterialParam.h.
References TextureParam::execFlipU(), and MaterialParam::texture.
00275 { texture.execFlipU(uv, n);}
void execFlipV | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 276 of file MaterialParam.h.
References TextureParam::execFlipV(), and MaterialParam::texture.
00276 { texture.execFlipV(uv, n);}
void execInvRotate | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 273 of file MaterialParam.h.
References TextureParam::execInvRotate(), and MaterialParam::texture.
00273 { texture.execInvRotate(uv, n);}
void execInvScale | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 272 of file MaterialParam.h.
References TextureParam::execInvScale(), and MaterialParam::texture.
00272 { texture.execInvScale (uv, n);}
void execInvShift | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 271 of file MaterialParam.h.
References TextureParam::execInvShift(), and MaterialParam::texture.
00271 { texture.execInvShift (uv, n);}
void execInvTrans | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 270 of file MaterialParam.h.
References TextureParam::execInvTrans(), and MaterialParam::texture.
void execRotate | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 268 of file MaterialParam.h.
References TextureParam::execRotate(), and MaterialParam::texture.
00268 { texture.execRotate(uv, n);}
void execScale | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 267 of file MaterialParam.h.
References TextureParam::execScale(), and MaterialParam::texture.
00267 { texture.execScale (uv, n);}
void execShift | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 266 of file MaterialParam.h.
References TextureParam::execShift(), and MaterialParam::texture.
00266 { texture.execShift (uv, n);}
void execTrans | ( | UVMap< double > * | uv, | |
int | n | |||
) | [inline] |
Definition at line 265 of file MaterialParam.h.
References TextureParam::execTrans(), and MaterialParam::texture.
Referenced by MeshObjectNode::execAffineTrans().
void free | ( | void | ) |
Definition at line 243 of file MaterialParam.cpp.
References MaterialParam::addname, MaterialParam::bumpmap, TextureParam::free(), free_Buffer(), MaterialParam::specmap, and MaterialParam::texture.
Referenced by MaterialParam::clear(), and MeshObjectNode::setMaterialParam().
00244 { 00245 texture.free(); 00246 bumpmap.free(); 00247 specmap.free(); 00248 00249 free_Buffer(&addname); 00250 00251 return; 00252 }
char* getAdditionalName | ( | void | ) | [inline] |
Definition at line 212 of file MaterialParam.h.
References MaterialParam::addname, and Buffer::buf.
Referenced by MeshObjectData::addData().
bool getAlphaChannel | ( | void | ) | [inline] |
Definition at line 261 of file MaterialParam.h.
References TextureParam::getAlphaChannel(), and MaterialParam::texture.
00261 { return texture.getAlphaChannel();}
double getAlphaCutoff | ( | void | ) | [inline] |
Definition at line 263 of file MaterialParam.h.
References TextureParam::getAlphaCutoff(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00263 { return texture.getAlphaCutoff();}
int getAlphaMode | ( | void | ) | [inline] |
Definition at line 262 of file MaterialParam.h.
References TextureParam::getAlphaMode(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00262 { return texture.getAlphaMode();}
char * getBase64Params | ( | char | obj = '\0' |
) |
マテリアルの各パラメータを Base64で文字列化する.ただし '/' はファイル名として使用できないので,'$' に変換される.
戻りポインタは free する必要がある.
obj | オブジェクトの種類を示す任意の一文字 |
Definition at line 344 of file MaterialParam.cpp.
References MaterialParam::bright, encode_base64_filename(), MaterialParam::getAlphaCutoff(), MaterialParam::getAlphaMode(), MaterialParam::getColor(), MaterialParam::getRotate(), MaterialParam::getScaleU(), MaterialParam::getScaleV(), MaterialParam::getShiftU(), MaterialParam::getShiftV(), MaterialParam::glow, MaterialParam::light, MATERIAL_ALPHA_BLENDING, MATERIAL_ALPHA_MASKING, MATERIAL_ATTR_ALPHACUTOFF, MATERIAL_ATTR_BRIGHT, MATERIAL_ATTR_COLOR_BLUE, MATERIAL_ATTR_COLOR_GREEN, MATERIAL_ATTR_COLOR_RED, MATERIAL_ATTR_GLOW, MATERIAL_ATTR_LEN, MATERIAL_ATTR_LIGHT, MATERIAL_ATTR_OBJECT, MATERIAL_ATTR_ROTATE, MATERIAL_ATTR_SCALE_U, MATERIAL_ATTR_SCALE_V, MATERIAL_ATTR_SHIFT_U, MATERIAL_ATTR_SHIFT_V, MATERIAL_ATTR_SHININESS, MATERIAL_ATTR_TRANSPARENT, MaterialParam::shininess, and MaterialParam::transparent.
Referenced by jbxl::isSameMaterial().
00345 { 00346 uByte attr[MATERIAL_ATTR_LEN]; 00347 00348 double red = getColor(0); 00349 double green = getColor(1); 00350 double blue = getColor(2); 00351 double alpha = getColor(3); 00352 double cutoff = getAlphaCutoff(); 00353 int almode = getAlphaMode(); 00354 // 00355 double transp = transparent; 00356 00357 short int rotate = (short int)((int)(getRotate()*2000.)%32768); // 2Byte化 00358 short int shiftu = (short int)((int)(getShiftU()*2000.)%32768); 00359 short int shiftv = (short int)((int)(getShiftV()*2000.)%32768); 00360 short int scaleu = (short int)((int)(getScaleU()*100. )%32768); 00361 short int scalev = (short int)((int)(getScaleV()*100. )%32768); 00362 00363 if (alpha<0.99) { 00364 almode = MATERIAL_ALPHA_BLENDING; // Blending Mode 00365 cutoff = 0.0; 00366 transp = alpha; 00367 } 00368 // 00369 if (cutoff==0.0 && almode==MATERIAL_ALPHA_MASKING) transp = 1.0; // cutoff==0.0 のときは Blending Modeとするため 00370 if (cutoff>0.9) cutoff = 0.9; // for Unity3D 00371 00372 memset(attr, 0, MATERIAL_ATTR_LEN); 00373 attr[MATERIAL_ATTR_COLOR_RED] = (uByte)((1.0-red)*255); 00374 attr[MATERIAL_ATTR_COLOR_GREEN] = (uByte)((1.0-green)*255); 00375 attr[MATERIAL_ATTR_COLOR_BLUE] = (uByte)((1.0-blue)*255); 00376 attr[MATERIAL_ATTR_TRANSPARENT] = (uByte)((1.0-transp)*255); 00377 attr[MATERIAL_ATTR_ALPHACUTOFF] = (uByte)(cutoff*255); 00378 attr[MATERIAL_ATTR_SHININESS] = (uByte)(shininess*255); 00379 attr[MATERIAL_ATTR_GLOW] = (uByte)(glow*255); 00380 attr[MATERIAL_ATTR_BRIGHT] = (uByte)(bright*255); 00381 attr[MATERIAL_ATTR_LIGHT] = (uByte)(light*255); 00382 attr[MATERIAL_ATTR_OBJECT] = (uByte)obj; 00383 // 00384 memcpy(attr+MATERIAL_ATTR_SHIFT_U, &shiftu, 2); 00385 memcpy(attr+MATERIAL_ATTR_SHIFT_V, &shiftv, 2); 00386 memcpy(attr+MATERIAL_ATTR_SCALE_U, &scaleu, 2); 00387 memcpy(attr+MATERIAL_ATTR_SCALE_V, &scalev, 2); 00388 memcpy(attr+MATERIAL_ATTR_ROTATE, &rotate, 2); 00389 00390 char* params = (char*)encode_base64_filename(attr, MATERIAL_ATTR_LEN); // 要 free / -> $ 00391 00392 return params; 00393 }
double getBright | ( | void | ) | [inline] |
Definition at line 226 of file MaterialParam.h.
References MaterialParam::bright.
Referenced by ColladaXML::addEffect().
00226 { return bright;}
char* getBumpMapName | ( | void | ) | [inline] |
Definition at line 207 of file MaterialParam.h.
References MaterialParam::bumpmap, and TextureParam::getName().
Referenced by ColladaXML::addPolylists().
00207 { return bumpmap.getName();} // 禁 free
double getColor | ( | int | c | ) | [inline] |
Definition at line 254 of file MaterialParam.h.
References TextureParam::getColor(), and MaterialParam::texture.
Referenced by ColladaXML::addEffect(), MaterialParam::getBase64Params(), and MaterialParam::isTransparency().
00254 { return texture.getColor(c);}
double getEnvironment | ( | void | ) | [inline] |
Definition at line 228 of file MaterialParam.h.
References MaterialParam::environment.
00228 { return environment;}
double getGlossiness | ( | void | ) | [inline] |
Definition at line 227 of file MaterialParam.h.
References MaterialParam::glossiness.
00227 { return glossiness;}
double getGlow | ( | void | ) | [inline] |
Definition at line 225 of file MaterialParam.h.
References MaterialParam::glow.
Referenced by ColladaXML::addEffect().
00225 { return glow;}
double getLight | ( | void | ) | [inline] |
Definition at line 229 of file MaterialParam.h.
References MaterialParam::light.
00229 { return light;}
double getRotate | ( | void | ) | [inline] |
Definition at line 259 of file MaterialParam.h.
References TextureParam::getRotate(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00259 { return texture.getRotate();}
double getScaleU | ( | void | ) | [inline] |
Definition at line 257 of file MaterialParam.h.
References TextureParam::getScaleU(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00257 { return texture.getScaleU();}
double getScaleV | ( | void | ) | [inline] |
Definition at line 258 of file MaterialParam.h.
References TextureParam::getScaleV(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00258 { return texture.getScaleV();}
double getShiftU | ( | void | ) | [inline] |
Definition at line 255 of file MaterialParam.h.
References TextureParam::getShiftU(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00255 { return texture.getShiftU();}
double getShiftV | ( | void | ) | [inline] |
Definition at line 256 of file MaterialParam.h.
References TextureParam::getShiftV(), and MaterialParam::texture.
Referenced by MaterialParam::getBase64Params().
00256 { return texture.getShiftV();}
double getShininess | ( | void | ) | [inline] |
Definition at line 224 of file MaterialParam.h.
References MaterialParam::shininess.
Referenced by ColladaXML::addEffect().
00224 { return shininess;}
char* getSpecMapName | ( | void | ) | [inline] |
Definition at line 208 of file MaterialParam.h.
References TextureParam::getName(), and MaterialParam::specmap.
00208 { return specmap.getName();} // 禁 free
char* getTextureName | ( | void | ) | [inline] |
Definition at line 206 of file MaterialParam.h.
References TextureParam::getName(), and MaterialParam::texture.
Referenced by ColladaXML::addEffect(), and ColladaXML::addPolylists().
00206 { return texture.getName();} // 禁 free
double getTransparent | ( | void | ) | [inline] |
Definition at line 223 of file MaterialParam.h.
References MaterialParam::transparent.
Referenced by ColladaXML::addEffect().
00223 { return transparent;}
void init | ( | void | ) |
< 光沢
< 環境光
Definition at line 216 of file MaterialParam.cpp.
References MaterialParam::addname, MaterialParam::bright, MaterialParam::bumpmap, MaterialParam::enable, MaterialParam::environment, MaterialParam::glossiness, MaterialParam::glow, TextureParam::init(), init_Buffer(), MaterialParam::light, MaterialParam::mapping, MaterialParam::mflags, MaterialParam::others, MaterialParam::shininess, MaterialParam::specmap, MaterialParam::texture, and MaterialParam::transparent.
Referenced by MaterialParam::clear(), MeshObjectNode::init(), and MaterialParam::MaterialParam().
00217 { 00218 enable = false; 00219 00220 texture.init(); 00221 bumpmap.init(); 00222 specmap.init(); 00223 00224 addname = init_Buffer(); 00225 00226 transparent = 1.0; 00227 shininess = 0.0; 00228 glow = 0.0; 00229 bright = 0.0; 00230 glossiness = 0.0; 00231 environment = 0.0; 00232 light = 0.0; 00233 00234 mapping = 0; 00235 mflags = 0; 00236 others = 0; 00237 00238 return; 00239 }
bool isSetAlpha | ( | void | ) | [inline] |
Definition at line 236 of file MaterialParam.h.
References TextureParam::isSetAlpha(), and MaterialParam::texture.
Referenced by MaterialParam::isTransparency().
00236 { return texture.isSetAlpha();}
bool isSetBright | ( | void | ) | [inline] |
Definition at line 196 of file MaterialParam.h.
References MaterialParam::bright.
Referenced by ColladaXML::addEffect(), and MaterialParam::isSetParams().
00196 { return (bright!=0.0);}
bool isSetBumpMap | ( | void | ) | [inline] |
Definition at line 189 of file MaterialParam.h.
References MaterialParam::bumpmap, and TextureParam::isSetTexture().
00189 { return bumpmap.isSetTexture();}
bool isSetColor | ( | void | ) | [inline] |
Definition at line 235 of file MaterialParam.h.
References TextureParam::isSetColor(), and MaterialParam::texture.
Referenced by ColladaXML::addEffect().
00235 { return texture.isSetColor();}
bool isSetGlow | ( | void | ) | [inline] |
Definition at line 195 of file MaterialParam.h.
References MaterialParam::glow.
Referenced by ColladaXML::addEffect(), and MaterialParam::isSetParams().
00195 { return (glow!=0.0);}
bool isSetParams | ( | void | ) | [inline] |
Definition at line 193 of file MaterialParam.h.
References MaterialParam::isSetBright(), MaterialParam::isSetGlow(), MaterialParam::isSetShininess(), and MaterialParam::isSetTransparent().
00193 { return (isSetTransparent() || isSetGlow() || isSetShininess() || isSetBright());}
bool isSetShininess | ( | void | ) | [inline] |
Definition at line 197 of file MaterialParam.h.
References MaterialParam::shininess.
Referenced by ColladaXML::addEffect(), and MaterialParam::isSetParams().
00197 { return (shininess!=0.0);}
bool isSetSpecMap | ( | void | ) | [inline] |
Definition at line 190 of file MaterialParam.h.
References TextureParam::isSetTexture(), and MaterialParam::specmap.
00190 { return specmap.isSetTexture();}
bool isSetTexture | ( | void | ) | [inline] |
Definition at line 188 of file MaterialParam.h.
References TextureParam::isSetTexture(), and MaterialParam::texture.
00188 { return texture.isSetTexture();}
bool isSetTextureParams | ( | void | ) | [inline] |
Definition at line 192 of file MaterialParam.h.
References MaterialParam::bumpmap, TextureParam::isSetParams(), MaterialParam::specmap, and MaterialParam::texture.
bool isSetTransparent | ( | void | ) | [inline] |
Definition at line 198 of file MaterialParam.h.
References MaterialParam::transparent.
Referenced by MaterialParam::isSetParams(), and MaterialParam::isTransparency().
00198 { return (transparent<0.99);}
bool isTransparency | ( | void | ) | [inline] |
Definition at line 200 of file MaterialParam.h.
References MaterialParam::getColor(), MaterialParam::isSetAlpha(), and MaterialParam::isSetTransparent().
Referenced by ColladaXML::addEffect().
00200 { return (isSetAlpha() || isSetTransparent() || getColor(3)<0.99);}
void printParam | ( | FILE * | fp | ) |
Definition at line 308 of file MaterialParam.cpp.
References MaterialParam::addname, MaterialParam::bright, Buffer::buf, MaterialParam::bumpmap, MaterialParam::enable, MaterialParam::environment, MaterialParam::glossiness, MaterialParam::glow, TextureParam::isSetTexture(), MaterialParam::mapping, MaterialParam::mflags, MaterialParam::others, TextureParam::printParam(), MaterialParam::shininess, MaterialParam::specmap, MaterialParam::texture, and MaterialParam::transparent.
00309 { 00310 if (!enable) { 00311 fprintf(fp, "MaterialParam is disable\n"); 00312 return; 00313 } 00314 00315 texture.printParam(fp); 00316 if (bumpmap.isSetTexture()) bumpmap.printParam(fp); 00317 if (specmap.isSetTexture()) specmap.printParam(fp); 00318 00319 fprintf(fp, "MaterialParam.addname = %s\n", addname.buf); 00320 fprintf(fp, "MaterialParam.transparent = %f\n", transparent); 00321 fprintf(fp, "MaterialParam.shininess = %f\n", shininess); 00322 fprintf(fp, "MaterialParam.glow = %f\n", glow); 00323 fprintf(fp, "MaterialParam.bright = %f\n", bright); 00324 fprintf(fp, "MaterialParam.mapping = %d\n", mapping); 00325 fprintf(fp, "MaterialParam.mflags = %d\n", mflags); 00326 fprintf(fp, "MaterialParam.others = %d\n", others); 00327 00328 fprintf(fp, "MaterialParam.glossiness = %f\n", glossiness); 00329 fprintf(fp, "MaterialParam.environment = %f\n", environment); 00330 00331 fflush(fp); 00332 return; 00333 }
void setAdditionalName | ( | const char * | name | ) | [inline] |
Definition at line 210 of file MaterialParam.h.
References MaterialParam::addname, and copy_s2Buffer.
00210 { if(name!=NULL) copy_s2Buffer(name, &addname);}
void setAlphaChannel | ( | bool | h | ) | [inline] |
Definition at line 250 of file MaterialParam.h.
References TextureParam::setAlphaChannel(), and MaterialParam::texture.
00250 { texture.setAlphaChannel(h);}
void setAlphaCutoff | ( | double | m | ) | [inline] |
Definition at line 252 of file MaterialParam.h.
References TextureParam::setAlphaCutoff(), and MaterialParam::texture.
00252 { texture.setAlphaCutoff(m);}
void setAlphaMode | ( | int | m | ) | [inline] |
Definition at line 251 of file MaterialParam.h.
References TextureParam::setAlphaMode(), and MaterialParam::texture.
00251 { texture.setAlphaMode(m);}
void setBright | ( | double | b | ) | [inline] |
Definition at line 218 of file MaterialParam.h.
References MaterialParam::bright.
00218 { if(b>1.0) b = 1.0; else if(b<0.0) b = 0.0; bright = b;}
void setBumpMapName | ( | const char * | name | ) | [inline] |
Definition at line 203 of file MaterialParam.h.
References MaterialParam::bumpmap, and TextureParam::setName().
00203 { bumpmap.setName(name);}
void setColor | ( | double | v, | |
int | c | |||
) | [inline] |
Definition at line 239 of file MaterialParam.h.
References TextureParam::setColor(), and MaterialParam::texture.
00239 { texture.setColor(v, c);}
void setColor | ( | double | r, | |
double | g, | |||
double | b, | |||
double | a = 1.0 | |||
) | [inline] |
Definition at line 238 of file MaterialParam.h.
References TextureParam::setColor(), and MaterialParam::texture.
00238 { texture.setColor(r, g, b, a);}
void setEnvironment | ( | double | e | ) | [inline] |
Definition at line 220 of file MaterialParam.h.
References MaterialParam::environment.
00220 { if(e>1.0) e = 1.0; else if(e<0.0) e = 0.0; environment = e;}
void setFlipU | ( | bool | h | ) | [inline] |
Definition at line 245 of file MaterialParam.h.
References TextureParam::setFlipU(), and MaterialParam::texture.
00245 { texture.setFlipU(h); }
void setFlipV | ( | bool | h | ) | [inline] |
Definition at line 246 of file MaterialParam.h.
References TextureParam::setFlipV(), and MaterialParam::texture.
00246 { texture.setFlipV(h); }
void setGlossiness | ( | double | g | ) | [inline] |
Definition at line 219 of file MaterialParam.h.
References MaterialParam::glossiness.
00219 { if(g>1.0) g = 1.0; else if(g<0.0) g = 0.0; glossiness = g;}
void setGlow | ( | double | g | ) | [inline] |
Definition at line 217 of file MaterialParam.h.
References MaterialParam::glow.
00217 { if(g>1.0) g = 1.0; else if(g<0.0) g = 0.0; glow = g;}
void setLight | ( | double | l | ) | [inline] |
Definition at line 221 of file MaterialParam.h.
References MaterialParam::light.
00221 { if(l>1.0) l = 1.0; else if(l<0.0) l = 0.0; light = l;}
void setRotate | ( | double | r | ) | [inline] |
Definition at line 244 of file MaterialParam.h.
References TextureParam::setRotate(), and MaterialParam::texture.
00244 { texture.setRotate(r);}
void setScale | ( | double | u, | |
double | v | |||
) | [inline] |
Definition at line 248 of file MaterialParam.h.
References TextureParam::setScaleU(), TextureParam::setScaleV(), and MaterialParam::texture.
void setScaleU | ( | double | u | ) | [inline] |
Definition at line 242 of file MaterialParam.h.
References TextureParam::setScaleU(), and MaterialParam::texture.
00242 { texture.setScaleU(u);}
void setScaleV | ( | double | v | ) | [inline] |
Definition at line 243 of file MaterialParam.h.
References TextureParam::setScaleV(), and MaterialParam::texture.
00243 { texture.setScaleV(v);}
void setShift | ( | double | u, | |
double | v | |||
) | [inline] |
Definition at line 247 of file MaterialParam.h.
References TextureParam::setShiftU(), TextureParam::setShiftV(), and MaterialParam::texture.
void setShiftU | ( | double | u | ) | [inline] |
Definition at line 240 of file MaterialParam.h.
References TextureParam::setShiftU(), and MaterialParam::texture.
00240 { texture.setShiftU(u);}
void setShiftV | ( | double | v | ) | [inline] |
Definition at line 241 of file MaterialParam.h.
References TextureParam::setShiftV(), and MaterialParam::texture.
00241 { texture.setShiftV(v);}
void setShininess | ( | double | s | ) | [inline] |
Definition at line 216 of file MaterialParam.h.
References MaterialParam::shininess.
00216 { if(s>1.0) s = 1.0; else if(s<0.0) s = 0.0; shininess = s;}
void setSpecMapName | ( | const char * | name | ) | [inline] |
Definition at line 204 of file MaterialParam.h.
References TextureParam::setName(), and MaterialParam::specmap.
00204 { specmap.setName(name);}
void setTextureName | ( | const char * | name | ) | [inline] |
Definition at line 202 of file MaterialParam.h.
References TextureParam::setName(), and MaterialParam::texture.
00202 { texture.setName(name);}
void setTransparent | ( | double | a | ) | [inline] |
Definition at line 215 of file MaterialParam.h.
References MaterialParam::transparent.
00215 { if(a>1.0) a = 1.0; else if(a<0.0) a = 0.0; transparent = a;}
void setupFullName | ( | const char * | ext | ) |
ext | 拡張子 |
Definition at line 272 of file MaterialParam.cpp.
References TextureParam::addName(), MaterialParam::addname, Buffer::buf, MaterialParam::bumpmap, TextureParam::isSetTexture(), MaterialParam::specmap, and MaterialParam::texture.
00273 { 00274 if (texture.isSetTexture()) { 00275 if (addname.buf!=NULL) { 00276 texture.addName("_"); 00277 texture.addName((char*)addname.buf); 00278 } 00279 if (ext!=NULL) { 00280 if (ext[0]!='.') texture.addName("."); 00281 texture.addName(ext); 00282 } 00283 } 00284 if (bumpmap.isSetTexture()) { 00285 if (addname.buf!=NULL) { 00286 bumpmap.addName("_"); 00287 bumpmap.addName((char*)addname.buf); 00288 } 00289 if (ext!=NULL) { 00290 if (ext[0]!='.') bumpmap.addName("."); 00291 bumpmap.addName(ext); 00292 } 00293 } 00294 if (specmap.isSetTexture()) { 00295 if (addname.buf!=NULL) { 00296 specmap.addName("_"); 00297 specmap.addName((char*)addname.buf); 00298 } 00299 if (ext!=NULL) { 00300 if (ext[0]!='.') specmap.addName("."); 00301 specmap.addName(ext); 00302 } 00303 } 00304 }
Definition at line 156 of file MaterialParam.h.
Referenced by MaterialParam::addAdditionalName(), MaterialParam::dup(), MaterialParam::free(), MaterialParam::getAdditionalName(), MaterialParam::init(), MaterialParam::printParam(), MaterialParam::setAdditionalName(), and MaterialParam::setupFullName().
double bright [private] |
Definition at line 161 of file MaterialParam.h.
Referenced by MaterialParam::getBase64Params(), MaterialParam::getBright(), MaterialParam::init(), MaterialParam::isSetBright(), MaterialParam::printParam(), and MaterialParam::setBright().
Definition at line 174 of file MaterialParam.h.
Referenced by MaterialParam::dup(), MaterialParam::free(), MaterialParam::getBumpMapName(), MaterialParam::init(), jbxl::isSameMaterial(), MaterialParam::isSetBumpMap(), MaterialParam::isSetTextureParams(), MaterialParam::printParam(), MaterialParam::setBumpMapName(), and MaterialParam::setupFullName().
bool enable |
Definition at line 167 of file MaterialParam.h.
Referenced by ColladaXML::addPolylists(), MaterialParam::init(), MaterialParam::printParam(), MeshObjectData::setMaterialParam(), and MeshObjectNode::setMaterialParam().
double environment [private] |
Definition at line 163 of file MaterialParam.h.
Referenced by MaterialParam::getEnvironment(), MaterialParam::init(), MaterialParam::printParam(), and MaterialParam::setEnvironment().
double glossiness [private] |
Definition at line 162 of file MaterialParam.h.
Referenced by MaterialParam::getGlossiness(), MaterialParam::init(), MaterialParam::printParam(), and MaterialParam::setGlossiness().
double glow [private] |
Definition at line 160 of file MaterialParam.h.
Referenced by MaterialParam::getBase64Params(), MaterialParam::getGlow(), MaterialParam::init(), MaterialParam::isSetGlow(), MaterialParam::printParam(), and MaterialParam::setGlow().
double light [private] |
Definition at line 164 of file MaterialParam.h.
Referenced by MaterialParam::getBase64Params(), MaterialParam::getLight(), MaterialParam::init(), and MaterialParam::setLight().
int mapping |
Definition at line 169 of file MaterialParam.h.
Referenced by ColladaXML::addTexcrdSource(), MaterialParam::init(), and MaterialParam::printParam().
int mflags |
Definition at line 170 of file MaterialParam.h.
Referenced by MaterialParam::init(), and MaterialParam::printParam().
int others |
Definition at line 171 of file MaterialParam.h.
Referenced by MaterialParam::init(), and MaterialParam::printParam().
double shininess [private] |
Definition at line 159 of file MaterialParam.h.
Referenced by MaterialParam::getBase64Params(), MaterialParam::getShininess(), MaterialParam::init(), MaterialParam::isSetShininess(), MaterialParam::printParam(), and MaterialParam::setShininess().
Definition at line 175 of file MaterialParam.h.
Referenced by ColladaXML::addEffect(), MaterialParam::dup(), MaterialParam::free(), MaterialParam::getSpecMapName(), MaterialParam::init(), jbxl::isSameMaterial(), MaterialParam::isSetSpecMap(), MaterialParam::isSetTextureParams(), MaterialParam::printParam(), MaterialParam::setSpecMapName(), and MaterialParam::setupFullName().
Definition at line 173 of file MaterialParam.h.
Referenced by MaterialParam::dup(), MaterialParam::execFlipU(), MaterialParam::execFlipV(), MaterialParam::execInvRotate(), MaterialParam::execInvScale(), MaterialParam::execInvShift(), MaterialParam::execInvTrans(), MaterialParam::execRotate(), MaterialParam::execScale(), MaterialParam::execShift(), MaterialParam::execTrans(), MaterialParam::free(), MaterialParam::getAlphaChannel(), MaterialParam::getAlphaCutoff(), MaterialParam::getAlphaMode(), MaterialParam::getColor(), MaterialParam::getRotate(), MaterialParam::getScaleU(), MaterialParam::getScaleV(), MaterialParam::getShiftU(), MaterialParam::getShiftV(), MaterialParam::getTextureName(), MaterialParam::init(), jbxl::isSameMaterial(), MaterialParam::isSetAlpha(), MaterialParam::isSetColor(), MaterialParam::isSetTexture(), MaterialParam::isSetTextureParams(), MaterialParam::printParam(), MaterialParam::setAlphaChannel(), MaterialParam::setAlphaCutoff(), MaterialParam::setAlphaMode(), MaterialParam::setColor(), MaterialParam::setFlipU(), MaterialParam::setFlipV(), MaterialParam::setRotate(), MaterialParam::setScale(), MaterialParam::setScaleU(), MaterialParam::setScaleV(), MaterialParam::setShift(), MaterialParam::setShiftU(), MaterialParam::setShiftV(), MaterialParam::setTextureName(), and MaterialParam::setupFullName().
double transparent [private] |
Definition at line 158 of file MaterialParam.h.
Referenced by MaterialParam::getBase64Params(), MaterialParam::getTransparent(), MaterialParam::init(), MaterialParam::isSetTransparent(), MaterialParam::printParam(), and MaterialParam::setTransparent().