Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertexPos.add(acumPos);
for (int i = startWeight; i < startWeight + numWeights; i++) { MD5Mesh.MD5Weight weight = weights.get(i); MD5JointInfo.MD5JointData joint = joints.get(weight.getJointIndex()); Vector3f rotatedPos = new Vector3f(weight.getPosition()).rotate(joint.getOrientation()); Vector3f acumPos = new Vector3f(joint.getPosition()).add(rotatedPos); acumPos.mul(weight.getBias()); vertex.position.add(acumPos); vertex.jointIndices[i - startWeight] = weight.getJointIndex(); vertex.weights[i - startWeight] = weight.getBias();
Matcher weightMatcher = PATTERN_WEIGHT.matcher(line); if (weightMatcher.matches()) { MD5Weight weight = new MD5Weight(); weight.setIndex(Integer.parseInt(weightMatcher.group(1))); weight.setJointIndex(Integer.parseInt(weightMatcher.group(2))); weight.setBias(Float.parseFloat(weightMatcher.group(3))); float x = Float.parseFloat(weightMatcher.group(4)); float y = Float.parseFloat(weightMatcher.group(5)); float z = Float.parseFloat(weightMatcher.group(6)); weight.setPosition(new Vector3f(x, y, z)); weights.add(weight);