TextureEvaluator

References
This is the interface to a lightweight object capable of evaluating texture color throughout uvw space. Derive from this class to create your own texture evaluator to return from a custom RenderTexture.

Constructors

TextureEvaluator

#
protected TextureEvaluator()
Base class constructor

TextureEvaluator

#
protected TextureEvaluator(TextureEvaluatorFlags evaluatorFlags)
Base class constructor
evaluatorFlags (RenderTexture.TextureEvaluatorFlags)

Finalizer

~TextureEvaluator

#
~TextureEvaluator()
For Dispose pattern

Methods

Dispose

#Since v5.1
public void Dispose()
For Dispose pattern

Dispose

#
protected virtual void Dispose(bool disposing)
For Dispose pattern
disposing (bool)

GetColor

#Since v7.0
public bool GetColor(Point3d uvw, Vector3d duvwdx, Vector3d duvwdy, ref Color4f color)
Optimized version of GetColor for callers. Much faster in the case of a native (C++) evaluator.
uvw (Point3d)is the point for which to evaluate the texture.
duvwdx (Vector3d)duvwdx is a ray differential.
duvwdy (Vector3d)duvwdy is a ray differential.
color (ref Color4f)The texture color at this point in UV space.
True if the evaluator returned a valid color. Otherwise false.

GetColor

#Since v5.1
public virtual Color4f GetColor(Point3d uvw, Vector3d duvwdx, Vector3d duvwdy)
Get the color of the texture at a particular point in uvw space. May be called from within a rendering shade pipeline. note For ray differentials see Pharr Humphreys, "Physically Based Rendering", chapter 11.
uvw (Point3d)is the point for which to evaluate the texture.
duvwdx (Vector3d)duvwdx is a ray differential.
duvwdy (Vector3d)duvwdy is a ray differential.
The texture color at this point in UV space.

Initialize

#Since v6.0
public virtual bool Initialize()
Call this function before calling GetColor for the first time. Ideally, this should be on the main thread, but you can also call it on a worker thread as long as you are sure that Initialize() or GetColor() cannot be called at the same time on another thread.

WriteToByteArray

#Since v7.0 Obsolete v7.26
public virtual SimpleArrayByte WriteToByteArray(int width, int height)
obsoleteUse WriteToByteArray2 instead - supports much larger byte arrays
Fast access to bitmap evaluator - supply size (which you will probably have received from CRhRdkTexture::PixelSize) to see if the data can be extracted direct to a width*height*4 array of unsigned chars.
width (int)is the point for which to evaluate the texture.
height (int)duvwdx is a ray differential.
A ByteArray full of the byte values in RGBA order, or null if the function did not succeed

WriteToByteArray2

#Since v7.0
public virtual StdVectorByte WriteToByteArray2(int width, int height)
Fast access to bitmap evaluator - supply size (which you will probably have received from CRhRdkTexture::PixelSize) to see if the data can be extracted direct to a width*height*4 array of unsigned chars.
width (int)is the point for which to evaluate the texture.
height (int)duvwdx is a ray differential.
A ByteArray full of the byte values in RGBA order, or null if the function did not succeed

WriteToFloatArray

#Since v7.0 Obsolete v7.26
public virtual SimpleArrayFloat WriteToFloatArray(int width, int height)
obsoleteUse WriteToFloatArray2 instead - supports much larger byte arrays
Fast access to bitmap evaluator - supply size (which you will probably have received from CRhRdkTexture::PixelSize) to see if the data can be extracted direct to a width*height*4 array of unsigned chars.
width (int)is the point for which to evaluate the texture.
height (int)duvwdx is a ray differential.
A FloatArray full of the float values in RGBA order, or null if the function did not succeed.

WriteToFloatArray2

#Since v7.0
public virtual StdVectorFloat WriteToFloatArray2(int width, int height)
Fast access to bitmap evaluator - supply size (which you will probably have received from CRhRdkTexture::PixelSize) to see if the data can be extracted direct to a width*height*4 array of unsigned chars.
width (int)is the point for which to evaluate the texture.
height (int)duvwdx is a ray differential.
A FloatArray full of the float values in RGBA order, or null if the function did not succeed.