Mixed Reality Behaviors
Content List
- Mixed Reality Internal Behaviors > Poi Metadata Handler
- Distance Alpha Fading
- Navigation Path
- Poi Configuration
- Poi Manager
- Pose Tracking
Mixed Reality Internal Behaviors > Poi Metadata Handler
Description
Behavior attached to a poi control template to handle the meta data (i.e. the actual look of the poi) at runtime. The metadata is represented by a JSON string and sent from the PoiManager control. (see also Poi Manager 3D).
Metadata (as JSON message)
- The message itself (a JSON string) is parsed by the Poi Manager. The model can directly sent the metadata via the dedicated binding source.
- Each JSON message consists of two objects: A receiver, and the actual metadata.
- The Poi Manager receives the JSON message (or a list of messages) via data binding and forwards it to the respective POI (taken from the “receiver” object in the message)
- However, also in the PoiData structure is space for a metadata string. The latter is used for initialization of the POI, when it is first requested. Using metadata updates could also be used to track the position of POIs, if they were moving.
Within the metadata JSON object the currently supported objects are:
| Identifier | Type | JSON example |
|---|---|---|
| name | string | { “name”: “Main Street” } |
| icon | string | { “icon”: “Hotel” } |
| open_now | bool | { “open_now”: true } |
| rating | double [0;5] | { “rating”: 3.1 } |
| price_level | double [0;3] | { “price_level”: 2.6 } |
| info_text | string | { “info_text”: “whatever” } |
This can be arbitrarily extended by a custom PoiManager behavior.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| IconNodes | FeatStd::IconNodeTypes | A process value event is sent to this nodes, if a respective poi update event arrives. |
| NameNodes | NameNodesType | A process value event is sent to this nodes, if a respective poi update event arrives. |
| OpenNowNodes | OpenNowNodesType | A process value event is sent to this nodes, if a respective poi update eventarrives. |
| RatingNodes | RatingNodesType | A process value event is sent to this nodes, if a respective poi update eventarrives. |
| PriceLevelNodes | PriceLevelNodesType | A process value event is sent to this nodes, if a respective poi update event arrives. |
| InfoTextNodes | InfoTextNodesType | A process value event is sent to this nodes, if a respective poi update event arrives. |
Distance Alpha Fading
Description
Distance Alpha Fading is a Behavior Building Block available in Construction Kit.
It receives a value representing the camera position and performs arithmetic operations on it to calculate target node alpha value.
The following operations are performed on input value:
- Map (scale) value from initial range (default 0.00..100.00) to target range (default 0.00..1.00)
- Negate scaled value (changes the range to 0.00..-1.00) by multiplication (default multiplicand is -1.00)
- Increase negated value (changes the range to 1.00..0.00) by addition (default addend is +1.00)
-
Sets calculated alpha value on target node using Set Alpha Value
Common Properties
| Property Name | Type | Description |
|---|---|---|
| Input Min | FeatStd::Optional<FeatStd::Variant>, FeatStd::Float expected | This minimum value has to be set for input value scaling to take effect. |
| Input Max | FeatStd::Optional<FeatStd::Variant>, FeatStd::Float expected | This maximum value has to be set for input value scaling to take effect. |
| Multiplication Value | FeatStd::Variant, FeatStd::Float expected | Multiplies received value by this number (after scaling). |
| Addition Value | FeatStd::Variant, FeatStd::Float expected | Adds this number to received value (after multiplication). |
| Target Node | Candera::AbstractNodePointer | Target node that will have its alpha value set. |
Navigation Path
Description
Common Properties
| Property Name | Type | Description |
|---|---|---|
| ColorMode | ColorMode::Enum | Select how color is displayed |
| Color | Candera::Color | Determines the color of the mesh. |
| Width | FeatStd::Float | Determines the width of the mesh. |
| Length | FeatStd::Float | Determines the length of the mesh. |
| YOffset | FeatStd::Float | Applies y-offset to the mesh. |
| InputPoints | CgiStudioControl::Internal::AR::ArPoint | This property is used to bind input points. |
| InputPointMinDistance | FeatStd::Float | Minimum distance of two control points. Input points that are closer together will be rejected. |
| InputPointHandling | InputPointHandling::Enum | Determines how new input points are used for the mesh. |
| ReqFragmentSize | FeatStd::SizeType | Size of the fragment that is requested from the input point list. |
| ReqThresholdDistance | FeatStd::Float | If the distance between camera and the last point is below this threshold, request a new fregment of input points. |
| InterpolationType | InterpolationType::Enum | Determines which interpolation method is used. |
| MeshType | MeshType::Enum | Determines which primitive type is used. |
| PointSize | FeatStd::Float | Determines the point size. |
| NumOfRowsPerInputPoint | FeatStd::SizeType | Determines how many vertex rows are used to interpolate between two input points. Increasing this value makes the mesh smoother, but will also shorten the distance of the overlay, as number of vertices per row remain constant. |
| NumOfVertexRows | FeatStd::SizeType | Amount of vertical vertices in the mesh. |
| NumOfVertexColums | FeatStd::SizeType | Amount of horizontal vertices in the mesh. |
| IsAdvanced | bool | Enables advanced settings of the behavior. |
Poi Configuration
Description
Behavior that configures the mapping of a name to a assetId, such that it can be found by the PoiFactory.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| PoiName | FeatStd::String | Name of this poi |
| PoiControlAssetId | Candera::Id | ID of the control that is assosiated with PoiName. |
Poi Manager
Description
Manager of the poi control nodes.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| StreetPoints | CgiStudioControl::Internal::AR::ArPoint | List of points of the street. Used to align the rotation of pois. |
| StreetPointsMinDistance | FeatStd::Float | Minimum distance between two street points. Street points that are closer together will be rejected. |
| ReqDistance | FeatStd::Float | The distance in which pois are requested from the model. |
| ReqThresholdDistance | FeatStd::Float | Once the camera has moved this specified distance a new request will be sent. |
| PoiMetaData | Candera::ArrayProperty<FeatStd::String> | Use databinding to receive metadata updates for the POIs |
Pose Tracking
Description
The behavior receives rotation and position updates via data binding and apply these values directly to its own position and rotation.
Common Properties
| Property Name | Type | Description |
|---|---|---|
| TargetNode | Candera::AbstractNodePointer | On this node the pose update will be applied. If nothing is specified the current node will be used as target. |
| Position | Candera::Vector3 | Position on the target node. |
| Rotation | Candera::Vector3 | Rotation on the target node. |
| EnableUserControl | bool | Enable to use WASD control to navigate the camera instead of databinding. |
| EventReceivers | Candera::ArrayProperty<Candera::AbstractNodePointer> | List of nodes that will receive position and rotation update events |