本文整理匯總了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);
}