Class Point3d
represents points in 3d space
Defined in: raphaeltools.src.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Point3d(xr, yr, zr, projection)
3d point implementation
|
Field Attributes | Field Name and Description |
---|---|
array of copies of itself
|
|
horizontal and verical shifts of copies from receiver
|
|
projection matrix
|
|
x coordinate of point in screen projection
|
|
x coordinate of point in real space
|
|
y coordinate of point in screen projection (can be used for visibility issues)
|
|
y coordinate of point in real space
|
|
z coordinate of point in screen projection
|
|
z coordinate of point in real space
|
Method Attributes | Method Name and Description |
---|---|
copy(shifts)
Copy receiver to given positions
|
|
<static> |
Point3d.create(x, y, z, projection)
Creates new Point3d object, for parameters meaning see Point3d
|
project()
project receiver to xz screen coordinates accordind to this.p
|
|
Sets projection matrix
|
|
setX(x)
Set new x coordinate to receiver
|
|
setXYZ(xr, yr, zr)
Sets new position to receiver
|
|
setY(y)
Set new y coordinate to receiver
|
|
setZ(z)
Set new z coordinate to receiver
|
|
toString()
String representation
|
|
translate(dx, dy, dz)
Change position of receiver by given values
|
|
translateX(dx)
Change horizontal position of receiver by given values
|
|
translateY(dy)
Change horizontal position of receiver by given values
|
|
translateZ(dz)
Change vertical position of receiver by given values
|
|
up()
Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant
|
Class Detail
Point3d(xr, yr, zr, projection)
3d point implementation
- Parameters:
- {float} xr
- x coordinate of point in real space
- {float} yr
- y coordinate of point in real space
- {float} zr
- z coordinate of point in real space
- projection
Field Detail
{[Points]}
copies
array of copies of itself
{[[float|float]]}
copiesShifts
horizontal and verical shifts of copies from receiver
{[3x(3 or 4) floats]}
p
projection matrix
{float}
x
x coordinate of point in screen projection
{float}
xr
x coordinate of point in real space
{float}
y
y coordinate of point in screen projection (can be used for visibility issues)
{float}
yr
y coordinate of point in real space
{float}
z
z coordinate of point in screen projection
{float}
zr
z coordinate of point in real space
Method Detail
copy(shifts)
Copy receiver to given positions
n = Point3d(100,150,250); shifts=[[100,200,300],[200,200,500],[100,300,100],[200,300,340]]
- Parameters:
- {[[float|float|float]]} shifts
- vertical and horizontal shifts of copied points
<static>
{Point3d}
Point3d.create(x, y, z, projection)
Creates new Point3d object, for parameters meaning see Point3d
- Parameters:
- x
- y
- z
- projection
- Returns:
- {Point3d} new Point3d object
project()
project receiver to xz screen coordinates accordind to this.p
setProjection(p)
Sets projection matrix
- Parameters:
- {[2x(3 or 4) floats]} p
- new projection matrix
setX(x)
Set new x coordinate to receiver
- Parameters:
- x
- x coordinate of new position (in real space)
setXYZ(xr, yr, zr)
Sets new position to receiver
- Parameters:
- {float} xr
- xr coordinate of new position (in real space)
- {float} yr
- yr coordinate of new position (in real space)
- {float} zr
- zr coordinate of new position (in real space)
setY(y)
Set new y coordinate to receiver
- Parameters:
- y
- y coordinate of new position (in real space)
setZ(z)
Set new z coordinate to receiver
- Parameters:
- z
- z coordinate of new position (in real space)
{String}
toString()
String representation
- Returns:
- {String} string representation
translate(dx, dy, dz)
Change position of receiver by given values
- Parameters:
- {float} dx
- length of translation in x direction (in real space)
- {float} dy
- length of translation in y direction (in real space)
- {float} dz
- length of translation in z direction (in real space)
translateX(dx)
Change horizontal position of receiver by given values
- Parameters:
- {float} dx
- length of translation in x direction (in real space)
translateY(dy)
Change horizontal position of receiver by given values
- Parameters:
- {float} dy
- length of translation in y direction (in real space)
translateZ(dz)
Change vertical position of receiver by given values
- Parameters:
- {float} dz
- length of translation in x direction (in real space)
up()
Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant