Sets the value of the SFImage event-in slot.
C# |
---|
public abstract void SetValue (
int width,
int height,
int components,
int[] pixels
) |
The following example demonstrates how to put a new texture
into a PixelTexture node. The texture has a size of 2 x 2 pixels and
RGB color values (3 components). The lower left pixel is white, the
lower right pixel red, the upper left pixel green, and the upper right
pixel blue:
C# |
---|
Vrml.EAI.Node pixelTexture = ...;
Vrml.EAI.Field.EventInSFImage set_image = (Vrml.EAI.Field.EventInSFImage)pixelTexture.GetEventIn("set_image");
int [] pixels = new int[] { 0xFFFFFF, 0xFF0000, 0x00FF00, 0x0000FF };
set_image.SetValue(2, 2, 3, pixels);
|