import java.io.InputStream;
import jp.sfjp.mikutoga.bin.parser.CommonParser;
import jp.sfjp.mikutoga.bin.parser.MmdFormatException;
-import jp.sourceforge.mikutoga.vmd.VmdConst;
/**
* VMDモーションファイルのカメラモーションパーサ。
private final byte[] xyzIntplt = new byte[BZXYZ_SIZE];
private final byte[] etcIntplt = new byte[BZETC_SIZE];
- private VmdCameraHandler handler = null;
+ private VmdCameraHandler handler = VmdUnifiedHandler.EMPTY;
/**
* @param cameraHandler ハンドラ
*/
void setCameraHandler(VmdCameraHandler cameraHandler){
- this.handler = cameraHandler;
+ if(cameraHandler == null){
+ this.handler = VmdUnifiedHandler.EMPTY;
+ }else{
+ this.handler = cameraHandler;
+ }
+
return;
}
void parse() throws IOException, MmdFormatException {
int cameraMotionNo = parseLeInt();
- if(this.handler == null){
- skip(VmdConst.CAMERA_DATA_SZ * cameraMotionNo);
- return;
- }
-
this.handler.loopStart(VmdCameraHandler.CAMERA_LIST, cameraMotionNo);
for(int ct = 0; ct < cameraMotionNo; ct++){
*/
private void parseCameraXyzInterpolation()
throws IOException, MmdFormatException{
- if(this.handler == null){
- skip(this.xyzIntplt.length);
- return;
- }
-
parseByteArray(this.xyzIntplt);
int idx = 0;
*/
private void parseCameraEtcInterpolation()
throws IOException, MmdFormatException{
- if(this.handler == null){
- skip(this.etcIntplt.length);
- return;
- }
-
parseByteArray(this.etcIntplt);
int idx = 0;