Class: Point3d

RaphaelTools. Point3d

represents points in 3d space

new Point3d(xr, yr, zr, projection)

3d point implementation
This:
Parameters:
Name Type Argument Description
xr number <optional>
x coordinate of point in real space
yr number <optional>
y coordinate of point in real space
zr number <optional>
z coordinate of point in real space
projection Array.<number> <optional>
3x(3 or 4) projection matrix
Properties:
Name Type Description
xr number x coordinate of point in real space
yr number y coordinate of point in real space
zr number z coordinate of point in real space
x number x coordinate of point in screen projection
y number y coordinate of point in screen projection (can be used for visibility issues)
z number z coordinate of point in screen projection
p Array.<Array.<number>> 3x(4 or 3) projection matrix
copies Array.<RaphaelTools.Point3d> array of copies of itself
copiesShifts Array.<Array.<number>> array of 2 element arrays, horizontal and verical shifts of copies from receiver
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 361

Methods

<static> create() → {RaphaelTools.Point3d}

Creates new Point3d object, for parameters meaning see RaphaelTools.Point3d
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 544
Returns:
new Point3d object
Type
RaphaelTools.Point3d

copy(shifts)

Copy receiver to given positions
Parameters:
Name Type Description
shifts Array.<Array.<number>> array of 3 element arrays, x,y,z shifts of copied points
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 385
Example
n = RaphaelTools.Point3d(100,150,250);
shifts=[[100,200,300],[200,200,500],[100,300,100],[200,300,340]]

project()

project receiver to xz screen coordinates accordind to this.p
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 471

rotX(a)

Rotate receiver around x axis of angle a
Parameters:
Name Type Description
a number angle of rotation
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 480

rotY(a)

Rotate receiver around y axis of angle a
Parameters:
Name Type Description
a number angle of rotation
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 498

rotZ(a)

Rotate receiver around z axis of angle a
Parameters:
Name Type Description
a number angle of rotation
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 516

setProjection(p)

Sets projection matrix
Parameters:
Name Type Description
p Array.<Array.<number>> new 3x(3 or 4) projection matrix
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 464

setX(xr)

Set new x coordinate to receiver
Parameters:
Name Type Description
xr x coordinate of new position (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 407

setXYZ(xr, yr, zr)

Sets new position to receiver
Parameters:
Name Type Description
xr number xr coordinate of new position (in real space)
yr number yr coordinate of new position (in real space)
zr number zr coordinate of new position (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 397

setY(yr)

Set new y coordinate to receiver
Parameters:
Name Type Description
yr y coordinate of new position (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 415

setZ(zr)

Set new z coordinate to receiver
Parameters:
Name Type Description
zr z coordinate of new position (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 423

toString() → {string}

String representation
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 376
Returns:
string representation
Type
string

translate(dx, dy, dz)

Change position of receiver by given values
Parameters:
Name Type Description
dx number length of translation in x direction (in real space)
dy number length of translation in y direction (in real space)
dz number length of translation in z direction (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 433

translateX(dx)

Change horizontal position of receiver by given values
Parameters:
Name Type Description
dx number length of translation in x direction (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 443

translateY(dy)

Change horizontal position of receiver by given values
Parameters:
Name Type Description
dy number length of translation in y direction (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 450

translateZ(dz)

Change vertical position of receiver by given values
Parameters:
Name Type Description
dz number length of translation in x direction (in real space)
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 457

update()

Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant
Source:
  • /var/www/html/software/raphaeltools/raphaeltools.src.js, line 533