@Override public float[] getBindShapeMatrix(float[] result) { float localResult[] = Utils.validate(result, 16); System.arraycopy(bindShapeMatrix, 0, localResult, 0, 16); return localResult; }
@Override public float[] getInverseBindMatrix(int index, float[] result) { float localResult[] = Utils.validate(result, 16); AccessorFloatData inverseBindMatricesData = AccessorDatas.createFloat(inverseBindMatrices); for (int j = 0; j < 16; j++) { localResult[j] = inverseBindMatricesData.get(index, j); } return localResult; }
/** * Compute the global transform for the given {@link NodeModel}, * and store it in the given result. If the given result is * <code>null</code> or does not have a length of 16, then * a new array will be created and returned. * * @param nodeModel The {@link NodeModel} * @param result The result * @return The result */ private static float[] computeGlobalTransform( NodeModel nodeModel, float result[]) { float localResult[] = Utils.validate(result, 16); float tempLocalTransform[] = TEMP_MATRIX_4x4_IN_GLOBAL.get(); NodeModel currentNode = nodeModel; MathUtils.setIdentity4x4(localResult); while (currentNode != null) { currentNode.computeLocalTransform(tempLocalTransform); MathUtils.mul4x4( tempLocalTransform, localResult, localResult); currentNode = currentNode.getParent(); } return localResult; }
NodeModel nodeModel, float result[]) float localResult[] = Utils.validate(result, 16); if (nodeModel.getMatrix() != null)
Camera camera, Float aspectRatio, float result[]) float localResult[] = Utils.validate(result, 16); String cameraType = camera.getType(); if ("perspective".equals(cameraType))
Camera camera, Float aspectRatio, float result[]) float localResult[] = Utils.validate(result, 16); String cameraType = camera.getType(); if ("perspective".equals(cameraType))