Class Index | File Index

Classes


Class GeomObj

Abstract class for geometrical object
Defined in: raphaelsm.src.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Abstract class for simple geometrical objects
Field Summary
Field Attributes Field Name and Description
 
angle of the object
 
cos
cos of this.angle
 
obj
actual raphael object
 
svg array (list) of the object
 
raphael instance connected to the object
 
sin
sin of this.angle
 
size of the object
 
x
x coordinate of the object
 
z
z coordinate of the object
Method Summary
Method Attributes Method Name and Description
 
constructorGeomObj(raphael, parameters,)
Constructor
 
copy(shifts)
Copy receiver
 
Make a copy of itself (each derived class to be copied have to define its own makeCopy method)
 
rotate(phi)
Rotate receiver by given angle (this.angle += phi)
 
setAngle(phi)
Set angle of receiver (this.angle = phi)
 
Set new this.pathList of receiver (each derived class must define its own setPathList method)
 
Compute sin and cos from stored angle
 
setX(x)
Sets new x position of receiver (this.x = x)
 
setXZ(x, z)
Sets new x and z position of receiver (this.x = x; this.z = z)
 
setZ(z)
Sets new z position of receiver (this.z = z)
 
translate(dx, dz)
Translate receiver in x and z direction (this.x += dx; this.z += dz)
 
Translate receiver in x direction (this.x += x)
 
Translate receiver in x direction (this.z += dz)
 
up()
Update receiver (set this.pathList for given internal variables - x,z,angle.
Class Detail
GeomObj()
Abstract class for simple geometrical objects
Field Detail
{float} angle
angle of the object

{float} cos
cos of this.angle

{Raphael.el} obj
actual raphael object

{Array} pathList
svg array (list) of the object

{Raphael} rapheal
raphael instance connected to the object

{float} sin
sin of this.angle

{float} size
size of the object

{float} x
x coordinate of the object

{float} z
z coordinate of the object
Method Detail
constructorGeomObj(raphael, parameters,)
Constructor
Parameters:
{Raphael} raphael
raphael instance
{Object} parameters,
see below
{float} params.x
x coordinate [pixel]
{float} params.z
z coordinate [pixel]
{float} params.size
size [pixel]
{float} params.angle
rotation angle from initial position

copy(shifts)
Copy receiver
Parameters:
{[TODO]} shifts
TODO

makeCopy()
Make a copy of itself (each derived class to be copied have to define its own makeCopy method)

rotate(phi)
Rotate receiver by given angle (this.angle += phi)
Parameters:
{float} phi
angle of rotation

setAngle(phi)
Set angle of receiver (this.angle = phi)
Parameters:
{float} phi
angle of rotation

setPathList()
Set new this.pathList of receiver (each derived class must define its own setPathList method)

setSinCos()
Compute sin and cos from stored angle

setX(x)
Sets new x position of receiver (this.x = x)
Parameters:
{float} x
new x coordinate [pixel]

setXZ(x, z)
Sets new x and z position of receiver (this.x = x; this.z = z)
Parameters:
{float} x
new x coordinate [pixel]
{float} z
new z coordinate [pixel]

setZ(z)
Sets new z position of receiver (this.z = z)
Parameters:
{float} z
new z coordinate [pixel]

translate(dx, dz)
Translate receiver in x and z direction (this.x += dx; this.z += dz)
Parameters:
{float} dx
distance to be translated in x direction [pixel]
{float} dz
distance to be translated in z direction [pixel]

translateX(dx)
Translate receiver in x direction (this.x += x)
Parameters:
{float} dx
distance to be translated [pixel]

translateZ(dz)
Translate receiver in x direction (this.z += dz)
Parameters:
{float} dz
distance to be translated [pixel]

up()
Update receiver (set this.pathList for given internal variables - x,z,angle... - as well as its copies)

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Oct 23 2011 11:05:56 GMT+0200 (CEST)