如何在AR Core中的单个3D对象上加载多个2D纹理?

时间:2018-03-29 16:02:00

标签: android augmented-reality arcore android-augmented-reality

如何在AR Core enter image description here

中的单个3D对象上加载多个2D纹理

2 个答案:

答案 0 :(得分:0)

它与arcore无关。您的问题的答案基于您正在使用的3D引擎。 Arcore不是3d引擎

答案 1 :(得分:0)

private void drawObj(ObjectRenderer mVirtualObject2,float [] viewmtx,float [] projmtx,float lightIntensity){

    for (Anchor anchor : anchors) {
        if (anchor.getTrackingState() != TrackingState.TRACKING) {
            continue;
        }
        // Get the current pose of an Anchor in world space. The Anchor pose is updated
        // during calls to session.update() as ARCore refines its estimate of the world.
        anchor.getPose().toMatrix(mAnchorMatrix, 0);

        // Update and draw the model and its shadow.
        mVirtualObject2.updateModelMatrix(mAnchorMatrix, 1);
        mVirtualObject2.draw(viewmtx, projmtx, lightIntensity);
    }
}