public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }
private static List<Matrix4f> calcInJointMatrices(MD5Model md5Model) { List<Matrix4f> result = new ArrayList<>(); List<MD5JointInfo.MD5JointData> joints = md5Model.getJointInfo().getJoints(); for (MD5JointInfo.MD5JointData joint : joints) { // Calculate translation matrix using joint position // Calculates rotation matrix using joint orientation // Gets transformation matrix bu multiplying translation matrix by rotation matrix // Instead of multiplying we can apply rotation which is optimized internally Matrix4f mat = new Matrix4f() .translate(joint.getPosition()) .rotate(joint.getOrientation()) .invert(); result.add(mat); } return result; }
private static void parseBlock(MD5Model model, String blockId, List<String> blockBody) throws Exception { switch (blockId) { case "joints": MD5JointInfo jointInfo = MD5JointInfo.parse(blockBody); model.setJointInfo(jointInfo); break; case "mesh": MD5Mesh md5Mesh = MD5Mesh.parse(blockBody); model.getMeshes().add(md5Mesh); break; default: break; } }
public static MD5JointInfo parse(List<String> blockBody) { MD5JointInfo result = new MD5JointInfo(); List<MD5JointData> joints = new ArrayList<>(); for (String line : blockBody) { MD5JointData jointData = MD5JointData.parseLine(line); if (jointData != null) { joints.add(jointData); } } result.setJoints(joints); return result; }