SCE Metaballs

   Print  Previous  Next

Functions Provided By SCE Metaballs

The following table provides an overview over all functions the effect provides:

Function

Description

void SetBpm(int bpm)

Sets the speed for the movement. bpm must be within a range of 0 to 9999 BPM. E.g. a value of 60 means that it is moved one pixel per second into the given direction.

int GetBpm()

Returns the current speed for the movement of objects in BPM.

void SetInnerGlow(int value)

Sets the value for the inner glow of objects. Valid values for value range from 0 to 100.

int GetInnerGlow()

Returns the value of the inner glow of objects.

void SetOuterGlow(int value)

Sets the value for the inner glow of objects. Valid values for value range from 0 to 100.

int GetOuterGlow()

Returns the value of the outer glow of objects.

void SetBorder(int size)

Sets the border size of objects. Valid values for size range from 1 to 100.

int GetBorder()

Returns the border size of objects.

void SetMaxSize(int size)

Sets the maximum size of the objects. Valid values for size range from 1 to 100.

int GetMaxSize()

Returns the current maximum size of the objects.

void SetCount(int number)

Sets the number of objects. Valid values for number range from 1 to 20.

int GetCount()

Retrieves the current number of objects.

void SeedRandom()

Instantly creates Metaballs with random sizes every time the function is called.

void SetShape(int shape)

Sets the shape to use. One of the defines described below must be used.

int GetShape()

Returns the currently defined shape.

void SetMode(int mode)

Sets the distribution curve for the size of the Metaballs. One of the defines described below must be used.

int GetMode()

Retrieves the currently used size distribution mode.

void SetScale(float value)

Sets the scale of the Metaballs in random mode using relative values ranging from 0.01 to 2.0.

float GetScale()

Retrieves the currently set scale of the effect. Scale can only be used while in random mode.

void SetColorMode(int mode)

Sets the mode of the Color Table. See below for further details.

int GetColorMode()

Returns the currently set mode of the Color Table.

int GetColorCount()

Returns the number of colors in the Color Table.

void RemoveColor(int idx)

Removes a color from the Color Table.

void SetColor(int idx, color c)

Sets the color values for a certain, indexed color in the Color Table.

color GetColor(int idx)

Returns which color is set for a certain color at a certain position (index) in the Color Table.

void AddColor(int idx, color c)

Adds color c at position idx to the Color Table.

void SetColorMix(int mode)

Sets the second shape for the color mix. See below for further details.

int GetColorMix()

Returns the currently set second shape for the color mix.

void SetSharpness(int mode)

Sets the type of color gradient. See below for further details.

int GetSharpness()

Returns the currently set type of color gradient.

void SetColorMixLink(int value)

Sets if auto adjustment for the two shapes is activated (1) or not (0).

int GetColorMixLink()

Returns if auto adjustment is enabled or disabled.

void SetColor(int idx, color c)

Sets the color at the specified index in the Color Table dialog. If idx is out of range, nothing happens.

color GetColor(int idx)

Returns the color of the specified index in the color table. If the index is out of range, black is returned.

int GetColorCount()

Returns the number of colors in the color table.

void AddColor(int idx, color c)

Adds another color to the color table at the specified index position. If the index is lower or equal to 0, the new color is added to the first position. If the index is greater than the current number of colors, the new color is added at the end.

void RemoveColor(int idx)

Removes the color located at the specified index. If the given index is out of range, nothing happens. The Color Table of this effect needs to include at least 1 entry.

 

This Effect uses the Color Table. Learn more about Using Colors.

 

Deprecated Functions
Deprecated functions are outdated functions and should not be used anymore.

Function

Description

void setColor(color col)

Sets the color of the effect.
Please note: This function is depracated. Use the color functions described above instead.

color getColor()

Returns the color of the effect.
Please note: This function is depracated. Use the color functions described above instead.

 

Shapes

This effect uses various geometrical figures. With the function SetShape it is possible to change them. The following values can be used as parameter:

Value

Description

DRAW_RECT

Selects the unfilled rectangle for drawing.

FILL_RECT

Selects the filled rectangle for drawing.

DRAW_CIRCLE

Selects the unfilled circle for drawing.

FILL_CIRCLE

Selects the filled circle for drawing.

DRAW_DIAMOND

Selects the diamond for drawing.

FILL_DIAMOND

Selects the filled diamond for drawing.

 

Distribution Modes

Value

Description

MODE_UNIFORM

Selects a uniform size of the Metaballs.

MODE_LINEAR

Selects a linear distribution curve for the size of the Metaballs.

MODE_QUADRATIC

Selects a quadratic distribution curve for the size of the Metaballs.

MODE_SQRT

Selects a square root distribution curve for the size of the Metaballs.

MODE_CUBIC

Selects a cubic distribution curve for the size of the Metaballs.

MODE_RANDOM

Selects a random distribution curve for the size of the Metaballs.

 

Color Modes

Value

Description

CM_LOOP

Sets the loop mode. In this mode the effect loops through the colortable to select the colors for new shapes.

CM_SHUFFLE

Sets the shuffle mode. In this mode the effect selects the color for a new shape from the color table by random access.

CM_RANDOM

Sets the random mode. In this mode the colors for the shapes are generated by random but 10% of the colors will be generated by random access to the color table.

 

Modes

This effect uses a second type of shape and mixes colors of both. With the function SetColorMix it is possible to change them. The following values can be used as parameter:

Value

Description

MODE_CIRCLE

Selects the circle mode.

MODE_RECTANGLE

Selects the rectangle mode.

MODE_DIAMOND

Selects the diamond mode.

 

Sharpness

This effect uses various geometrical figures. With the function SetSharpness it is possible to change them. The following values can be used as parameter:

Value

Description

MODE_VERY_BLURRY

Selects the very blurry color gradient for Metaballs with several colors.

MODE_BLURRY

Selects the blurry color gradient for Metaballs with several colors.

MODE_SLIGHTLY_BLURRY

Selects the slightly blurry color gradient for Metaballs with several colors.

MODE_MEDIUM

Selects the medium color gradient for Metaballs with several colors.

MODE_SLIGHTLY_CLEAR

Selects the slightly clear color gradient for Metaballs with several colors.

MODE_CLEAR

Selects the clear color gradient for Metaballs with several colors.

MODE_VERY_CLEAR

Selects the very clear color gradient for Metaballs with several colors.