org.fixbin.ddd
Class Point

java.lang.Object
  extended byorg.fixbin.ddd.Point
All Implemented Interfaces:
Object3D

public class Point
extends java.lang.Object
implements Object3D

This class represents a single dot in the 3D environment


Field Summary
 int dispX
           
 int dispY
           
 long distance
           
 long dx
           
 long dy
           
 long dz
           
 long x
           
 long y
           
 long z
           
 
Constructor Summary
Point(long x, long y, long z)
          Creates a new instance of Point
 
Method Summary
 void calculate(Point offset, Matrix33 view, long centerX, long centerY, long scrDist)
           
 long getDistance()
          Returns the distance of the point to the "visual zero"
 void multiply(Matrix33 mat)
          Multiplies this point with a matrix (can be used to rotate objects)
 void render(Graphics g)
          This method requests the object to render itself to a graphics object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public long x

y

public long y

z

public long z

dx

public long dx

dy

public long dy

dz

public long dz

dispX

public int dispX

dispY

public int dispY

distance

public long distance
Constructor Detail

Point

public Point(long x,
             long y,
             long z)
Creates a new instance of Point

Parameters:
x - (long)
y - (long)
z - (long)
Method Detail

calculate

public void calculate(Point offset,
                      Matrix33 view,
                      long centerX,
                      long centerY,
                      long scrDist)

render

public void render(Graphics g)
Description copied from interface: Object3D
This method requests the object to render itself to a graphics object. This can be the screen, an image, file, etc.

Specified by:
render in interface Object3D
Parameters:
g - (Graphics) the graphics interface to render to

getDistance

public long getDistance()
Returns the distance of the point to the "visual zero"

Specified by:
getDistance in interface Object3D
Returns:
the distance (long)

multiply

public void multiply(Matrix33 mat)
Multiplies this point with a matrix (can be used to rotate objects)

Parameters:
mat - (Matrix33)