Class Point2d
represents points in 2d zx plane
Defined in: raphaeltools.src.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Point2d(x, z)
2d xz plane point implementation
|
Field Attributes | Field Name and Description |
---|---|
array of copies of itself
|
|
horizontal and verical shifts of copies from receiver
|
|
x coordinate
|
|
z coordinate
|
Method Attributes | Method Name and Description |
---|---|
copy(shifts)
Copy receiver to given positions
|
|
<static> |
Point2d.create(x, z)
Creates new Point2d object, for parameters meaning see Point2d
|
setX(x)
Set new x coordinate to receiver
|
|
setXZ(x, z)
Sets new position to receiver
|
|
setZ(z)
Set new z coordinate to receiver
|
|
toString()
String representation
|
|
translate(dx, dz)
Change position of receiver by given values
|
|
translateX(dx)
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
Point2d(x, z)
2d xz plane point implementation
- Parameters:
- {float} x
- x coordinate of point
- {float} z
- z coordinate of point
Field Detail
{[Points2d]}
copies
array of copies of itself
{[[float|float]]}
copiesShifts
horizontal and verical shifts of copies from receiver
{float}
x
x coordinate
{float}
z
z coordinate
Method Detail
copy(shifts)
Copy receiver to given positions
n = Point2d(100,150); shifts=[[100,200],[200,200],[100,300],[200,300]]
- Parameters:
- {[[float|float]]} shifts
- vertical and horizontal shifts of copied points
<static>
{Point2d}
Point2d.create(x, z)
Creates new Point2d object, for parameters meaning see Point2d
- Parameters:
- x
- z
- Returns:
- {Point2d} new Point2d object
setX(x)
Set new x coordinate to receiver
- Parameters:
- x
- x coordinate of new position
setXZ(x, z)
Sets new position to receiver
- Parameters:
- {float} x
- x coordinate of new position
- {float} z
- z coordinate of new position
setZ(z)
Set new z coordinate to receiver
- Parameters:
- z
- z coordinate of new position
{String}
toString()
String representation
- Returns:
- {String} string representation
translate(dx, dz)
Change position of receiver by given values
- Parameters:
- {float} dx
- length of translation in x direction
- {float} dz
- length of translation in z direction
translateX(dx)
Change horizontal position of receiver by given values
- Parameters:
- {float} dx
- length of translation in x direction
translateZ(dz)
Change vertical position of receiver by given values
- Parameters:
- {float} dz
- length of translation in x direction
up()
Update receiver (change positions of stored copies so as stored shifts between receiver and its copies remain constant