2 * PMD shape information handler
4 * License : The MIT License
5 * Copyright(c) 2010 MikuToga Partners
8 package jp.sourceforge.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モデルの各種形状(頂点、面)の通知用ハンドラ。
16 * 0から始まる頂点ID順に頂点は出現する。
19 public interface PmdShapeHandler extends LoopHandler {
22 ParseStage VERTEX_LIST = new ParseStage();
24 ParseStage SURFACE_LIST = new ParseStage();
28 * {@link #VERTEX_LIST}ループの構成要素
32 * @throws MmdFormatException 不正フォーマットによる
35 void pmdVertexPosition(float xPos, float yPos, float zPos)
36 throws MmdFormatException;
40 * {@link #VERTEX_LIST}ループの構成要素
42 * @param xVec 法線ベクトルX成分
43 * @param yVec 法線ベクトルY成分
44 * @param zVec 法線ベクトルZ成分
45 * @throws MmdFormatException 不正フォーマットによる
48 void pmdVertexNormal(float xVec, float yVec, float zVec)
49 throws MmdFormatException;
52 * 頂点のUVマッピング情報の通知を受け取る。
54 * {@link #VERTEX_LIST}ループの構成要素
55 * @param uVal テクスチャのU座標
56 * @param vVal テクスチャのV座標
57 * @throws MmdFormatException 不正フォーマットによる
60 void pmdVertexUV(float uVal, float vVal )
61 throws MmdFormatException;
64 * 頂点のボーン間ウェイトバランス情報の通知を受け取る。
65 * {@link #VERTEX_LIST}ループの構成要素
66 * @param boneId1 ボーンその1識別ID
67 * @param boneId2 ボーンその2識別ID
68 * @param weightForB1 ボーンその1への影響度。0(min)~100(max)
69 * ボーンその2への影響度は100からの引き算で求める。
70 * @throws MmdFormatException 不正フォーマットによる
73 void pmdVertexWeight(int boneId1, int boneId2, int weightForB1)
74 throws MmdFormatException;
78 * 材質単位でのエッジ表現指定に優先される。
79 * {@link #VERTEX_LIST}ループの構成要素
80 * @param hideEdge エッジ無効ならtrue
81 * @throws MmdFormatException 不正フォーマットによる
84 void pmdVertexEdge(boolean hideEdge)
85 throws MmdFormatException;
88 * 3つの頂点から構成される面情報の通知を受け取る。
89 * {@link #SURFACE_LIST}ループの構成要素
90 * @param vertexId1 頂点IDその1
91 * @param vertexId2 頂点IDその1
92 * @param vertexId3 頂点IDその1
93 * @throws MmdFormatException 不正フォーマットによる
96 void pmdSurfaceTriangle(int vertexId1, int vertexId2, int vertexId3)
97 throws MmdFormatException;