TextureCurve Class
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Interface for handling curve textures. This class lets the user store 2d curves in a form of a texture (convert vectors to raster data).
Curve textures can be used for color variation in the particles_base material of Particle Systems or in other custom materials.
You can set up to 4 channels for the curve texture.
TextureCurve Class
Members
TextureCurve ( int num_channels, int resolution, int flags ) #
Sets resolution, number of channels and texture flags for this TextureCurve instance. The pointer to the curve texture is set to null and curves are marked for an update.Arguments
- int num_channels - Number of texture channels.
- int resolution - Width resolution of the curve texture.
- int flags - Texture flags.
Texture getTexture ( ) #
Creates a new texture and updates hashes for curves, if required. Returns a pointer to the texture or null if the texture was not created.void releaseTexture ( ) #
Deletes the texture and its pointer.void copy ( TextureCurve src_texture_curve ) #
Copies the curves data of a source texture to the texture.Arguments
- TextureCurve src_texture_curve - Source curve texture.
TextureCurve clone ( ) #
Duplicates the curve texture and returns a pointer to the copy.Curve2d getCurve ( int channel ) #
Returns a pointer to the Curve2d for the specified channel.Arguments
- int channel - Required channel.
Return value
Pointer to a Curve2d object.void setNumChannels ( int channels ) #
Sets the new number of channels for the texture.Arguments
- int channels - Number of texture channels.
int getNumChannels ( ) #
Returns the number of texture channels.void setResolution ( int resolution ) #
Sets the width resolution for the texture.Arguments
- int resolution - Texture width resolution.
int getResolution ( ) #
Returns the texture width resolution.void setFlags ( int flags ) #
Sets texture flags.Arguments
- int flags - Texture flags.
int getFlags ( ) #
Returns texture flags.Last update:
2020-10-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)