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.
|
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.
◆ ReleaseRenderer()
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.
- Parameters
-
renderer | The released renderer. It is set to null if currently there is no renderer in the sampler. |
- Returns
- True - on successful release and false - on failure.
◆ Sample() [1/3]
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.
- Parameters
-
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. |
- Returns
- The returned value indicates whether the sampling has been successful or not. True - on success and false - on failure
◆ Sample() [2/3]
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).
- Parameters
-
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. |
- Returns
- The returned value indicates whether the sampling has been successful or not. True - on success and false - on failure
◆ Sample() [3/3]
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).
- Parameters
-
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. |
- Returns
- The returned value indicates whether the sampling has been successful or not. True - on success and false - on failure
◆ SampleArea()
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].
- Parameters
-
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. |
- Returns
- A VRayImage with the result of the sampling. The image has dimensions: (width; height) on success or is null on failure.
◆ SampleAreaFloat()
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].
- Parameters
-
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. |
- Returns
- IList with the result, which can be treated as a 2D array with dimensions: (height rows, width cols) on success or null - on failure.
◆ SampleAreaInt()
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).
- Parameters
-
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. |
- Returns
- IList with the result, which can be treated as a 2D array with dimensions: (height rows, width cols) on success or null - on failure.
◆ SetupRenderer()
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.
- Parameters
-
renderer | The renderer which will be used for sampling. |
- Returns
- True if the setup has been successful and false - otherwise.
The documentation for this class was generated from the following file:
- /home/jenkins/ci/cgrepo/appsdk/VRay_SDK_CSharp/VRay_SDK_CSharp/VRayRT/UVTextureSampler.cs