nl.kun.Engine3D
Class TVertex3D

java.lang.Object
  |
  +--nl.kun.Engine3D.TVector3D
        |
        +--nl.kun.Engine3D.TVertex3D

public class TVertex3D
extends TVector3D

This class defines a 3D vertex. This class is already fit for working with textures and gouraud shading, but note that most of the other objects in the nl.kun.Engine3D package are not!!


Field Summary
 TVector3D Vertex2D
          This vector converted to camera coordinates.
 
Fields inherited from class nl.kun.Engine3D.TVector3D
DBSCIENTIFIC, DBSTANDARD, x, y, z
 
Constructor Summary
(package private) TVertex3D(double _x, double _y, double _z)
          Constructor (for use with flat shading)
(package private) TVertex3D(double _x, double _y, double _z, int[] _ColorArr)
          Constructor (for use with gouraud shading)
(package private) TVertex3D(TVector3D _pos)
          Constructor (for use with flat shading)
(package private) TVertex3D(TVector3D _pos, int[] _ColorArr)
          Constructor (for use with gouraud shading)
 
Method Summary
 void addBrightness(double _brightness)
          Add brightness to this vertex, used in gouraud shading
 void Depth(TCamera3D _cam, TCoordSys3D _parent)
          This routine calculates the position of this vertex in the camera coordinate system.
 int getBrightness()
          Get's the brightness of this object.
 void Reset()
          Resets brightness values, used in gouraud shading
 
Methods inherited from class nl.kun.Engine3D.TVector3D
Angle, Double2String, Double2String, Modulus, Modulus, Negate, Negate, Normalize, Normalize, NulVec, Rotate, StdXaxis, StdYaxis, StdZaxis, String2Double, toString, Translate, Translate, VAdd, VCrossProduct, VCrossProduct, VDotProduct, Vector3D, Vector3D, Vector3D, VPerpendicular, VPerpendicular, VScalarProduct, VScalarProduct, VScalarProduct, VSubstract, VSubstract
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Vertex2D

public TVector3D Vertex2D
This vector converted to camera coordinates.
Constructor Detail

TVertex3D

TVertex3D(double _x,
          double _y,
          double _z,
          int[] _ColorArr)
Constructor (for use with gouraud shading)
Parameters:
x - x component of this vertex
y - y component of this vertex
z - z component of this vertex
_ColorArr - An array of colors (rgb-integers) with increasing brightness. Used in gouraud shading.

TVertex3D

TVertex3D(TVector3D _pos,
          int[] _ColorArr)
Constructor (for use with gouraud shading)
Parameters:
_pos - Position of this vertex
_ColorArr - An array of colors (rgb-integers) with increasing brightness. Used in gouraud shading.

TVertex3D

TVertex3D(double _x,
          double _y,
          double _z)
Constructor (for use with flat shading)
Parameters:
x - x component of this vertex
y - y component of this vertex
z - z component of this vertex

TVertex3D

TVertex3D(TVector3D _pos)
Constructor (for use with flat shading)
Parameters:
_pos - Position of this vertex
Method Detail

Depth

public void Depth(TCamera3D _cam,
                  TCoordSys3D _parent)
This routine calculates the position of this vertex in the camera coordinate system.
Parameters:
_cam - The camera.

Reset

public void Reset()
Resets brightness values, used in gouraud shading

getBrightness

public int getBrightness()
Get's the brightness of this object. Used in gouraud shading

addBrightness

public void addBrightness(double _brightness)
Add brightness to this vertex, used in gouraud shading