NChartRealityKitMultiView Class Reference

Inherits from NSObject
Declared in NChartRealityKitMultiView.h

Overview

The NChartRealityKitMultiView class provides methods to create multiple charts and display them with given layout on the RealityKit-based visionOS scene.

  delegate

Delegate that is supposed to handle the chart models.

@property (nonatomic, assign) id<NChartRealityKitModelDelegate> delegate

Declared In

NChartRealityKitMultiView.h

  chartCount

Number of charts.

@property (nonatomic, readonly) NSUInteger chartCount

Declared In

NChartRealityKitMultiView.h

  layouter

Layouter used to arrange charts.

@property (nonatomic, retain) NChartRealityKitLayouter *layouter

Declared In

NChartRealityKitMultiView.h

+ multiViewWithChartCount:layouter:

Create a multiview with given number of charts and layouter.

+ (NChartRealityKitMultiView *)multiViewWithChartCount:(NSUInteger)chartCount layouter:(NChartRealityKitLayouter *)layouter

Parameters

chartCount
  • count of charts to allocate.
layouter
  • layouter to arrange charts.

Return Value

new multiview instance.

Declared In

NChartRealityKitMultiView.h

– initWithChartCount:layouter:

Initialize the multiview with given number of charts.

- (id)initWithChartCount:(NSUInteger)chartCount layouter:(NChartRealityKitLayouter *)layouter

Parameters

chartCount
  • count of charts to allocate.
layouter
  • layouter to arrange charts.

Return Value

initialized multiview instance.

Declared In

NChartRealityKitMultiView.h

– chart:

Get the chart by given number.

- (NChart *)chart:(NSUInteger)index

Parameters

index
  • number of chart to get.

Return Value

chart of given index, nil if there is no chart with this number in the multiview.

Declared In

NChartRealityKitMultiView.h

– render

Render the chart using the RealityKit backend. The set of models is created and for each one, modelReadyWithPositions delegate method is triggered.

- (void)render

Declared In

NChartRealityKitMultiView.h

– dispatchTap:coords:

Dispatch the tap.

- (void)dispatchTap:(NSUInteger)index coords:(CGPoint)coords

Parameters

index
  • index of the chart to dispatch the tap to.
coords
  • normalized coordinates of the tap in the chart. These coordinates are both in [0; 1], where [0; 0] corresponds to the bottom-left and [1; 1] to the top-right corner of the chart.

Declared In

NChartRealityKitMultiView.h