2 * PMD material information handler
4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sfjp.mikutoga.pmd.parser;
10 import jp.sfjp.mikutoga.bin.parser.LoopHandler;
11 import jp.sfjp.mikutoga.bin.parser.MmdFormatException;
12 import jp.sfjp.mikutoga.bin.parser.ParseStage;
15 * PMDモデルの各種材質情報の通知用ハンドラ。
18 public interface PmdMaterialHandler extends LoopHandler {
21 ParseStage MATERIAL_LIST = new ParseStage();
26 * <p>{@link #MATERIAL_LIST}ループの構成要素。
28 * @param red 0.0~1.0の範囲の赤成分
29 * @param green 0.0~1.0の範囲の緑成分
30 * @param blue 0.0~1.0の範囲の青成分
31 * @param alpha 0.0(透明)~1.0(不透明)のアルファ値。
32 * @throws MmdFormatException 不正フォーマットによる
35 void pmdMaterialDiffuse(float red, float green, float blue,
37 throws MmdFormatException;
42 * <p>{@link #MATERIAL_LIST}ループの構成要素。
44 * @param red 0.0~1.0の範囲の赤成分
45 * @param green 0.0~1.0の範囲の緑成分
46 * @param blue 0.0~1.0の範囲の青成分
47 * @param shininess 光沢強度(1~15ぐらい)
48 * @throws MmdFormatException 不正フォーマットによる
51 void pmdMaterialSpecular(float red, float green, float blue,
53 throws MmdFormatException;
58 * <p>{@link #MATERIAL_LIST}ループの構成要素。
60 * @param red 0.0~1.0の範囲の赤成分
61 * @param green 0.0~1.0の範囲の緑成分
62 * @param blue 0.0~1.0の範囲の青成分
63 * @throws MmdFormatException 不正フォーマットによる
66 void pmdMaterialAmbient(float red, float green, float blue)
67 throws MmdFormatException;
72 * <p>{@link #MATERIAL_LIST}ループの構成要素。
74 * @param toonIdx トゥーンファイル番号。
75 * 0ならtoon01.bmp。9ならtoon10.bmp。0xffならtoon0.bmp。
76 * @param textureFile テクスチャファイル名。
78 * @param sphereFile スフィアマップファイル名。
80 * @throws MmdFormatException 不正フォーマットによる
83 void pmdMaterialShading(int toonIdx,
84 String textureFile, String sphereFile )
85 throws MmdFormatException;
90 * <p>{@link #MATERIAL_LIST}ループの構成要素。
92 * @param hasEdge エッジを表示するならtrue
93 * @param vertexNum 面頂点数。
97 * <p>通算した面数を面情報通知順と突き合わせることにより、
100 * @throws MmdFormatException 不正フォーマットによる
102 * @see PmdShapeHandler#pmdSurfaceTriangle(int, int, int)
104 void pmdMaterialInfo(boolean hasEdge, int vertexNum)
105 throws MmdFormatException;