本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}