eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Point3D':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Point3D


Inheritance:

   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

Description:


I represent a point in 3D space.


Class protocol:

instance creation
o  x: newX y: newY z: newZ
create and return a new point3D with coordinates newX, newY abd newZ


Instance protocol:

accessing
o  x: xArg y: yArg z: zArg

o  z

o  z: something

double dispatching
o  differenceFromPoint3D: aPoint
return the difference from aPoint - self.
(not used with points, but with subclass instances)

o  productFromPoint3D: aPoint
return the product from aPoint * self.
(not used with points, but with subclass instances)

o  quotientFromPoint3D: aPoint
return the quotient from aPoint / self.
(not used with points, but with subclass instances)

o  sumFromPoint3D: aPoint
return the sum from aPoint + self.
(not used with points, but with subclass instances)

polar coordinates
o  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
o  printOn: aStream
append a printed representation of the receiver to aStream

transformations
o  * scale
Return a new Point that is the product of the
receiver and translation (which is a Point or Number).

o  + translation
Return a new Point that is the sum of the
receiver and translation (which is a Point or Number).

o  - translation
Return a new Point that is the difference of the
receiver and translation (which is a Point or Number).

o  / scale
Return a new Point that is the quotient of the
receiver and translation (which is a Point or Number).



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:25:49 GMT