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


Java DebugDraw.drawString方法代码示例

本文整理汇总了Java中org.jbox2d.callbacks.DebugDraw.drawString方法的典型用法代码示例。如果您正苦于以下问题:Java DebugDraw.drawString方法的具体用法?Java DebugDraw.drawString怎么用?Java DebugDraw.drawString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jbox2d.callbacks.DebugDraw的用法示例。


在下文中一共展示了DebugDraw.drawString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawTree

import org.jbox2d.callbacks.DebugDraw; //导入方法依赖的package包/类
public void drawTree(DebugDraw argDraw, int node, int spot, int height) {
  AABB a = m_aabb[node];
  a.getVertices(drawVecs);

  color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
  argDraw.drawPolygon(drawVecs, 4, color);

  argDraw.getViewportTranform().getWorldToScreen(a.upperBound, textVec);
  argDraw.drawString(textVec.x, textVec.y, node + "-" + (spot + 1) + "/" + height, color);

  int c1 = m_child1[node];
  int c2 = m_child2[node];
  if (c1 != NULL_NODE) {
    drawTree(argDraw, c1, spot + 1, height);
  }
  if (c2 != NULL_NODE) {
    drawTree(argDraw, c2, spot + 1, height);
  }
}
 
开发者ID:jfcameron,项目名称:G2Dj,代码行数:20,代码来源:DynamicTreeFlatNodes.java

示例2: drawTree

import org.jbox2d.callbacks.DebugDraw; //导入方法依赖的package包/类
public void drawTree(DebugDraw argDraw, DynamicTreeNode node, int spot, int height) {
  node.aabb.getVertices(drawVecs);

  color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
  argDraw.drawPolygon(drawVecs, 4, color);

  argDraw.getViewportTranform().getWorldToScreen(node.aabb.upperBound, textVec);
  argDraw.drawString(textVec.x, textVec.y, node.id + "-" + (spot + 1) + "/" + height, color);

  if (node.child1 != null) {
    drawTree(argDraw, node.child1, spot + 1, height);
  }
  if (node.child2 != null) {
    drawTree(argDraw, node.child2, spot + 1, height);
  }
}
 
开发者ID:jfcameron,项目名称:G2Dj,代码行数:17,代码来源:DynamicTree.java

示例3: drawTree

import org.jbox2d.callbacks.DebugDraw; //导入方法依赖的package包/类
public void drawTree(DebugDraw argDraw, DynamicTreeNode argNode, int spot, int height) {
	argNode.aabb.getVertices(drawVecs);
	
	color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
	argDraw.drawPolygon(drawVecs, 4, color);
	
	argDraw.getViewportTranform().getWorldToScreen(argNode.aabb.upperBound, textVec);
	argDraw.drawString(textVec.x, textVec.y, (spot + 1) + "/" + height, color);
	
	if (argNode.child1 != null) {
		drawTree(argDraw, argNode.child1, spot + 1, height);
	}
	if (argNode.child2 != null) {
		drawTree(argDraw, argNode.child2, spot + 1, height);
	}
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:17,代码来源:DynamicTree.java

示例4: drawTree

import org.jbox2d.callbacks.DebugDraw; //导入方法依赖的package包/类
public void drawTree(DebugDraw argDraw, int nodeId, int spot, int height) {
  final DynamicTreeNode node = m_nodes[nodeId];
  node.aabb.getVertices(drawVecs);

  color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
  argDraw.drawPolygon(drawVecs, 4, color);

  argDraw.getViewportTranform().getWorldToScreen(node.aabb.upperBound, textVec);
  argDraw.drawString(textVec.x, textVec.y, nodeId + "-" + (spot + 1) + "/" + height, color);

  if (node.child1 != NULL_NODE) {
    drawTree(argDraw, node.child1, spot + 1, height);
  }
  if (node.child2 != NULL_NODE) {
    drawTree(argDraw, node.child2, spot + 1, height);
  }
}
 
开发者ID:col726,项目名称:game-engine-CMZ,代码行数:18,代码来源:DynamicTree.java


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