本文整理汇总了Java中eu.kudan.kudan.ARImageNode.scaleByUniform方法的典型用法代码示例。如果您正苦于以下问题:Java ARImageNode.scaleByUniform方法的具体用法?Java ARImageNode.scaleByUniform怎么用?Java ARImageNode.scaleByUniform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eu.kudan.kudan.ARImageNode
的用法示例。
在下文中一共展示了ARImageNode.scaleByUniform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupArbiTrack
import eu.kudan.kudan.ARImageNode; //导入方法依赖的package包/类
public void setupArbiTrack() {
// Create an image node to be used as a target node
ARImageNode targetImageNode = new ARImageNode("target.png");
// Scale and rotate the image to the correct transformation.
targetImageNode.scaleByUniform(0.3f);
targetImageNode.rotateByDegrees(90, 1, 0, 0);
// Initialise gyro placement. Gyro placement positions content on a virtual floor plane where the device is aiming.
ARGyroPlaceManager gyroPlaceManager = ARGyroPlaceManager.getInstance();
gyroPlaceManager.initialise();
// Add target node to gyro place manager
gyroPlaceManager.getWorld().addChild(targetImageNode);
// Initialise the arbiTracker
ARArbiTrack arbiTrack = ARArbiTrack.getInstance();
arbiTrack.initialise();
// Set the arbiTracker target node to the node moved by the user.
arbiTrack.setTargetNode(targetImageNode);
// Add model node to world
arbiTrack.getWorld().addChild(modelNode);
}
示例2: addImageNode
import eu.kudan.kudan.ARImageNode; //导入方法依赖的package包/类
private void addImageNode() {
// Initialise image node
ARImageNode imageNode = new ARImageNode("eyebrow.png");
// Add image node to image trackable
trackable.getWorld().addChild(imageNode);
// Image scale
ARTextureMaterial textureMaterial = (ARTextureMaterial)imageNode.getMaterial();
float scale = trackable.getWidth() / textureMaterial.getTexture().getWidth();
imageNode.scaleByUniform(scale);
// Hide image node
imageNode.setVisible(false);
}