Calculation¶
CalculateObjectsCenter¶
Calculate objects center.
Name | Required | Default | Description |
---|---|---|---|
Object Reference | Yes | Object Reference | |
offset | No | [0,0,0] |
Offset to calculated result |
toBuffer | Yes | Buffer to save result |
Example
1 2 3 4 5 | {
"cmd": "CalculateObjectsCenter",
"fromBuffer": "selected objects",
"toBuffer": "center_location"
}
|
CalculateWorldToViewport¶
Given world coordinate, calculate 3D viewpoint coordinate. Note, 3D viewpoint coordinate is different from screen coordinate.
Name | Required | Description |
---|---|---|
Object Reference | Yes | Object Reference |
pos | No | Position in world coordinate. |
fromBuffer | No | Buffer of world coordinate |
toBuffer | Yes | Save calculate result to buffer |
Example
1 2 3 4 5 | {
"cmd": "CalculateWorldToViewport",
"pos": [89,3,45],
"toBuffer": "2DCord"
}
|