ArSceneView

পাবলিক ক্লাস ArSceneView

একটি সারফেসভিউ যা ARCore-এর সাথে একীভূত হয় এবং একটি দৃশ্য রেন্ডার করে।

উত্তরাধিকার সূত্রে প্রাপ্ত ধ্রুবক

উত্তরাধিকারসূত্রে প্রাপ্ত ক্ষেত্র

পাবলিক কনস্ট্রাক্টর

ArSceneView ( প্রসঙ্গ প্রসঙ্গ)
একটি ArSceneView অবজেক্ট তৈরি করে এবং এটি একটি Android প্রসঙ্গে আবদ্ধ করে।
ArSceneView ( প্রসঙ্গ প্রসঙ্গ, AttributeSet attrs)
একটি ArSceneView অবজেক্ট তৈরি করে এবং এটি একটি Android প্রসঙ্গে আবদ্ধ করে।

পাবলিক পদ্ধতি

ফ্রেম
getArFrame ()
যদি পাওয়া যায় তাহলে সাম্প্রতিকতম ARCore ফ্রেম ফেরত দেয়।
int
getCameraStreamRenderPriority ()
রেন্ডার অগ্রাধিকার পান যা ক্যামেরা স্ট্রিম রেন্ডার করার ক্রম নিয়ন্ত্রণ করে।
প্লেন রেন্ডারার
getPlaneRenderer ()
প্ল্যানরেন্ডারার রিটার্ন করে, প্লেন ভিজ্যুয়ালাইজেশন নিয়ন্ত্রণ করতে ব্যবহৃত হয়।
সেশন
getSession ()
এই ভিউ দ্বারা ব্যবহৃত ARCore সেশন প্রদান করে।
বুলিয়ান
পরিবেশগতHdrলাইটিং উপলব্ধ ()
ARCore ক্যামেরা Config.LightEstimationMode.ENVIRONMENTAL_HDR এর সাথে কনফিগার করা থাকলে সত্য দেখায়।
বুলিয়ান
লাইট ডিরেকশনআপডেট সক্ষম ()
এনভায়রনমেন্টাল এইচডিআর লাইটিং অনুমানের উপর ভিত্তি করে প্রতিটি ফ্রেমে সূর্যালোক আপডেট করা হচ্ছে কিনা তা পরীক্ষা করে।
বুলিয়ান
অকার্যকর
বিরতি ()
রেন্ডারিং থ্রেড এবং ARCore সেশন বিরাম দেয়।
সম্পূর্ণ ভবিষ্যৎ < অকার্যকর >
pauseAsync ( নির্বাহক নির্বাহক)
রেন্ডারিং থ্রেড এবং ARCore সেশন পজ করার জন্য নন-ব্লকিং কল।
অকার্যকর
পুনরায় শুরু ()
রেন্ডারিং থ্রেড এবং ARCore সেশন পুনরায় শুরু করে।
সম্পূর্ণ ভবিষ্যৎ < অকার্যকর >
resumeAsync ( নির্বাহক নির্বাহক)
ব্যাকগ্রাউন্ডে রেন্ডারিং থ্রেড এবং ARCore সেশন পুনরায় শুরু করার জন্য নন-ব্লকিং কল

এটি অবশ্যই onResume() থেকে কল করতে হবে।

অকার্যকর
সেটক্যামেরাস্ট্রিমরেন্ডারপ্রিয়রিটি (ইন্ট অগ্রাধিকার)
ক্যামেরা স্ট্রিম রেন্ডার করার ক্রম নিয়ন্ত্রণ করতে রেন্ডার অগ্রাধিকার সেট করুন।
অকার্যকর
setLightDirectionUpdateEnabled (বুলিয়ান isLightDirectionUpdateEnabled)
এনভায়রনমেন্টাল HDR লাইটিং থেকে তৈরি হওয়া সূর্যালোকের দিক প্রতি ফ্রেমে আপডেট করা উচিত কিনা তা সেট করে।
অকার্যকর
setLightEstimationEnabled (বুলিয়ান সক্ষম)
ক্যামেরা ফিডের উপর ভিত্তি করে হালকা অনুমান সক্ষম করুন।
অকার্যকর
সেটআপ সেশন ( সেশন সেশন)
একটি এআর সেশন দিয়ে ভিউ সেটআপ করুন।

উত্তরাধিকারসূত্রে প্রাপ্ত পদ্ধতি

পাবলিক কনস্ট্রাক্টর

সর্বজনীন ArSceneView ( প্রসঙ্গ প্রসঙ্গ)

একটি ArSceneView অবজেক্ট তৈরি করে এবং এটি একটি Android প্রসঙ্গে আবদ্ধ করে।

সঠিকভাবে রেন্ডারিং কাজ করার জন্য, setupSession(Session) করতে হবে।

পরামিতি
প্রসঙ্গ ব্যবহার করার জন্য Android প্রসঙ্গ
আরো দেখুন

public ArSceneView ( Context context, AttributeSet attrs)

Constructs a ArSceneView object and binds it to an Android Context.

In order to have rendering work correctly, setupSession(Session) must be called.

পরামিতি
context the Android Context to use
attrs the Android AttributeSet to associate with
আরো দেখুন

পাবলিক পদ্ধতি

public Frame getArFrame ()

Returns the most recent ARCore Frame if it is available. The frame is updated at the beginning of each drawing frame. Callers of this method should not retain a reference to the return value, since it will be invalid to use the ARCore frame starting with the next frame.

public int getCameraStreamRenderPriority ()

Get the render priority that control the order of rendering the camera stream. The priority is between a range of 0 (rendered first) and 7 (rendered last).

The default value is 7, which forces the camera stream to render last. This is best for performance because it prevents overdraw. However, when using a material as an occluder (for example, in the augmented faces sample), this should be changed. Otherwise, the occluder will occlude the camera stream and black will be rendered.

public PlaneRenderer getPlaneRenderer ()

Returns PlaneRenderer, used to control plane visualization.

public Session getSession ()

Returns the ARCore Session used by this view.

public boolean isEnvironmentalHdrLightingAvailable ()

Returns true if the ARCore camera is configured with Config.LightEstimationMode.ENVIRONMENTAL_HDR. When Environmental HDR lighting mode is enabled, the resulting light estimates will be applied to the Sceneform Scene.

রিটার্নস
  • true if HDR lighting is enabled in Sceneform because ARCore HDR lighting estimation is enabled.

public boolean isLightDirectionUpdateEnabled ()

Checks whether the sunlight is being updated every frame based on the Environmental HDR lighting estimate.

রিটার্নস
  • true if the sunlight direction is updated every frame, false otherwise.

public boolean isLightEstimationEnabled ()

রিটার্নস
  • returns true if light estimation is enabled.

public void pause ()

Pauses the rendering thread and ARCore session.

This must be called from onPause().

public CompletableFuture< Void > pauseAsync ( Executor executor)

Non blocking call to pause the rendering thread and ARCore session.

This should be called from onPause().

If pauseAsync is called while another pause or resume is in progress, the pause will be enqueued and happen after the current operation completes.

পরামিতি
executor
রিটার্নস
  • A CompletableFuture completed on the main thread on the pause has completed. The future Will will be completed exceptionally if the resume can not be done.

public void resume ()

Resumes the rendering thread and ARCore session.

This must be called from onResume().

Throws
CameraNotAvailableException if the camera can not be opened

public CompletableFuture< Void > resumeAsync ( Executor executor)

Non blocking call to resume the rendering thread and ARCore session in the background

This must be called from onResume().

If called while another pause or resume is in progress, the resume will be enqueued and happen after the current operation completes.

পরামিতি
executor
রিটার্নস
  • A CompletableFuture completed on the main thread once the resume has completed. The future will be completed exceptionally if the resume can not be done.

public void setCameraStreamRenderPriority (int priority)

Set the render priority to control the order of rendering the camera stream. The priority is between a range of 0 (rendered first) and 7 (rendered last).

The default value is 7, which forces the camera stream to render last. This is best for performance because it prevents overdraw. However, when using a material as an occluder (for example, in the augmented faces sample), this should be changed. Otherwise, the occluder will occlude the camera stream and black will be rendered.

পরামিতি
priority

public void setLightDirectionUpdateEnabled (boolean isLightDirectionUpdateEnabled)

Sets whether the sunlight direction generated from Environmental HDR lighting should be updated every frame. If false the light direction will be updated a single time and then no longer change.

This may be used to turn off shadow direction updates when they are distracting or unwanted.

The default state is true, with sunlight direction updated every frame.

পরামিতি
isLightDirectionUpdateEnabled

public void setLightEstimationEnabled (boolean enable)

Enable Light Estimation based on the camera feed. The color and intensity of the sun's indirect light will be modulated by values provided by ARCore's light estimation. Lit objects in the scene will be affected.

পরামিতি
enable set to true to enable Light Estimation or false to use the default estimate, which is a pixel intensity of 1.0 and color correction value of white (1.0, 1.0, 1.0).

public void setupSession ( Session session)

Setup the view with an AR Session. This method must be called once to supply the ARCore session. The session is needed for any rendering to occur.

The session is expected to be configured with the update mode of LATEST_CAMERA_IMAGE. Without this configuration, the updating of the ARCore session could block the UI Thread causing poor UI experience.

পরামিতি
session the ARCore session to use for this view
আরো দেখুন