API reference
API reference
Select your platform
No SDKs available
No versions available

CookieMask Class

Extends Mask2D
A mask that uses a cookie texture to determine the opacity of each pixel.

Member Enumerations

Enumeration SampleMode

The enumerator to define the samplemode.
See each item for the description.
NEAREST
= 0x0
NEAREST_REPEAT
Nearest neighbor.
NEAREST_REPEAT_MIRROR
Nearest neighbor, with repeat.
BILINEAR
Nearest neighbor, with repeat and mirror.
BILINEAR_REPEAT
Bilinear.
BILINEAR_REPEAT_MIRROR
Bilinear, with repeat.

Fields

The cookie texture to use for the mask.
The sample mode to use for the mask.

Member Functions

This method applies the cookie mask to the given candidate.
It first generates an affine transformation based on the provided parameters, and then applies this transformation to the local position of the candidate. The resulting position is used to sample the cookie texture using the specified sample mode, and the resulting value is returned as the mask value for the candidate.
Parameters
c
The candidate to apply the mask to.
Returns
The mask value for the given candidate.
Not used on this mask.
Parameters
c
The candidate
Returns
true
Did you find this page helpful?
Thumbs up icon
Thumbs down icon