2 * PMD material information handler
4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sourceforge.mikutoga.pmd.parser;
10 import jp.sourceforge.mikutoga.parser.LoopHandler;
11 import jp.sourceforge.mikutoga.parser.MmdFormatException;
12 import jp.sourceforge.mikutoga.parser.ParseStage;
15 * PMDモデルの各種材質情報の通知用ハンドラ。
18 public interface PmdMaterialHandler extends LoopHandler {
21 ParseStage MATERIAL_LIST = new ParseStage();
25 * {@link #MATERIAL_LIST}ループの構成要素。
26 * @param red 0.0~1.0の範囲の赤成分
27 * @param green 0.0~1.0の範囲の緑成分
28 * @param blue 0.0~1.0の範囲の青成分
29 * @param alpha 0.0(透明)~1.0(不透明)のアルファ値。
30 * @throws MmdFormatException 不正フォーマットによる
33 void pmdMaterialDiffuse(float red, float green, float blue,
35 throws MmdFormatException;
39 * {@link #MATERIAL_LIST}ループの構成要素。
40 * @param red 0.0~1.0の範囲の赤成分
41 * @param green 0.0~1.0の範囲の緑成分
42 * @param blue 0.0~1.0の範囲の青成分
43 * @param shininess 光沢強度(1~15ぐらい)
44 * @throws MmdFormatException 不正フォーマットによる
47 void pmdMaterialSpecular(float red, float green, float blue,
49 throws MmdFormatException;
53 * {@link #MATERIAL_LIST}ループの構成要素。
54 * @param red 0.0~1.0の範囲の赤成分
55 * @param green 0.0~1.0の範囲の緑成分
56 * @param blue 0.0~1.0の範囲の青成分
57 * @throws MmdFormatException 不正フォーマットによる
60 void pmdMaterialAmbient(float red, float green, float blue)
61 throws MmdFormatException;
65 * {@link #MATERIAL_LIST}ループの構成要素。
66 * @param toonIdx トゥーンファイル番号。
67 * 0ならtoon01.bmp。9ならtoon10.bmp。0xffならtoon0.bmp。
68 * @param textureFile テクスチャファイル名。
70 * @param sphereFile スフィアマップファイル名。
72 * @throws MmdFormatException 不正フォーマットによる
75 void pmdMaterialShading(int toonIdx,
76 String textureFile, String sphereFile )
77 throws MmdFormatException;
81 * {@link #MATERIAL_LIST}ループの構成要素。
82 * @param hasEdge エッジを表示するならtrue
83 * @param vertexNum 面頂点数。
85 * 3で割ると積算で表される面IDの範囲を表す。
86 * @throws MmdFormatException 不正フォーマットによる
89 void pmdMaterialInfo(boolean hasEdge, int vertexNum)
90 throws MmdFormatException;