2 * PMD material information handler
4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sourceforge.mikutoga.parser.pmd;
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 {
23 class PmdMaterialStage extends ParseStage{
25 PmdMaterialStage(){ super(); return; }
29 PmdMaterialStage MATERIAL_LIST = new PmdMaterialStage();
33 * {@link #MATERIAL_LIST}ループの構成要素。
34 * @param red 0.0~1.0の範囲の赤成分
35 * @param green 0.0~1.0の範囲の緑成分
36 * @param blue 0.0~1.0の範囲の青成分
37 * @param alpha 0.0(透明)~1.0(不透明)のアルファ値。
38 * @throws MmdFormatException 不正フォーマットによる
41 void pmdMaterialDiffuse(float red, float green, float blue,
43 throws MmdFormatException;
47 * {@link #MATERIAL_LIST}ループの構成要素。
48 * @param red 0.0~1.0の範囲の赤成分
49 * @param green 0.0~1.0の範囲の緑成分
50 * @param blue 0.0~1.0の範囲の青成分
51 * @param shininess 光沢強度(1~15ぐらい)
52 * @throws MmdFormatException 不正フォーマットによる
55 void pmdMaterialSpecular(float red, float green, float blue,
57 throws MmdFormatException;
61 * {@link #MATERIAL_LIST}ループの構成要素。
62 * @param red 0.0~1.0の範囲の赤成分
63 * @param green 0.0~1.0の範囲の緑成分
64 * @param blue 0.0~1.0の範囲の青成分
65 * @throws MmdFormatException 不正フォーマットによる
68 void pmdMaterialAmbient(float red, float green, float blue)
69 throws MmdFormatException;
73 * {@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;
89 * {@link #MATERIAL_LIST}ループの構成要素。
90 * @param hasEdge エッジを表示するならtrue
91 * @param vertexNum 面頂点数。
93 * 3で割ると積算で表される面IDの範囲を表す。
94 * @throws MmdFormatException 不正フォーマットによる
97 void pmdMaterialInfo(boolean hasEdge, int vertexNum)
98 throws MmdFormatException;