public LightConfig(Item configItem) { lightName = configItem.getIdent().getLocalName(); lightType = LightType.AMBIENT; // For now, we assume light is ambient (no direction required) if type is not specified String typeString = ItemFuncs.getString(configItem, LightsCameraAN.P_lightType, null); if (typeString.equals("DIRECTIONAL")) { lightType = LightType.DIRECTIONAL; } for (int index = 0; index < lightDirection.length; index++) { lightDirection[index] = ItemFuncs.getDouble(configItem, LightsCameraAN.P_direction[index], 0.0).floatValue(); } for (int index = 0; index < lightColor.length; index++) { lightColor[index] = ItemFuncs.getDouble(configItem, LightsCameraAN.P_color[index], null).floatValue(); } }
public static BoneProjectionRange makeOne(BoneJointConfig bjc, Item configItem) { String boneName = ItemFuncs.getString(configItem, BoneAN.P_boneName, null); String rotAxisName = ItemFuncs.getString(configItem, BoneAN.P_rotationAxis, null); Double minAngDeg = ItemFuncs.getDouble(configItem, BoneAN.P_minAngleDeg, null); Double maxAngDeg = ItemFuncs.getDouble(configItem, BoneAN.P_maxAngleDeg, null); double minAngRad = Math.toRadians(minAngDeg); double maxAngRad = Math.toRadians(maxAngDeg); BoneRotationAxis rax = BoneRotationAxis.valueOf(rotAxisName); BoneProjectionRange bpr = new BoneProjectionRange(bjc, boneName, rax, minAngRad, maxAngRad); return bpr; } public String getBoneName() {
public BoneJointConfig(Item configItem) { myURI_Fragment = configItem.getIdent().getLocalName(); myJointNum = ItemFuncs.getInteger(configItem, BoneAN.P_jointNum, null); myJointName = ItemFuncs.getString(configItem, BoneAN.P_jointName, null); myNormalDefaultPos = ItemFuncs.getDouble(configItem, BoneAN.P_defaultPosNorm, null); Set<Item> bprItems = ItemFuncs.getLinkedItemSet(configItem, BoneAN.P_projectionRange); for (Item bpri : bprItems) { BoneProjectionRange bpr = BoneProjectionRange.makeOne(this, bpri); myProjectionRanges.add(bpr); } }