<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.10</version>
+ <version>4.11</version>
<scope>test</scope>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0.1</version>
+ <version>1.1.1</version>
<configuration>
<rules>
<requireMavenVersion>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
+ <version>2.5</version>
<configuration>
<filesets>
<fileset>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>3.0</version>
<configuration>
<source>1.6</source> <!-- for NetBeans IDE -->
<target>1.6</target>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
<archive>
<manifest>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>1.5</version>
+ <version>2.0</version>
<executions>
<execution>
<phase>package</phase>
<goal>shade</goal>
</goals>
<configuration>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>jp.sourceforge.mikutoga:togagem</include>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2.1</version>
+ <version>2.4</version>
<configuration>
+ <archiveBaseDirectory>.</archiveBaseDirectory>
<descriptors>
<descriptor>src/main/assembly/descriptor.xml</descriptor>
</descriptors>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
+ <version>2.2.1</version>
<configuration>
<includePom>true</includePom>
<archive>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.10</version>
+ <version>2.12.4</version>
<configuration>
<skipTests>false</skipTests>
<enableAssertions>true</enableAssertions>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.0</version>
+ <version>3.2</version>
<configuration>
<generateReports>true</generateReports>
<locales>ja</locales>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.8</version>
+ <version>2.9.1</version>
<!-- config from property value -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
- <version>2.6</version>
+ <version>2.7.1</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
<rulesets>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.5.2</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
+ <!-- for Jenkins -->
+ <findbugsXmlOutput>true</findbugsXmlOutput>
+ <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
+ <xmlOutput>true</xmlOutput>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.5.2</version>
+ <configuration>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <formats>
+ <format>html</format>
+ <format>xml</format> <!-- for Jenkins -->
+ </formats>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.4</version>
+ <version>2.6</version>
<configuration>
<linkOnly>true</linkOnly>
<offline>true</offline>
<report>project-team</report>
<!--
<report>dependency-convergence</report>
+ <report>dependency-info</report>
<report>dependency-management</report>
<report>distribution-management</report>
<report>issue-tracking</report>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8</version>
+ <version>2.9</version>
<configuration>
<skip>false</skip>
<notimestamp>true</notimestamp>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.10</version>
+ <version>2.12.4</version>
<configuration>
<showSuccess>false</showSuccess>
</configuration>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
- <version>2.5.1</version>
+ <version>2.5.2</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
+ <formats>
+ <format>html</format>
+ <format>xml</format> <!-- for Jenkins -->
+ </formats>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.8</version>
+ <version>2.9.1</version>
<configuration>
<skip>false</skip>
<!-- config from property value -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
- <version>2.6</version>
+ <version>2.7.1</version>
<configuration>
<skip>false</skip>
<targetJdk>${maven.compiler.target}</targetJdk>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.5.2</version>
<configuration>
<skip>false</skip>
<effort>Max</effort>
<threshold>Low</threshold>
+ <!-- for Jenkins -->
+ <findbugsXmlOutput>true</findbugsXmlOutput>
+ <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
+ <xmlOutput>true</xmlOutput>
<!-- excludeFilterFile/ -->
</configuration>
</plugin>
List<Vertex> vList = model.getVertexList();
int vertexNum = vList.size();
- dumpInt(vertexNum);
+ dumpLeInt(vertexNum);
for(Vertex vertex : vList){
dumpVertex(vertex);
for(Material material : materialList){
surfaceNum += material.getSurfaceList().size();
}
- dumpInt(surfaceNum * 3);
+ dumpLeInt(surfaceNum * 3);
Vertex[] triangle = new Vertex[3];
for(Material material : materialList){
for(Surface surface : material){
surface.getTriangle(triangle);
- dumpShort(triangle[0].getSerialNumber());
- dumpShort(triangle[1].getSerialNumber());
- dumpShort(triangle[2].getSerialNumber());
+ dumpLeShort(triangle[0].getSerialNumber());
+ dumpLeShort(triangle[1].getSerialNumber());
+ dumpLeShort(triangle[2].getSerialNumber());
}
}
List<Material> materialList = model.getMaterialList();
int materialNum = materialList.size();
- dumpInt(materialNum);
+ dumpLeInt(materialNum);
float[] rgba = new float[4];
for(Material material : materialList){
Color diffuse = material.getDiffuseColor();
diffuse.getRGBComponents(rgba);
- dumpFloat(rgba[0]);
- dumpFloat(rgba[1]);
- dumpFloat(rgba[2]);
- dumpFloat(rgba[3]);
+ dumpLeFloat(rgba[0]);
+ dumpLeFloat(rgba[1]);
+ dumpLeFloat(rgba[2]);
+ dumpLeFloat(rgba[3]);
float shininess = material.getShininess();
- dumpFloat(shininess);
+ dumpLeFloat(shininess);
Color specular = material.getSpecularColor();
specular.getRGBComponents(rgba);
- dumpFloat(rgba[0]);
- dumpFloat(rgba[1]);
- dumpFloat(rgba[2]);
+ dumpLeFloat(rgba[0]);
+ dumpLeFloat(rgba[1]);
+ dumpLeFloat(rgba[2]);
Color ambient = material.getAmbientColor();
ambient.getRGBComponents(rgba);
- dumpFloat(rgba[0]);
- dumpFloat(rgba[1]);
- dumpFloat(rgba[2]);
+ dumpLeFloat(rgba[0]);
+ dumpLeFloat(rgba[1]);
+ dumpLeFloat(rgba[2]);
ShadeInfo shade = material.getShadeInfo();
int toonIdx = shade.getToonIndex();
dumpByte(edgeFlag);
int surfaceNum = material.getSurfaceList().size();
- dumpInt(surfaceNum * 3);
+ dumpLeInt(surfaceNum * 3);
dumpShadeFileInfo(shade);
}
List<BoneInfo> boneList = model.getBoneList();
int boneNum = boneList.size();
- dumpShort(boneNum);
+ dumpLeShort(boneNum);
for(BoneInfo bone : boneList){
dumpBone(bone);
BoneInfo prev = bone.getPrevBone();
if(prev != null) dumpSerialIdAsShort(prev);
- else dumpShort(NOPREVBONE_ID);
+ else dumpLeShort(NOPREVBONE_ID);
BoneInfo next = bone.getNextBone();
if(next != null) dumpSerialIdAsShort(next);
- else dumpShort(NONEXTBONE_ID);
+ else dumpLeShort(NONEXTBONE_ID);
BoneType type = bone.getBoneType();
dumpByte(type.encode());
if(type == BoneType.LINKEDROT){
int ratio = bone.getRotationRatio();
- dumpShort(ratio);
+ dumpLeShort(ratio);
}else{
BoneInfo ik = bone.getIKBone();
if(ik != null) dumpSerialIdAsShort(ik);
- else dumpShort(NOIKBONE_ID);
+ else dumpLeShort(NOIKBONE_ID);
}
MkPos3D position = bone.getPosition();
List<IKChain> ikChainList = model.getIKChainList();
int ikNum = ikChainList.size();
- dumpShort(ikNum);
+ dumpLeShort(ikNum);
for(IKChain chain : ikChainList){
dumpIKChain(chain);
int depth = chain.getIKDepth();
float weight = chain.getIKWeight();
- dumpShort(depth);
- dumpFloat(weight);
+ dumpLeShort(depth);
+ dumpLeFloat(weight);
for(int idx = 1; idx < boneNum; idx++){ // リストの2番目以降全て
BoneInfo bone = boneList.get(idx);
}
if(totalMorphPart <= 0){
- dumpShort(0);
+ dumpLeShort(0);
return;
}else{
totalMorphPart++; // baseの分
- dumpShort(totalMorphPart);
+ dumpLeShort(totalMorphPart);
}
dumpText("base", PmdLimits.MAXBYTES_MORPHNAME);
int totalVertex = mergedMorphVertexList.size();
- dumpInt(totalVertex);
+ dumpLeInt(totalVertex);
dumpByte(MorphType.BASE.encode());
for(MorphVertex morphVertex : mergedMorphVertexList){
Vertex baseVertex = morphVertex.getBaseVertex();
- dumpInt(baseVertex.getSerialNumber());
+ dumpLeInt(baseVertex.getSerialNumber());
dumpPos3D(baseVertex.getPosition());
}
dumpText(part.getMorphName().getPrimaryText(),
PmdLimits.MAXBYTES_MORPHNAME );
List<MorphVertex> morphVertexList = part.getMorphVertexList();
- dumpInt(morphVertexList.size());
+ dumpLeInt(morphVertexList.size());
dumpByte(part.getMorphType().encode());
for(MorphVertex morphVertex : morphVertexList){
- dumpInt(morphVertex.getSerialNumber());
+ dumpLeInt(morphVertex.getSerialNumber());
dumpPos3D(morphVertex.getOffset());
}
}
PmdLimits.MAXBYTES_BONEGROUPNAME, LFFILLER );
dispBoneNum += group.getBoneList().size();
}
- dumpInt(dispBoneNum);
+ dumpLeInt(dispBoneNum);
for(BoneGroup group : groupList){
if(group.isDefaultBoneGroup()) continue;
protected void dumpSerialIdAsShort(SerialNumbered obj)
throws IOException{
int serialId = obj.getSerialNumber();
- dumpShort(serialId);
+ dumpLeShort(serialId);
return;
}
float xPos = (float) position.getXpos();
float yPos = (float) position.getYpos();
- dumpFloat(xPos);
- dumpFloat(yPos);
+ dumpLeFloat(xPos);
+ dumpLeFloat(yPos);
return;
}
float yPos = (float) position.getYpos();
float zPos = (float) position.getZpos();
- dumpFloat(xPos);
- dumpFloat(yPos);
- dumpFloat(zPos);
+ dumpLeFloat(xPos);
+ dumpLeFloat(yPos);
+ dumpLeFloat(zPos);
return;
}
float yVal = (float) vector.getYVal();
float zVal = (float) vector.getZVal();
- dumpFloat(xVal);
- dumpFloat(yVal);
- dumpFloat(zVal);
+ dumpLeFloat(xVal);
+ dumpLeFloat(yVal);
+ dumpLeFloat(zVal);
return;
}
throws IOException, IllegalTextExportException{
List<RigidInfo> rigidList = model.getRigidList();
int rigidNum = rigidList.size();
- dumpInt(rigidNum);
+ dumpLeInt(rigidNum);
for(RigidInfo rigid : rigidList){
dumpRigid(rigid);
BoneInfo linkedBone = rigid.getLinkedBone();
if(linkedBone == null){
- dumpShort(-1);
+ dumpLeShort(-1);
}else{
- dumpShort(linkedBone.getSerialNumber());
+ dumpLeShort(linkedBone.getSerialNumber());
}
RigidGroup group = rigid.getRigidGroup();
int serialId = throughGroup.getSerialNumber();
mask &= ~(0x0001 << serialId);
}
- dumpShort(mask);
+ dumpLeShort(mask);
dumpRigidShape(rigid.getRigidShape());
float height = shape.getHeight();
float depth = shape.getDepth();
- dumpFloat(width);
- dumpFloat(height);
- dumpFloat(depth);
+ dumpLeFloat(width);
+ dumpLeFloat(height);
+ dumpLeFloat(depth);
return;
}
float restitution = dynamics.getRestitution();
float friction = dynamics.getFriction();
- dumpFloat(mass);
- dumpFloat(dampPos);
- dumpFloat(dampRot);
- dumpFloat(restitution);
- dumpFloat(friction);
+ dumpLeFloat(mass);
+ dumpLeFloat(dampPos);
+ dumpLeFloat(dampRot);
+ dumpLeFloat(restitution);
+ dumpLeFloat(friction);
return;
}
throws IOException, IllegalTextExportException{
List<JointInfo> jointList = model.getJointList();
int jointNum = jointList.size();
- dumpInt(jointNum);
+ dumpLeInt(jointNum);
for(JointInfo joint : jointList){
dumpJoint(joint);
RigidInfo rigidA = joint.getRigidA();
RigidInfo rigidB = joint.getRigidB();
- dumpInt(rigidA.getSerialNumber());
- dumpInt(rigidB.getSerialNumber());
+ dumpLeInt(rigidA.getSerialNumber());
+ dumpLeInt(rigidB.getSerialNumber());
dumpPos3D(joint.getPosition());
dumpRad3d(joint.getRotation());
float yFrom = range.getYFrom();
float zFrom = range.getZFrom();
- dumpFloat(xFrom);
- dumpFloat(yFrom);
- dumpFloat(zFrom);
+ dumpLeFloat(xFrom);
+ dumpLeFloat(yFrom);
+ dumpLeFloat(zFrom);
float xTo = range.getXTo();
float yTo = range.getYTo();
float zTo = range.getZTo();
- dumpFloat(xTo);
- dumpFloat(yTo);
- dumpFloat(zTo);
+ dumpLeFloat(xTo);
+ dumpLeFloat(yTo);
+ dumpLeFloat(zTo);
return;
}
float yVal = rad.getYRad();
float zVal = rad.getZRad();
- dumpFloat(xVal);
- dumpFloat(yVal);
- dumpFloat(zVal);
+ dumpLeFloat(xVal);
+ dumpLeFloat(yVal);
+ dumpLeFloat(zVal);
return;
}
float yVal = deg.getYDeg();
float zVal = deg.getZDeg();
- dumpFloat(xVal);
- dumpFloat(yVal);
- dumpFloat(zVal);
+ dumpLeFloat(xVal);
+ dumpLeFloat(yVal);
+ dumpLeFloat(zVal);
return;
}
import java.util.ArrayList;
import java.util.List;
import jp.sourceforge.mikutoga.parser.MmdFormatException;
-import jp.sourceforge.mikutoga.parser.MmdSource;
+import jp.sourceforge.mikutoga.parser.MmdInputStream;
import jp.sourceforge.mikutoga.pmd.model.MorphPart;
import jp.sourceforge.mikutoga.pmd.model.PmdModel;
import jp.sourceforge.mikutoga.pmd.parser.PmdParser;
* コンストラクタ。
* @param source PMDファイル入力ソース
*/
- public PmdLoader(MmdSource source){
+ public PmdLoader(MmdInputStream source){
super();
this.model = new PmdModel();
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
import jp.sourceforge.mikutoga.parser.MmdFormatException;
-import jp.sourceforge.mikutoga.parser.MmdSource;
+import jp.sourceforge.mikutoga.parser.MmdInputStream;
import jp.sourceforge.mikutoga.pmd.IllegalPmdDataException;
import jp.sourceforge.mikutoga.pmd.model.PmdModel;
import jp.sourceforge.mikutoga.pmd.model.binio.PmdExporter;
*/
private static PmdModel pmdRead(InputStream is)
throws IOException, MmdFormatException{
- MmdSource source = new MmdSource(is);
+ MmdInputStream source = new MmdInputStream(is);
PmdLoader loader = new PmdLoader(source);
PmdModel model = loader.load();