Return type |
Description |
int2
|
view.resolution([int camIndex])
Returns the viewport resolution in pixels of the camera at index camIndex.
A camera rendering into a 1920x1024 viewport will return int2(1920,1024)
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns int2(1,1)
|
float
|
view.aspect([int camIndex])
Returns the viewport aspect-ratio of the camera at index camIndex.
Equivalent to view.resolution(a).x / float(view.resolution(a).y);
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns 1.0
|
float
|
view.fov([int camIndex])
Returns the field-of-view angle of the camera at index camIndex.
Equivalent to max(view.fovHorizontal(a), view.fovVertical(a))
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns pi/2
|
float
|
view.fovHorizontal([int camIndex])
Returns the horizontal field-of-view angle in radians of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns pi/2
|
float
|
view.fovVertical([int camIndex])
Returns the vertical field-of-view angle in radians of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns pi/2
|
float3
|
view.unproject(float3 clipSpacePos[, int camIndex])
Returns the world-space un-projection of clip-space vector clipSpacePos using camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns float3(0,0,0)
|
float3
|
view.unprojectedAxis(float2 screenPos[, int camIndex])
Returns the normalized axis of the ray that goes from the camera origin through the camera plane at coordinates screen-space coordinates screenPos using camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns float3(infinity)
|
float3
|
view.project(float3 worldPos[, int camIndex])
Returns the clip-space projection of world-space vector worldPos using camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns float3(0,0,0)
|
bool
|
view.isVisiblePoint(float3 worldPos[, int camIndex])
Returns true when worldPos is visible from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns false
|
bool
|
view.isVisibleSphere(float3 center, float3 radius[, int camIndex])
Returns true when the sphere with center center and radius radius is visible from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns false.
This method is fast at the cost of occasional false-positives.
|
bool
|
view.isVisibleBox(float3 minCorner, float3 maxCorner[, int camIndex])
Returns true when the axis-aligned box defined by its opposite corner points minCorner & maxCorner is visible from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns false.
This method is fast at the cost of occasional false-positives.
|
bool
|
view.isPointOutsidePlane(float3 worldPos, int planeIndex[, int camIndex])
Returns true when worldPos is outside of the plane of index planeIndex from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns true.
The planes are numbered this way :
- 0 Plane Left
- 1 Plane Right
- 2 Plane Top
- 3 Plane Bottom
- 4 Plane Near
- 5 Plane Far
|
bool
|
view.isSphereOutsidePlane(float3 center, float3 radius, int planeIndex[, int camIndex])
Returns true when the sphere with center center and radius radius is outside of the plane of index planeIndex from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns true.
The planes are numbered this way :
- 0 Plane Left
- 1 Plane Right
- 2 Plane Top
- 3 Plane Bottom
- 4 Plane Near
- 5 Plane Far
|
bool
|
view.isBoxOutsidePlane(float3 minCorner, float3 maxCorner, int planeIndex[, int camIndex])
Returns true when the axis-aligned box defined by its opposite corner points minCorner & maxCorner is outside of the plane of index planeIndex from the view frustrum of the camera at index camIndex.
If camIndex is not specified, uses the default camera (index 0).
If no cameras are registered, returns true.
The planes are numbered this way :
- 0 Plane Left
- 1 Plane Right
- 2 Plane Top
- 3 Plane Bottom
- 4 Plane Near
- 5 Plane Far
|