當前位置: 首頁>>代碼示例>>Java>>正文


Java ARImageNode類代碼示例

本文整理匯總了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);
    }
 
開發者ID:arpit999,項目名稱:KudanVRDemo,代碼行數:27,代碼來源:ARCameraViewActivity.java

示例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);

    }
 
開發者ID:kudan-eu,項目名稱:Marker-Basics-Android,代碼行數:18,代碼來源:ARCameraActivity.java


注:本文中的eu.kudan.kudan.ARImageNode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。