SceneView

کلاس عمومی SceneView
زیر کلاس های مستقیم شناخته شده

Sceneform SurfaceView که رندر و تعامل با صحنه را مدیریت می کند.

کلاس های تو در تو

رابط SceneView.AnimationTimeTransformer یک تبدیل از زمان Choreographer به زمان انیمیشن را تعریف می کند.

ثابت های ارثی

فیلدهای ارثی

سازندگان عمومی

SceneView ( زمینه زمینه)
یک شی SceneView می سازد و آن را به یک زمینه Android متصل می کند.
SceneView ( زمینه زمینه، مشخصات AttributeSet )
یک شی SceneView می سازد و آن را به یک زمینه Android متصل می کند.

روش های عمومی

خالی
نابود کردن ()
برای خروج از Sceneform لازم است.
فضای خالی ساکن
نابود کردن همه منابع ()
بلافاصله تمام منابع رندر را آزاد می کند، حتی اگر در حال استفاده باشد.
خالی
enableDebug (فعال کردن بولی)
اگر فعال باشد، تجسم های مختلفی برای اشکال زدایی ارائه می دهد.
صحنه
getScene ()
Sceneform Scene ایجاد شده توسط این نما را برمی گرداند.
بولی
isDebugEnabled ()
نشان می دهد که آیا اشکال زدایی برای این نما فعال است یا خیر.
بولی
onTouchEvent ( MotionEvent motionEvent)
خالی
مکث ()
Pause Sceneform که رشته رندر را متوقف می کند.
طولانی استاتیک
ReclaimReleasedResources ()
منابع رندر آماده برای جمع آوری زباله را منتشر می کند

هر فریم را برای جمع آوری منابع استفاده نشده فراخوانی کرد.

خالی
رزومه ()
Resume Sceneform که رشته رندر را از سر می گیرد.
خالی
setAnimationTimeTransformer ( SceneView.AnimationTimeTransformer animationTimeTransformer)
برای کنترل نرخ پخش انیمیشن، مشتری SceneView می‌تواند عملکردی برای به‌روزرسانی زمان مکان‌نمای کلی انیمیشن ارائه کند.
خالی
setBackground (پس زمینه قابل ترسیم )
پس زمینه را روی یک Drawable مشخص تنظیم کنید یا پس زمینه را حذف کنید.
خالی
startMirroringToSurface ( سطح سطح، سمت چپ، پایین، عرض، ارتفاع داخلی)
برای گرفتن محتویات این نما، Surface را تعیین کنید که این SceneView باید روی آن منعکس شود.
خالی
stopMirroringToSurface ( سطح سطح)
هنگامی که عکسبرداری کامل شد، این روش را فراخوانی کنید تا بازتاب SceneView در Surface مشخص شده متوقف شود.

روش های ارثی

سازندگان عمومی

نمای عمومی ( زمینه زمینه)

یک شی SceneView می سازد و آن را به یک زمینه Android متصل می کند.

مولفه های
متن نوشته متن Android برای استفاده
همچنین ببینید

عمومی SceneView ( زمینه زمینه، AttributeSet attrs)

یک شی SceneView می سازد و آن را به یک زمینه Android متصل می کند.

مولفه های
متن نوشته متن Android برای استفاده
attrs Android AttributeSet برای ارتباط با

روش های عمومی

خلأ عمومی از بین بردن ()

برای خروج از Sceneform لازم است.

معمولاً از onDestroy ().

پویایی عمومی استاتیک نابود همه منابع ()

بلافاصله تمام منابع رندر را آزاد می کند، حتی اگر در حال استفاده باشد.

اگر چیزی بیشتر در این صحنه یا هر صحنه دیگری رندر نمی شود از این استفاده کنید و حافظه باید فوراً آزاد شود.

public void enableDebug (فعال کردن بولی)

اگر فعال باشد، تجسم های مختلفی برای اشکال زدایی ارائه می دهد.

مولفه های
فعال کردن درست برای فعال کردن تجسم اشکال زدایی، غلط برای غیرفعال کردن آن.

صحنه عمومی getScene ()

Sceneform Scene ایجاد شده توسط این نما را برمی گرداند.

بولین عمومی isDebugEnabled ()

نشان می دهد که آیا اشکال زدایی برای این نما فعال است یا خیر.

بولین عمومی onTouchEvent ( MotionEvent motionEvent)

مولفه های
motionEvent

مکث خالی عمومی ()

Pause Sceneform که رشته رندر را متوقف می کند.

معمولاً از onPause() فراخوانی می شود.

عمومی استاتیک طولانی reclaimReleasedResources ()

منابع رندر آماده برای جمع آوری زباله را آزاد می کند

هر فریم را برای جمع آوری منابع استفاده نشده فراخوانی کرد. ممکن است به صورت دستی برای انتشار منابع پس از توقف رندر فراخوانی شود.

برمی گرداند
  • تعداد منابع در حال استفاده

رزومه خالی عمومی ()

Resume Sceneform که رشته رندر را از سر می گیرد.

معمولاً از onResume().

پرتاب می کند
CameraNotAvailableException

public void setAnimationTimeTransformer ( SceneView.AnimationTimeTransformer animationTimeTransformer)

To control the animation playback rate, the SceneView customer can supply a function to return the time to update the global animation cursor time. Note that the returned times must be monotonically increasing.

مولفه های
animationTimeTransformer The transform to apply to the nano frame times generated from the Choreographer to generate the animation update time. Note that the default implementation uses the Choreographer time untransformed. If overridden during playback, the returned times must still monitonically increase from the previous values that were returned (ie the Choreographer values). The input nano time can be used to ensure that returned times never decrease.

public void setBackground ( Drawable background)

Set the background to a given Drawable , or remove the background. If the background is a ColorDrawable , then the background color of the Scene is set to getColor() (the alpha of the color is ignored). Otherwise, default to the behavior of setBackground(Drawable) .

مولفه های
background

public void startMirroringToSurface ( Surface surface, int left, int bottom, int width, int height)

To capture the contents of this view, designate a Surface onto which this SceneView should be mirrored. Use getSurface() , createInputSurface() or createPersistentInputSurface() to obtain the input surface for recording. This will incur a rendering performance cost and should only be set when capturing this view. To stop the additional rendering, call stopMirroringToSurface.

مولفه های
surface the Surface onto which the rendered scene should be mirrored.
left the left edge of the rectangle into which the view should be mirrored on surface.
bottom the bottom edge of the rectangle into which the view should be mirrored on surface.
width the width of the rectangle into which the SceneView should be mirrored on surface.
height the height of the rectangle into which the SceneView should be mirrored on surface.

public void stopMirroringToSurface ( Surface surface)

When capturing is complete, call this method to stop mirroring the SceneView to the specified Surface . If this is not called, the additional performance cost will remain.

The application is responsible for calling release() on the Surface when done.

مولفه های
surface