Use the Trajectory List Box 3D node to create scrollable lists of items arranged along a trajectory. Kanzi Studio comes with a several types of trajectories you can use. When you need a different type of trajectory, you can create a spline trajectory in a third-party tool and import it to your Kanzi Studio project. See Trajectories.
The items in a Trajectory List Box 3D node appear in the order you add them to the Trajectory List Box 3D node. To select an item in a Trajectory List Box 3D node click or tap the item.
The size of the trajectory defines the interactive area for click and drag gestures. If the trajectory is too small, users will not be able to select the items in the Trajectory List Box 3D node. To avoid this, make sure the trajectory is large enough. See Trajectories.
Note that items in all list box nodes (Grid List Box nodes and Trajectory List Box 3D node) are not its child nodes, even though in Kanzi Studio it seems so when you add items to a list box. Because list box items are not child nodes of a list box, you cannot refer to these items from outside of a list box using paths or aliases. If you need to refer from a list box item to an object outside of a list box, use bindings and aliases. See Binding to properties outside of a Trajectory List Box 3D node and Navigating to Page nodes from a Trajectory List Box 3D node.
Trajectory List Box 3D node is an interactive version of the Trajectory Layout nodes. See Using the Trajectory Layout nodes.
To create a Trajectory List Box 3D node:
to enter the Analyze mode, right-click
, and select Debug objects.
You can fine tune the mechanics of a list box. You can set the list box to:




Change the appearance of the items based on their location on the trajectory. To set how the items look at different points on the trajectory, use the Item Area Begin and Item Area End properties. You use the Item Area Begin and Item Area End properties to set the value of the Visible Amount In Parent property, which sets shaders to change the appearance of an item based on the location of that object in the list box.
For example, if you use the Visible Amount In Parent property to gradually change the visibility of an item, set the Item Area Begin property to a larger value and the Item Area End property to a smaller value. This way you limit the area where that item is visible.
Use an alias when you want to bind a property of a list box item to a property of a node outside of the list box.
For example, if you have a Grid List Box 3D or a Trajectory List Box 3D node with a Text Block 3D node item and want to set the Text property value of the Text Block 3D node to a value of an Empty Node 3D node property that is not in the list box:
{#Empty Node 3D/TextBlockConcept.Text}Use an alias when you want to navigate to a Page node from a node that is inside a list box node. For example, if you use a Grid List Box or a Trajectory List Box 3D node to create an address book and want to show the content of an address book entry in a Page node.
To navigate to Page nodes from a list box node:





In the Preview when you click the node that contains the Navigate to Page action, you activate the Page node selected in the action.
This example shows the use of the Trajectory List Box 3D node to create an interactive scrollable list of items. The example implements a simple gallery of photos with a selection effect using an animation.
The Trajectory List Box 3D node, its Circle Trajectory, content shown in the Trajectory List Box 3D, and animation that highlights the centered photo are created in Kanzi Studio. The point of time at which a highlight-animation is launched is defined based on the scroll speed and focused item data available from the user input events that the trajectory list box component produces.
The Trajectory List Box 3D node in the example uses these features:
You can find the example in the <KanziWorkspace>/Examples/Trajectory_list_box directory.
To create a Trajectory List Box 3D:
// Create a Trajectory List Box 3D named MyListBox. TrajectoryListBox3DSharedPtr trajectoryListBox = TrajectoryListBox3D::create(domain, "MyListBox");
To set the trajectory you want the list box to use:
// Create a circle trajectory named Circle with radius of 4 device independent units. TrajectorySharedPtr trajectory = Trajectory::createCircle(Vector3(), Vector3::up(), 0.0f, 4.0f, domain, "Circle"); // Set the list box to use the trajectory. trajectoryListBox->setTrajectory(trajectory); // Increase the layout size to cover the whole trajectory. trajectoryListBox->setWidth(10.0f); trajectoryListBox->setDepth(10.0f); trajectoryListBox->setHeight(3.0f);
To add items to the list box:
// Create cube meshes and add them as items of the trajectory list box. // Items on the trajectory appear in the order you add them to the list. Model3DSharedPtr item1 = Model3D::createCube(domain, "item1", 1.0f, ThemeRed); Model3DSharedPtr item2 = Model3D::createCube(domain, "item2", 1.0f, ThemeGreen); Model3DSharedPtr item3 = Model3D::createCube(domain, "item3", 1.0f, ThemeBlue); Model3DSharedPtr item4 = Model3D::createCube(domain, "item4", 1.0f, ThemeOrange); Model3DSharedPtr item5 = Model3D::createCube(domain, "item5", 1.0f, ThemeYellow); trajectoryListBox->addItem(item1); trajectoryListBox->addItem(item2); trajectoryListBox->addItem(item3); trajectoryListBox->addItem(item4); trajectoryListBox->addItem(item5);
To make the list box loop:
// Make the list box looping. All items fit to the trajectory so they are positioned evenly. trajectoryListBox->setLooping(true);
To set selection behavior:
// Make clicking items bring them to the center of the trajectory. trajectoryListBox->setSelectionBehavior(ListBoxConcept::SelectionBehaviorBringToCenter); // Change the position where the clicked items are brought to be one quarter from the beginning of the trajectory. trajectoryListBox->setCursorOffset(0.25f);
For details, see the API reference.
Using the Trajectory Layout nodes
Using the Trajectory List Box 3D node
Using the List Box Item Container prefabs