当前位置: 首页>>代码示例>>Java>>正文


Java LogUtils类代码示例

本文整理汇总了Java中com.akjava.gwt.lib.client.LogUtils的典型用法代码示例。如果您正苦于以下问题:Java LogUtils类的具体用法?Java LogUtils怎么用?Java LogUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LogUtils类属于com.akjava.gwt.lib.client包,在下文中一共展示了LogUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: autoWeight

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
public static void autoWeight(Geometry geometry,JsArray<AnimationBone> bones,List<List<Vector3>> endSites,int mode,JsArray<Vector4> bodyIndices,JsArray<Vector4> bodyWeight){
LogUtils.log("makehuman-auto-weight:");
List<NameAndVector3> nameAndPositions=boneToNameAndPosition(bones,endSites);
for(int i=0;i<geometry.vertices().length();i++){
	Vector4 ret=null;
	if(mode==MODE_MAKEHUMAN_SECOND_LIFE19){
		ret=makehuman(nameAndPositions, bones, geometry, i);
	}else{
		Window.alert("null mode");
	}
	
	//now support only 2 bones
	Vector4 v4=THREE.Vector4();
	v4.set(ret.getX(), ret.getY(), 0, 0);
	bodyIndices.push(v4);
	
	Vector4 v4w=THREE.Vector4();
	v4w.set(ret.getZ(), ret.getW(), 0, 0);
	bodyWeight.push(v4w);
	}
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:22,代码来源:MakehumanWeightBuilder.java

示例2: selectVertex

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
private void selectVertex(int index){
	if(lastSelection!=-1){
		vertexMeshs.get(lastSelection).getMaterial().gwtGetColor().setHex(getVertexColor(lastSelection));
	}
	Vector4 in=bodyIndices.get(index);
	Vector4 we=bodyWeight.get(index);
	
	LogUtils.log("select:"+index+","+we.getX()+","+we.getY());
	
	//change selected point to selection color,multiple selection is avaiable and to detect change point color.
	vertexMeshs.get(index).getMaterial().gwtGetColor().setHex(selectColor);
	
	indexWeightEditor.setAvailable(true);
	updateWeightButton.setEnabled(true);
	
	indexWeightEditor.setValue(index, in, we);
	
	//show which point selection,with wireframe weight-color
	boneSelectionIndicateBoxMesh.setVisible(true);
	boneSelectionIndicateBoxMesh.setPosition(vertexMeshs.get(index).getPosition());
	boneSelectionIndicateBoxMesh.getMaterial().gwtGetColor().setHex(getVertexColor(index));
	
	stackPanel.showWidget(1); //bone & weight panel
	lastSelection=index;
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:26,代码来源:CopyOfGWTModelWeight.java

示例3: updateMaterial

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
protected void updateMaterial() {
	
	Material material=null;
	
	texture.setFlipY(needFlipY);//for temporary release //TODO as option for 3.1 format models
	
	if(!needFlipY){
		LogUtils.log("texture flipY:false for old 3.0 format");
	}
	
	if(useBasicMaterial.getValue()){
		material=THREE.MeshBasicMaterial(GWTParamUtils.MeshBasicMaterial()
				.skinning(true).color(0xffffff).map(texture));
	}else{
		material=THREE.MeshLambertMaterial(GWTParamUtils.MeshBasicMaterial().skinning(true).color(0xffffff).map(texture));
	}
	
	
	if(skinnedMesh!=null){
		skinnedMesh.setMaterial(material);
	}
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:23,代码来源:CopyOfGWTModelWeight.java

示例4: drawImage

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
protected void drawImage(ImageElement img) {
	try{
	
	//need for some transparent image
	canvas.getContext2d().clearRect(0, 0, canvas.getCoordinateSpaceWidth(), canvas.getCoordinateSpaceHeight());
	
	//canvas.getContext2d().save();
	
	//no need to flip
	//canvas.getContext2d().translate(originImage.getCoordinateSpaceWidth(), 0); //flip horizontal
	//canvas.getContext2d().scale(-1, 1);
	//canvas.getContext2d().transform(-1, 0, 0, 1, 0, 0);
	canvas.getContext2d().drawImage(selection.getImageElement(), 0, 0);
	//canvas.getContext2d().restore();
	
	}catch(Exception e){
		LogUtils.log("error:"+e.getMessage());
	}
	
	//canvas.getContext2d().setFillStyle("rgba(0,0,0,0)");
	//canvas.getContext2d().setGlobalCompositeOperation("destination-out");
	//canvas.getContext2d().fillRect(100, 100, 100, 100);
}
 
开发者ID:akjava,项目名称:gwthtml5apps,代码行数:24,代码来源:TransparentIt.java

示例5: callback

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
@Override
public void callback(final File file, String parent) {
	LogUtils.log(file+","+parent);
	if(file==null){
		return;
	}
	final FileReader reader = FileReader.createFileReader();
	reader.setOnLoad(new FileHandler() {
		@Override
		public void onLoad() {
			LogUtils.log("onLoad:"+file.getFileName());
			String dataUrl=reader.getResultAsString();
			loadFile(file, dataUrl);
		}
	});
	
	if(file!=null){
		reader.readAsDataURL(file);
	}
}
 
开发者ID:akjava,项目名称:gwthtml5apps,代码行数:21,代码来源:DataUrlDropVerticalRootPanel.java

示例6: doSelect

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
public void doSelect(ImageUrlDataResizeInfo selection) {
	if(selection==null){
		mainImage.setVisible(false);
		mainImage.setUrl("");
	}else{
	mainImage.setUrl(selection.getDataUrl());
	mainImage.getElement().removeAttribute("style");
	if(selection.getSizeMode()==SIZE_WIDTH){
		mainImage.setWidth(selection.getWidth()+"px");
	}else{
		mainImage.setHeight(selection.getWidth()+"px");
	}
	LogUtils.log(mainImage);
	
	mainImage.setVisible(true);
	}
	//LogUtils.log("set-visible");
}
 
开发者ID:akjava,项目名称:gwthtml5apps,代码行数:19,代码来源:SimpleResize.java

示例7: doRepreview

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
protected void doRepreview() {
	LogUtils.log("doRepreview1");
	int margin=InpaintEngine.INPAINT_MARGIN;
	if(maskImageElement==null){
		 Window.alert("no mask element");
		 return;
	}
	LogUtils.log("doRepreview1");
	ImageElementUtils.copytoCanvasWithMargin(maskImageElement, sharedCanvas,true,margin,true);
	
	Canvas grayscale=CanvasUtils.convertToGrayScale(sharedCanvas, null);
	CanvasUtils.copyTo(grayscale, sharedCanvas);
	
	
	ImageData maskData=CanvasUtils.getImageData(sharedCanvas);
	
	greyScaleMaskPanel.clear();
	
	addToPanel(greyScaleMaskPanel,maskData);
	
	mainTab.selectTab(1);
	LogUtils.log("doRepreview4");
	//CanvasUtils.copyTo(maskData,sharedCanvas);
	//String dataUrl=sharedCanvas.toDataUrl();
	//listener.createGreyScaleMaks(maskData);
}
 
开发者ID:akjava,项目名称:gwthtml5apps,代码行数:27,代码来源:Inpaint.java

示例8: onCloseSettingPanel

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
@Override
public void onCloseSettingPanel(){
	try {
		//number settings
		storageControler.setValue(KEY_FONT, fontBox.getValue());
		storageControler.setValue(KEY_TEXT_COLOR, textColorBox.getValue());
		storageControler.setValue(KEY_BG_COLOR, bgColorBox.getValue());
		
		storageControler.setValue(KEY_BG_DIAMETER, digimeterBox.getValue());
		storageControler.setValue(KEY_BG_TYPE, bgTypeBox.getValue().getType());
	} catch (StorageException e) {
		LogUtils.log(e.getMessage());
		//TODO 
	}
	updateCanvas();//possible number-settings changed.
}
 
开发者ID:akjava,项目名称:gwthtml5apps,代码行数:17,代码来源:ExportImage.java

示例9: copyValue

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
public void copyValue(VertexBoneData copyFrom) {
	if(value==null){
		LogUtils.log("selection is null");
		return;
	}
	if(value.getVertexIndex()!=copyFrom.getVertexIndex()){
		LogUtils.log("vertexindex not same");
		return;
	}
	
	value.getIndices().copy(copyFrom.getIndices());
	value.getWeights().copy(copyFrom.getWeights());
	setValue(value);
	
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:16,代码来源:VertexBoneDataEditor.java

示例10: setSkelton

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
public void setSkelton(Skeleton skeleton){
	checkNotNull(skeleton,"need skelton");
	List<SkeltonBoneData> boneDatas=SkeletonUtils.skeltonToBoneData(skeleton);
	if(boneDatas==null){
		LogUtils.log("somehow skelton convert faild");
		return;
	}
	boneIndexBox.setValue(boneDatas.get(0));
	boneIndexBox.setAcceptableValues(boneDatas);
	resetAnimation();
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:12,代码来源:QuickBoneAnimationWidget.java

示例11: execBoneIndicesReplace

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
protected void execBoneIndicesReplace() {
	AnimationBone srcBone=boneReplaceSrcBox.getValue();
	AnimationBone destBone=boneReplaceDestBox.getValue();
	if(srcBone==null || destBone==null){
		LogUtils.log("execBoneIndicesReplace:null bone");
		return;
	}
	if(srcBone==destBone){
		LogUtils.log("execBoneIndicesReplace:same bone");
		return;
	}
	
	int srcIndex=baseCharacterModelBones.indexOf(srcBone);
	int destIndex=baseCharacterModelBones.indexOf(destBone);
	
	if(srcIndex==-1 || destIndex==-1){
		LogUtils.log("execBoneIndicesReplace:not indexOf");
		return;
	}
	
	for(int i=0;i<editingGeometry.getSkinIndices().length();i++){
		Vector4 vec4=editingGeometry.getSkinIndices().get(i);
		for(int j=0;j<4;j++){
			double value=vec4.gwtGet(j);
			if(value==srcIndex){
				vec4.gwtSet(j, destIndex);
			}
		}
	}
	
	createEditingClothSkin();
	updateSelectionBoneInfluence();
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:34,代码来源:GWTModelWeight.java

示例12: getVertexColor

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
public int getVertexColor(int vertexIndex,int boneIndex){
	
	double v=0;
	
	Vector4 indices=geometry.getSkinIndices().get(vertexIndex);
	
	if(indices==null){
		LogUtils.log("no skinIndices: at "+vertexIndex+","+(geometry.getSkinIndices()==null?"null indices":"length="+geometry.getSkinIndices().length()));
	}
	
	for(int i=0;i<4;i++){
		if(indices.gwtGet(i)==boneIndex){
			v+=geometry.getSkinWeights().get(vertexIndex).gwtGet(i);
		}
	}
	
	if(v==1){
		return 0xffffff;
	}else if(v==0){
		return 0;
	}
	
	int[] cv=toColorByDouble(v);
	
	int color=ColorUtils.toColor(cv);
	return color;
	
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:29,代码来源:BoneVertexColorTools.java

示例13: selectBone

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
private void selectBone(Object3D target) {
	
	lastSelection=-1;
	//right now off boneSelectionMesh
	double boneSelectionSize=0.1*baseScale;
	if(boneSelectionMesh==null){
		boneSelectionMesh=THREE.Mesh(THREE.BoxGeometry(boneSelectionSize, boneSelectionSize, boneSelectionSize), THREE.MeshLambertMaterial(
				GWTParamUtils.MeshLambertMaterial().color(0x00ff00)
				));
		boneAndVertex.add(boneSelectionMesh);
	}else{
		
	}
	
	boneSelectionMesh.setVisible(false);//temporaly
	boneSelectionMesh.setPosition(target.getPosition());
	
	changeBoneSelectionColor(target.getName());
	
	
	selectionBoneIndex=findBoneIndex(target.getName());
	
	boneListBox.setSelectedIndex(selectionBoneIndex);
	selectVertexsByBone(selectionBoneIndex);
	
	int selectionIndex=indexWeightEditor.getArrayIndex();
	
	
	if(vertexMeshs.size()<=selectionIndex){
		LogUtils.log("some how vertexMesh index problem:"+vertexMeshs.size());
		return;
	}
	
	if(selectionIndex!=-1 && !vertexMeshs.get(selectionIndex).isVisible()){
		indexWeightEditor.setAvailable(false);
		updateWeightButton.setEnabled(false);
		boneSelectionIndicateBoxMesh.setVisible(false);
	}
	
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:41,代码来源:CopyOfGWTModelWeight.java

示例14: setWeigthFromGeometry

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
private void setWeigthFromGeometry(Geometry geometry) {
	//loadedGeometry
	//LogUtils.log(geometry);
	//LogUtils.log(geometry.getSkinIndices());
	//LogUtils.log(""+geometry.getSkinIndices().length());
	if(geometry.getSkinIndices().length()==0){
		LogUtils.log("loaded geometry has no indices:do nothing");
		return;
	}
	
	for(int i=0;i<geometry.vertices().length();i++){
		int loadedIndex=findSameIndex(loadedGeometry.vertices(), geometry.vertices().get(i));
	//	LogUtils.log(i+" find:"+loadedIndex);
		if(loadedIndex!=-1){
			
			bodyIndices.get(loadedIndex).setX(geometry.getSkinIndices().get(i).getX());
			bodyIndices.get(loadedIndex).setY(geometry.getSkinIndices().get(i).getY());
			
			bodyWeight.get(loadedIndex).setX(geometry.getSkinWeight().get(i).getX());
			bodyWeight.get(loadedIndex).setY(geometry.getSkinWeight().get(i).getY());
			
			
		}
	}
	//LogUtils.log("updated weight:"+updated);
	updateVertexColor();
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:28,代码来源:CopyOfGWTModelWeight.java

示例15: autoWeight

import com.akjava.gwt.lib.client.LogUtils; //导入依赖的package包/类
private void autoWeight(){
	clearBodyIndicesAndWeightArray();
	LogUtils.log(loadedGeometry);
	
	//have valid skinIndices and weight use from that.
	if(GWTGeometryUtils.isValidSkinIndicesAndWeight(loadedGeometry)){
		WeightBuilder.autoWeight(loadedGeometry, bones, endSites,WeightBuilder.MODE_FROM_GEOMETRY, bodyIndices, bodyWeight);
	
		//changeAutoWeightListBox(0);
		
		//wait must be 1.0
		for(int i=0;i<bodyWeight.length();i++){
			Vector4 vec4=bodyWeight.get(i);
			double total=vec4.getX()+vec4.getY();
			double remain=(1.0-total)/2;
			//vec4.setX(vec4.getX()+remain);// i guess this is problem
			//vec4.setY(vec4.getY()+remain);
		}
		/*
		List<String> lines=new ArrayList<String>();
		for(int i=0;i<bodyWeight.length();i++){
			lines.add(i+get(bodyWeight.get(i)));
		}
		LogUtils.log("before:");
		LogUtils.log(Joiner.on("\n").join(lines));
		*/
		
	}else{
		LogUtils.log("empty indices&weight auto-weight from geometry:this action take a time");
		//can't auto weight algo change? TODO it
		WeightBuilder.autoWeight(loadedGeometry, bones, endSites,WeightBuilder.MODE_MODE_Start_And_Half_ParentAndChildrenAgressive, bodyIndices, bodyWeight);
		//changeAutoWeightListBox(1);
	}
}
 
开发者ID:akjava,项目名称:GWTModelWeight,代码行数:35,代码来源:CopyOfGWTModelWeight.java


注:本文中的com.akjava.gwt.lib.client.LogUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。