DimpleObject

Represents an object in the dimple world

Inherits from:: Object : DimpleThing

A DimpleObject can be a DimpleSphere, DimplePrism or DimpleMesh. This class is not used directly, but encapsulates all common functionality of all its subclasses. A special subclass is DimpleCursor, which talks to the haptic cursor in Dimple.

Properties that you can set or get are: 'position' (x,y,z), 'velocity' (x,y,z), 'acceleration' (x,y,z), 'rotation' (rotation matrix), 'force' (x,y,z), 'mass', 'density', 'color' (r,g,b), 'friction/static', and 'friction/dynamic'.

Properties that you can set are 'visible' (0 or 1), 'collide' (0 or 1) - sends a osc message when collisions occur (so you can add an action to do something with that).

Prisms and Meshes can also have the property 'size' (x,y,z). Spheres can also have the property 'radius'.

Creation / Class Methods

*lastid_
*lastid
Internal counter to create unique names for each object
*new(name,dimple,type,x,y,z)
Create a new instance of a DimpleObject
name
The name to be used for the object (created automatically, when using the method addObject from an instance of Dimple).
x
Initial x-position.
y
Initial y-position.
dimple
The instance of dimple this object belongs to.
type
The type of object
z
Initial z-position.

Accessing Instance and Class Variables

destroy(osc)
Destroy this object.
osc
Whether or not to send the osc message to dimple (default true)
grab
Grab this object.
constraints
Constraints that apply to this object.
addConstraint(constr)
Add a constraint to this object (called automatically when a constraint is created).
removeConstraint(constr)
Remove a constraint from this object (called automatically when a constraint is destroyed).
type_
type
The type of object.
addr_
addr
The NetAddr to send to (this is derived from teh dimple.addr).

This helpfile was created with the class HelpFile2