rprContextSetCuttingPlane
Sets a cutting plane (also called clipping plane).
rpr_status rprContextSetCuttingPlane( |
rpr_context context, |
rpr_int index, |
|
rpr_float a, |
|
rpr_float b, |
|
rpr_float c, |
|
rpr_float d); |
Parameters
Parameter |
Description |
---|---|
context |
The context to set a cutting plane for. |
index |
Cutting plane index (starts from 0). |
a |
Equation plane A. |
b |
Equation plane B. |
c |
Equation plane C. |
d |
Equation plane D. |
Notes
In order to disable the ‘index’ cutting plane, set (A,B,C,D) = (0,0,0,0). By default, on context creation all cutting planes are disabled.
Index can be any number. It doesn’t need to define the list of plane as a contiguous list of indices.
If the number of enabled planes is greater than the limit supported by the renderer, then
RPR_ERROR_UNSUPPORTED
is return by the function.The normal of the equation plane points toward the area that is kept.
If several clipping planes are used the rendered area will be the one commonly facing all the planes.
Plane equation is Ax + By + Cz + D = 0
Return
Returns RPR_SUCCESS in case of success, or RPR_ERROR code if a problem was encountered.
To learn how to handle errors in AMD Radeon ProRender SDK, see Error Handling.