本文整理汇总了Java中eu.kudan.kudan.ARImageNode类的典型用法代码示例。如果您正苦于以下问题:Java ARImageNode类的具体用法?Java ARImageNode怎么用?Java ARImageNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ARImageNode类属于eu.kudan.kudan包,在下文中一共展示了ARImageNode类的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);
}