# `class WMObjBase extends WMBase`

Available on all platforms

Base Object of wm3d.

See also `WMBase`.

## Sub classes:

WMAtom | Atom object; a sphere.
WMBond | Bond object; a cylinder.
WMLabel | Label object; a text
WMObject3D | Basic 3D Objects: Cone, Cube, Cylinder, Square(2D)
WMPolygon | A general polygon
WMRibbon | Ribbon or Coil object; ribbon or tube
WMShape | A general shape composed by triangles

## Instance Fields

### `var _polygon:Dynamic`

polygon of this object

### `function new(r:Float, c0:Int, c1:Int, a:Float, o:Float, q:Int, ag:Float, d:Float, sp:Float, gl:Float, sh:String):Void`

Constructor.

### `function clear(def:WMDefaults):Void`

initialize variables.

### `function dispose():Void`

dispose shader instance of this instance; used when re-creating Context3D

### `function draw(c:Context3D, mpos:Matrix3D, proj:Matrix3D, voffset:Vector3D, light:Vector3D, cpos:Vector3D, dcActive:Bool, dcCoeff:Float, dcLength:Float):Bool`

draw `_polygon` on Stage3D

- light: direction of light
- cpos: position of camera
- dcActive: is depth cueing is active (false)
- dcCoeff: depth cueing coefficient (0.0)
- dcLength: depth cueing characteristic length (0.0)

### `function dump():String`

dump xml data as a string

### `function get__polygon():Dynamic`

getter of `_polygon`

### `function setShaderParams():Void`

set shader variables (ambient, diffuse, specular, gloss) of `_polygon`