Packagegraphics.geom
Classpublic class Metaball
InheritanceMetaball Inheritance Object
Implements Geometry

Metaballs are, in computer graphics, organic-looking n-dimensional objects. The technique for rendering metaballs was invented by Jim Blinn in the early 1980s. Each metaball is defined as a function in n-dimensions (ie. for three dimensions, f(x,y,z); three-dimensional metaballs tend to be most common, with two-dimensional implementations as well). A thresholding value is also chosen, to define a solid volume.



Public Properties
 PropertyDefined By
  radius : Number
The radius of the metaball.
Metaball
  x : Number
The x component of the metaball.
Metaball
  y : Number
The y component of the metaball.
Metaball
Public Methods
 MethodDefined By
  
Metaball(x:Number = 0, y:Number = 0, radius:Number = 1)
Creates a new Metaball instance.
Metaball
  
calculate(tx:Number, ty:Number):Number
Calculates the result of the typical equation for a Metaball.
Metaball
  
clone():*
Returns a shallow copy of this instance.
Metaball
  
equals(o:*):Boolean
Compares the specified object with this object for equality.
Metaball
  
toObject():Object
Returns the Object representation of this object.
Metaball
  
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Metaball
  
toString():String
Returns the string representation of this instance.
Metaball
Property Detail
radiusproperty
radius:Number

The radius of the metaball.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
xproperty 
public var x:Number

The x component of the metaball.

yproperty 
public var y:Number

The y component of the metaball.

Constructor Detail
Metaball()Constructor
public function Metaball(x:Number = 0, y:Number = 0, radius:Number = 1)

Creates a new Metaball instance.

Parameters
x:Number (default = 0)
 
y:Number (default = 0)
 
radius:Number (default = 1)
Method Detail
calculate()method
public function calculate(tx:Number, ty:Number):Number

Calculates the result of the typical equation for a Metaball.

Parameters

tx:Number
 
ty:Number

Returns
Number
clone()method 
public function clone():*

Returns a shallow copy of this instance.

Returns
* — a shallow copy of this instance.
equals()method 
public function equals(o:*):Boolean

Compares the specified object with this object for equality.

Parameters

o:*

Returns
Booleantrue if the the specified object is equal with this object.
toObject()method 
public function toObject():Object

Returns the Object representation of this object.

Returns
Object — the Object representation of this object.
toSource()method 
public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source code string representation of the object.
toString()method 
public function toString():String

Returns the string representation of this instance.

Returns
String — the string representation of this instance.