|
Class: Point3D
Object
|
+--Magnitude
|
+--ArithmeticValue
|
+--Point
|
+--Point3D
- Package:
- stx:libbasic2
- Category:
- Graphics-Geometry
- Version:
- rev:
1.3
date: 2022/07/02 12:53:33
- user: cg
- file: Point3D.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
I represent a point in 3D space.
instance creation
-
x: newX y: newY z: newZ
-
create and return a new point3D with coordinates newX, newY abd newZ
accessing
-
x: xArg y: yArg z: zArg
-
-
z
-
-
z: something
-
double dispatching
-
differenceFromPoint3D: aPoint
-
return the difference from aPoint - self.
(not used with points, but with subclass instances)
-
productFromPoint3D: aPoint
-
return the product from aPoint * self.
(not used with points, but with subclass instances)
-
quotientFromPoint3D: aPoint
-
return the quotient from aPoint / self.
(not used with points, but with subclass instances)
-
sumFromPoint3D: aPoint
-
return the sum from aPoint + self.
(not used with points, but with subclass instances)
polar coordinates
-
r
-
return the receiver's radius in a polar coordinate system.
I.e. the length of a vector from 0@0@0 to the receiver
Usage example(s):
(10 @ 10 @ 10) r => 17.3205080756888
(7 @ 4 @ 3) dist:(17 @ 6 @ 2) => 10.2469507659596
|
printing & storing
-
printOn: aStream
-
append a printed representation of the receiver to aStream
transformations
-
* scale
-
Return a new Point that is the product of the
receiver and translation (which is a Point or Number).
-
+ translation
-
Return a new Point that is the sum of the
receiver and translation (which is a Point or Number).
-
- translation
-
Return a new Point that is the difference of the
receiver and translation (which is a Point or Number).
-
/ scale
-
Return a new Point that is the quotient of the
receiver and translation (which is a Point or Number).
|