setvector
- Last UpdatedMay 02, 2023
- 2 minute read
The setvector statement enables the performance of operations on SVEC3 fields or locals.
Platform support
This node is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-Portable WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
Full support |
|
|
|
|
|
|
Available operations
These are the operations performed by this command.
|
Operation |
Vectors |
Matrix |
Description |
|---|---|---|---|
|
transform |
1 |
Requested |
Applies matrix transformation on vector. |
Code example
This is a code example for the setvector statement.
<command name="showmenu">
<local name="m1" type="smatrix" />
<local name="vec1" type="svec3" value="0 0.5 0" />
<local name="vecFinal" type="svec3" value="0 0 0" />
<setvector name="%vecFinal%" op="transform" matrix="%m1%" vector="%vec1%" />
<!-- ... -->
</command>
Fields
These are the fields for setvector statement.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
matrix |
sstring |
Mandatory |
No default value |
The name of the SMATRIX field used to perform the operation. |
|
name |
sstring |
Mandatory |
No default value |
The name of the SVEC3 field to which to copy the operation result. |
|
op |
sstring |
Mandatory |
No default value |
The vector operation. The only available option is Transform. |
|
vector |
sstring |
Mandatory |
No default value |
The name of the SVEC3 field on which to perform the operation. |