|
VRay SDK for C#
|
A class which allows you to sample textures without starting a renderer. It is a simple and lightweight UV sampler which might not work with textures that require information which is obtained during the rendering process. More...
Inherits IDisposable.
Public Member Functions | |
| void | Abort () |
| This method immediately aborts continuous sampling tasks, such as sampleArea variants. This should be used for unexpected exit scenarios, such as the host application quitting. Results from sampling tasks issued immediately before Abort() will be null | |
| void | Dispose () |
| bool | ReleaseRenderer (out VRayRenderer renderer) |
| This method releases the internal renderer(if there is any). Use this method to get the VRayRenderer instance out of the sampler. More... | |
| bool | Sample (IPluginRef pluginRef, float u, float v, out AColor outResult) |
| This method samples the output of the given plugin at point (u, v). The plugin must be related to the VRayRenderer instance which has been used to set up the texture sampler. More... | |
| bool | Sample (IPluginRef pluginRef, float u, float v, out float outResult) |
| This method is an overload of Sample(). It should be used with plugins whose output is a floating point number(float textures). More... | |
| bool | Sample (IPluginRef pluginRef, float u, float v, out int outResult) |
| This method is an overload of Sample(). It should be used with plugins whose output is an integer(int textures). More... | |
| VRayImage | SampleArea (IPluginRef pluginRef, float fromU, float toU, float fromV, float toV, int width, int height) |
| This method samples an area of the output of the given plugin. The area is a rectangle with dimensions: [fromU; toU] x [fromV; toV]. More... | |
| IList< float > | SampleAreaFloat (IPluginRef pluginRef, float fromU, float toU, float fromV, float toV, int width, int height) |
| This method samples an area of the output of the given plugin. The sampled region(it is a rectangle) has dimensions: [fromU; toU] x [fromV; toV]. More... | |
| IList< int > | SampleAreaInt (IPluginRef pluginRef, float fromU, float toU, float fromV, float toV, int width, int height) |
| This method is almost the same as SampleAreaFloat(). The only difference is that it should be used with plugins whose output is an integer(int textures). More... | |
| bool | SetupRenderer (VRayRenderer renderer) |
| This method takes a VRayRenderer instance that will be used for texture sampling. The method does not modify the passed renderer on failure. However, a successful call will make the renderer object unusable until it gets released from the sampler. More... | |
A class which allows you to sample textures without starting a renderer. It is a simple and lightweight UV sampler which might not work with textures that require information which is obtained during the rendering process.
| bool VRay.UVTextureSampler.ReleaseRenderer | ( | out VRayRenderer | renderer | ) |
This method releases the internal renderer(if there is any). Use this method to get the VRayRenderer instance out of the sampler.
| renderer | The released renderer. It is set to null if currently there is no renderer in the sampler. |
| bool VRay.UVTextureSampler.Sample | ( | IPluginRef | pluginRef, |
| float | u, | ||
| float | v, | ||
| out AColor | outResult | ||
| ) |
This method samples the output of the given plugin at point (u, v). The plugin must be related to the VRayRenderer instance which has been used to set up the texture sampler.
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns AColor as a result. |
| u | The u-coordinate of the sample point. |
| v | The v-coordinate of the sample point. |
| outResult | The result of the sampling. |
| bool VRay.UVTextureSampler.Sample | ( | IPluginRef | pluginRef, |
| float | u, | ||
| float | v, | ||
| out float | outResult | ||
| ) |
This method is an overload of Sample(). It should be used with plugins whose output is a floating point number(float textures).
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns float as a result. |
| u | The u-coordinate of the sample point. |
| v | The v-coordinate of the sample point. |
| outResult | The result of the sampling. |
| bool VRay.UVTextureSampler.Sample | ( | IPluginRef | pluginRef, |
| float | u, | ||
| float | v, | ||
| out int | outResult | ||
| ) |
This method is an overload of Sample(). It should be used with plugins whose output is an integer(int textures).
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns int as a result. |
| u | The u-coordinate of the sample point. |
| v | The v-coordinate of the sample point. |
| outResult | The result of the sampling. |
| VRayImage VRay.UVTextureSampler.SampleArea | ( | IPluginRef | pluginRef, |
| float | fromU, | ||
| float | toU, | ||
| float | fromV, | ||
| float | toV, | ||
| int | width, | ||
| int | height | ||
| ) |
This method samples an area of the output of the given plugin. The area is a rectangle with dimensions: [fromU; toU] x [fromV; toV].
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns AColor as a result. |
| fromU | The u-coordinate from which to sample. |
| toU | The u-coordinate to which to sample. |
| fromV | The v-coordinate from which to sample. |
| toV | The v-coordinate to which to sample. |
| width | The width of the resulting VRayImage. |
| height | The height of the resulting VRayImage. |
| IList< float > VRay.UVTextureSampler.SampleAreaFloat | ( | IPluginRef | pluginRef, |
| float | fromU, | ||
| float | toU, | ||
| float | fromV, | ||
| float | toV, | ||
| int | width, | ||
| int | height | ||
| ) |
This method samples an area of the output of the given plugin. The sampled region(it is a rectangle) has dimensions: [fromU; toU] x [fromV; toV].
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns float as a result(float textures). |
| fromU | The u-coordinate from which to sample. |
| toU | The u-coordinate to which to sample. |
| fromV | The v-coordinate from which to sample. |
| toV | The v-coordinate to which to sample. |
| width | The width of the sample area, which determines the sample step(resolution) of the u-coordinate. |
| height | The height of the sample area, which determines the sample step(resolution) of the v-coordinate. |
| IList< int > VRay.UVTextureSampler.SampleAreaInt | ( | IPluginRef | pluginRef, |
| float | fromU, | ||
| float | toU, | ||
| float | fromV, | ||
| float | toV, | ||
| int | width, | ||
| int | height | ||
| ) |
This method is almost the same as SampleAreaFloat(). The only difference is that it should be used with plugins whose output is an integer(int textures).
| pluginRef | The plugin whose output(main or alternative) will be sampled and which returns int as a result(int textures). |
| fromU | The u-coordinate from which to sample. |
| toU | The u-coordinate to which to sample. |
| fromV | The v-coordinate from which to sample. |
| toV | The v-coordinate to which to sample. |
| width | The width of the sample area, which determines the sample step(resolution) of the u-coordinate. |
| height | The height of the sample area, which determines the sample step(resolution) of the v-coordinate. |
| bool VRay.UVTextureSampler.SetupRenderer | ( | VRayRenderer | renderer | ) |
This method takes a VRayRenderer instance that will be used for texture sampling. The method does not modify the passed renderer on failure. However, a successful call will make the renderer object unusable until it gets released from the sampler.
| renderer | The renderer which will be used for sampling. |