<div style="font-size: 16px;">
<p>arcore</p>
<p>by Ayusch Jain</p>
<p> 通过Ayusch Jain </p>
<h1 id="how-to-build-an-augmented-reality-android-app-with-arcore-and-android-studio"> 如何使用ARCore和Android Studio构建增强现实Android应用 <span style="font-weight: bold;">(</span>How to build an Augmented Reality Android App with ARCore and Android Studio<span style="font-weight: bold;">)</span></h1>
<blockquote>
<p>This article was originally posted <a href="http://ayusch.com/building-arcore-app-android-studio/">here</a></p>
<p> 本文最初发布<a href="http://ayusch.com/building-arcore-app-android-studio/">在这里</a> </p>
</blockquote>
<p><a href="https://ayusch.com/what-is-arcore/">In the previous post</a>, I explained <a href="https://ayusch.com/what-is-arcore/">what ARCore is</a> and how it helps developers build awesome augmented reality apps without the need to understand <strong>OpenGL</strong> or <strong>Matrix</strong> maths.</p>
<p> <a href="https://ayusch.com/what-is-arcore/">在上</a> <a href="https://ayusch.com/what-is-arcore/">一篇</a> <a href="https://ayusch.com/what-is-arcore/">文章中</a> ,我解释<a href="https://ayusch.com/what-is-arcore/">了ARCore是什么</a>以及它如何帮助开发人员构建超棒的增强现实应用程序,而无需了解<strong>OpenGL</strong>或<strong>Matrix</strong>数学。 </p>
<p>If you haven’t checked it out yet, I highly recommend doing so before moving ahead with this article and diving into ARCore app development.</p>
<p> 如果您还没有检查过,我强烈建议您这样做,然后再继续本文并深入研究ARCore应用程序开发。 </p>
<h3 id="overview"> 总览 <span style="font-weight: bold;">(</span>Overview<span style="font-weight: bold;">)</span></h3>
<p><a href="https://en.wikipedia.org/wiki/ARCore">According to Wikipedia</a>, ARCore is a software development kit developed by Google that allows for augmented reality applications to be built.</p>
<p> <a href="https://en.wikipedia.org/wiki/ARCore">根据Wikipedia的说法</a> ,ARCore是Google开发的软件开发套件,可用于构建增强现实应用程序。 </p>
<p><strong>ARCore</strong> uses three key technologies to integrate virtual content with the real environment:</p>
<p> <strong>ARCore</strong>使用三种关键技术将虚拟内容与实际环境集成在一起: </p>
<ol><li><p><strong>Motion Tracking:</strong> it allows the phone to understand its position relative to the world.</p><p> <strong>运动追踪:</strong>它可以让手机了解其相对于世界的位置。 </p></li><li><p><strong>Environmental understanding:</strong> This allows the phone to detect the size and location of all type of surfaces, vertical, horizontal and angled.</p><p> <strong>对环境的了解:</strong>这使手机可以检测所有类型的表面(垂直,水平和倾斜)的大小和位置。 </p></li><li><p><strong>Light Estimation:</strong> it allows the phone to estimate the environment’s current lighting conditions.</p><p> <strong>灯光估计:</strong>它使手机可以估计环境当前的照明条件。 </p></li></ol>
<h3 id="getting-started"> 入门 <span style="font-weight: bold;">(</span>Getting Started<span style="font-weight: bold;">)</span></h3>
<p>To get started with <strong>ARCore app</strong> development, you first need to enable ARCore in your project. This is simple as we will be using Android Studio and Sceneform SDK. There are two major operations Sceneform performs automatically:</p>
<p> 要开始进行<strong>ARCore应用程序</strong>开发,您首先需要在项目中启用ARCore。 这很简单,因为我们将使用Android Studio和Sceneform SDK。 Sceneform自动执行两个主要操作: </p>
<ol><li><p><strong>Checking for availability of ARCore</strong></p><p> <strong>检查ARCore的可用性</strong> </p></li><li><p><strong>Asking for camera permission</strong></p><p> <strong>要求相机许可</strong> </p></li></ol>
<p>You don’t need to bother with these two steps when creating an ARCore app using Sceneform SDK. But you do need to include Sceneform SDK in your project.</p>
<p> 使用Sceneform SDK创建ARCore应用时,您无需费心这两个步骤。 但是您确实需要在项目中包含Sceneform SDK。 </p>
<p>Create a new Android Studio project and select an empty activity.</p>
<p> 创建一个新的Android Studio项目并选择一个空的活动。 </p>
<p><strong>Add the following dependency to your project level build.gradle file:</strong></p>
<p> <strong>将以下依赖项添加到项目级别的build.gradle文件中:</strong> </p>
<pre class="blockcode"><code>dependencies { classpath 'com.google.ar.sceneform:plugin:1.5.0'}</code></pre>
<p><strong>Add the following to your app level build.gradle file:</strong></p>
<p> <strong>将以下内容添加到您的应用程序级别build.gradle文件中:</strong> </p>
<pre class="blockcode"><code>implementation "com.google.ar.sceneform.ux:sceneform-ux:1.5.0"</code></pre>
<p>Now sync project with Gradle files and wait for the build to finish. This will install the Sceneform SDK to the project and Sceneform plugin to <strong>AndroidStudio</strong>. It will help you to view the .<strong>sfb</strong> files. These f |
|