Renderer3dGraphic (クラス)
public Renderer3dGraphic {inherits DrawableGraphic}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.
直接継承しているサブクラス: SceneGraphic

高度な 3D レンダリング機能へのアクセスを提供します。

説明

Renderer3dGraphic は、高度な 3D レンダリングを実行ために役立つメカニズムを備えています。オフスクリーン Drawable を自動的に作成し、Renderer3d へのアクセスを提供します。

Renderer3dGraphic は、低レベルの 3D レンダリングに最も適しています。高レベル (保持モード) の 3D レンダリングでは、CURL.GRAPHICS.SCENE パッケージを使用する方が簡単です。このパッケージは、3D 保持モード グラフィックのインターフェイスを提供します。Scene のインスタンスは、SceneGraphic により簡単にレンダリングすることができます。

Renderer3dGraphic は、描画でコールバックベースのメカニズムを使用します。オフスクリーン Drawable を更新する必要がある場合、再ペイント プロシージャが呼び出されます。再ペイント ハンドラを提供するには、これを Renderer3dGraphic コンストラクタに渡すか、あるいは Renderer3dGraphic.repaint-handler アクセッサを使用して設定する必要があります。

コールバック中に、変更された Drawable のすべての部分を更新する必要があります。 (ほとんどのアプリケーションでは、作業を簡単にするため常に Drawable 全体を再ペイントします)。

Renderer3dGraphic は、次の 2 つの状況において再ペイント ハンドラを呼び出します。
  1. Renderer3dGraphic.update-drawable を使用し、Renderer3dGraphicDrawable の更新を行なうことを通知した場合。
  2. Drawable の内容が無効になった場合。通常、これは Renderer3dGraphic の作成時やレイアウト変更の結果として起こりますが、システム設定 (画面の解像度など) が変更された場合にも起こります。


通常の再ペイント ハンドラは、特定の色に Drawable をクリアする呼び出しと、それに続くレンダリング呼び出しで構成されます。

レンダリングは、Renderer3d インターフェイスにより実行されます。再ペイント ハンドラ プロシージャの引数の 1 つとして Renderer3d が与えられます。再ペイント ハンドラの引数については、 Renderer3dGraphic.repaint-handler を参照してください。

アニメーションを実行する場合は、グラフィックの更新が必要になるたびに Renderer3dGraphic.update-drawable を呼び出します。Timer はこのタスクに適しています。Timer、ならびにアニメーションの他のメカニズムの使用の詳細については、『開発者ガイド』の「アニメーション」の章を参照してください。

注意事項

通常、occlusion-performance-modeOcclusionPerformanceMode.high-performance に設定するのが Renderer3dGraphic を最も速く処理する方法ですが、これにはいくつかの欠点もあります。詳細については、 Renderer3dGraphic.occlusion-performance-mode を参照してください。

また、再ペイント ハンドラ外の値をキャッシュしないでください。これは、再ペイント ハンドラ内で与えられた Renderer3dGraphic.drawableRenderer3d はその再ペイント ハンドラ内でのみ有効であり、再ペイント間で異なる場合があるためです。

コンストラクタ
default:Renderer3dGraphic を初期化します。
コンストラクタ public {Renderer3dGraphic.default
repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType = null,
draw-operation:DrawOperation = DrawOperation.source,
antialias-oversample:double = 1.0,
occlusion-performance-mode:OcclusionPerformanceMode = OcclusionPerformanceMode.best-effort,
...
}

プロパティ
repaint-handler:Drawable の更新が必要な場合に呼び出されるプロシージャ。
アクセサ public Renderer3dGraphic.repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType
セッター public Renderer3dGraphic.repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType
プロパティ 継承 DrawableGraphic: display-context, draw-operation, drawable, drawable-changed?, occlusion-performance-mode, visible?
プロパティ 継承 Graphic: avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, clip-child-shadows?, discrete-select-in-range?, enabled?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visual-parent, vorigin, width
プロパティ 継承 Visual: _style-element, clonable-class?, completely-clonable-children?, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-element, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

クラス変数と定数
RepaintHandlerProcType:repaint-handler プロシージャにおける Type の定義。
public constant Renderer3dGraphic.RepaintHandlerProcType:Type ={proc-type {graphic:Renderer3dGraphic, renderer:RENDERER3D.Renderer3d, area:#RectangleSet }:void }

メソッド
メソッド 継承 DrawableGraphic: draw, get-height-preference, get-width-preference, set-size, update-drawable
メソッド 継承 Graphic: after-reposition, attempt-revalidate-layout, before-reposition, constrain-height, constrain-width, contains-point?, create-pagination-state, detach, draw-range-as-selected, draw-shadow, end-pagination, find-ancestor, find-graphic-at, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-range-as-selected-text, get-top-left-in-ancestor, get-visible-bounds-into, graphical-child-visible-at, make-gui-mark, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paginate, paint-with-decorations, pointer-enter-occurred, pointer-leave-occurred, replace-with, request-draw, request-draw-rect, request-layout, request-pointer-trace, search-next, search-next-here, search-prev, search-prev-here, set-layout, start-pagination, xy-offset-to
メソッド 継承 Visual: add, add-from-init-args, animate, change-cursor, clear, clonable-appearance?, clone-appearance, clone-appearance-helper, find-test-children, get-focus-manager, get-gui-path-to-child, get-layout-context, get-test-parent, get-test-property, get-text, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-attached, note-caret-position, note-detaching, on-drag-leave, on-pointer-envelope-event, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, notify-option-children, option-change-notify, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, register-options, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {Renderer3dGraphic.default
repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType = null,
draw-operation:DrawOperation = DrawOperation.source,
antialias-oversample:double = 1.0,
occlusion-performance-mode:OcclusionPerformanceMode = OcclusionPerformanceMode.best-effort,
...
}

Renderer3dGraphic を初期化します。

repaint-handler: Renderer3dGraphic.repaint-handler プロシージャを設定します。このプロシージャは、 Renderer3dGraphic の再描画が必要になるたびに呼び出されます。 Renderer3dGraphic.update-drawable を呼び出して手動でトリガすることもできます。

再ペイント ハンドラの引数については、 Renderer3dGraphic.repaint-handler を参照してください。
draw-operation: Renderer3dGraphic.draw-operation 値を設定します。このパラメータは、Drawable の内容がディスプレイにどのようにコピーされるかに影響を与えます。詳細については、DrawOperation を参照してください。

現在このパラメータは、 Renderer3dGraphic.occlusion-performance-modeOcclusionPerformanceMode.high-performance に設定された場合は効果がありません。
antialias-oversample:
オーバー サンプリングができるように、Drawable をディスプレイより高い解像度で作成するよう指定できます。
この機能を使用することは推奨されません。代わりに、AntialiasedFrame 内に Renderer3dGraphic を配置します。(AntialiasedFrame 内で、または antialias-oversample を使用して) アンチエイリアス処理を行うには、Renderer3dGraphic.occlusion-performance-modeOcclusionPerformanceMode.accurate-occlusion に設定する必要があります。
AntialiasFrame は、結果の Drawable が大きすぎないよう処理します。一方、antialias-oversample および Renderer3dGraphic では通常このような処理は行われません。
occlusion-performance-mode: occlusion-performance-modeOcclusionPerformanceMode.high-performance に設定すると、ウィンドウ生成の最適化が有効になり、通常は Renderer3dGraphic の速度がかなり増加します。詳細については、 Renderer3dGraphic.occlusion-performance-mode および OcclusionPerformanceMode を参照してください。

注意事項

作成方法の詳細については、Graphic.default を参照してください。特に、イベント処理 (マウスまたはキーボード入力の処理など) は、標準 GUI toolkit メカニズムを介して実行されます。



プロパティ詳細
repaint-handler (アクセサ)
アクセサ public Renderer3dGraphic.repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType
セッター public Renderer3dGraphic.repaint-handler:#Renderer3dGraphic.RepaintHandlerProcType

Drawable の更新が必要な場合に呼び出されるプロシージャ。

説明

再ペイント ハンドラには次の引数が渡されます。

  1. Renderer3dGraphic :再ペイント プロシージャを呼び出す Renderer3dGraphic。これを使用して、Renderer3dGraphic.drawable から Drawable にアクセスできます。
  2. Renderer3d :この Renderer3dGraphicDrawable への描画に使用できる Renderer3d
  3. RectangleSet :"dirty" 領域、つまり更新が必要な四角形のセットを示す RectangleSet。この引数が null の場合、Drawable 全体を更新する必要があります。
    この引数を無視して、再ペイント ハンドラが呼び出されるたびに Drawable 全体を再ペイントすることもできます。ただし、可能な場合にはこれらの領域に描画を制限する方が処理が速くなります。


これらの引数は、再ペイント ハンドラ外で使用しないでください。また、後で使用する目的でキャッシュしないでください。たとえば、再ペイント ハンドラが呼び出されるたびに同じ Renderer3d が渡されるとは限りません。

注意事項

プロシージャが null の場合、Drawable の状態に関わらず何も描画されません。

Renderer3dGraphic.update-drawable を呼び出して、再ペイントをトリガすることができます。

repaint-handler を設定すると、 Renderer3dGraphic.update-drawable への呼び出しがトリガされます。



クラス変数と定数の詳細
RepaintHandlerProcType (クラス定数)
public constant Renderer3dGraphic.RepaintHandlerProcType:Type ={proc-type {graphic:Renderer3dGraphic, renderer:RENDERER3D.Renderer3d, area:#RectangleSet }:void }

repaint-handler プロシージャにおける Type の定義。





メソッド詳細