|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nl.kun.Engine3D.TVector3D | +--nl.kun.Engine3D.TCoordSys3D | +--nl.kun.Engine3D.TEntity3D
This class defines a 3D entity with 3 coordinate system's, a color and a vissibility flag. All vissible 3D objects are enherited from this class.
Field Summary | |
java.awt.Color |
color
Main color of this object |
TCoordSys3D |
GlobalCords
This coordinate system in global coordinates (same as it's own coordinate system if it does not have a parent) |
TCoordSys3D |
ParentGlobalCords
The coordinate system of the parent (same as it's own coordinate system if it does not have a parent) |
boolean |
Vissible
Flag which determines if this object should be drawn by the engine or not |
Fields inherited from class nl.kun.Engine3D.TCoordSys3D |
Xaxis,
Yaxis,
Zaxis |
Fields inherited from class nl.kun.Engine3D.TVector3D |
DBSCIENTIFIC,
DBSTANDARD,
x,
y,
z |
Constructor Summary | |
TEntity3D()
Empty constructor. |
|
TEntity3D(double _x,
double _y,
double _z,
double _xax,
double _xay,
double _xaz,
double _yax,
double _yay,
double _yaz,
double _zax,
double _zay,
double _zaz)
Contructor. |
|
TEntity3D(double _x,
double _y,
double _z,
TVector3D _Xaxis,
TVector3D _Yaxis,
TVector3D _Zaxis)
Constructor |
|
TEntity3D(TEntity3D _Entity3D)
Copy constructor. |
|
TEntity3D(TVector3D _posVec,
TVector3D _Xaxis,
TVector3D _Yaxis,
TVector3D _Zaxis)
Constructor. |
Method Summary | |
double |
Depth(TCamera3D _cam)
This routine prerenders the objects and calculates the distances from the object to the camera (depth). |
void |
Draw(TCamera3D _cam,
Viewport _Viewport)
Draws the vissible parts of this object onto the viewport, as if it where projecting itself on a camera. |
void |
InheritGlobalCords(TCoordSys3D _Parent)
Inherits the global coordinates of it's parent, and adjusts it's own global coordinates if the local coordinate system is changed. |
void |
Rotate(TVector3D _PosVec,
TVector3D _DirVec,
double _angle)
Rotates the object around the line determined by the position vector _PosVec and the direction vector _DirVec by
an amount _angle |
TVector3D |
Translate(double _dx,
double _dy,
double _dz)
Translates the coordinate system of this object. |
TVector3D |
Translate(TVector3D _dr)
Translates the coordinate system of this object. |
TVector3D |
Vector3D(double _x,
double _y,
double _z)
Routine is used to set the position of the object in it's parent coordinate system. |
TVector3D |
Vector3D(TVector3D _pos)
Routine is used to set the position of the object in it's parent coordinate system. |
Methods inherited from class nl.kun.Engine3D.TCoordSys3D |
CoordSys3D,
CoordSys3D,
CoordSys3D,
Global2Local,
Global2Local,
Global2Local,
Local2Global,
Local2Global,
Local2Global,
toString |
Methods inherited from class nl.kun.Engine3D.TVector3D |
Angle,
Double2String,
Double2String,
Modulus,
Modulus,
Negate,
Negate,
Normalize,
Normalize,
NulVec,
StdXaxis,
StdYaxis,
StdZaxis,
String2Double,
VAdd,
VCrossProduct,
VCrossProduct,
VDotProduct,
Vector3D,
VPerpendicular,
VPerpendicular,
VScalarProduct,
VScalarProduct,
VScalarProduct,
VSubstract,
VSubstract |
Methods inherited from class java.lang.Object |
|
Field Detail |
public boolean Vissible
public java.awt.Color color
public TCoordSys3D GlobalCords
public TCoordSys3D ParentGlobalCords
Constructor Detail |
public TEntity3D(double _x, double _y, double _z, double _xax, double _xay, double _xaz, double _yax, double _yay, double _yaz, double _zax, double _zay, double _zaz)
_x
- the x-value of the origin vector_y
- the y-value of the origin vector_z
- the z-value of the origin vector_xax
- the x-value of the x-axis vector_xay
- the y-value of the x-axis vector_xaz
- the z-value of the x-axis vector_yax
- the x-value of the y-axis vector_yay
- the y-value of the y-axis vector_yaz
- the z-value of the y-axis vector_zax
- the x-value of the z-axis vector_zay
- the y-value of the z-axis vector_zaz
- the z-value of the z-axis vectorpublic TEntity3D(TVector3D _posVec, TVector3D _Xaxis, TVector3D _Yaxis, TVector3D _Zaxis)
_posVec
- The origin vector_Xaxis
- The x-axis vector_Yaxis
- The y-axis vector_Zaxis
- The z-axis vectorpublic TEntity3D()
public TEntity3D(TEntity3D _Entity3D)
_Entity3D
- Object that needs to be copied into this object.public TEntity3D(double _x, double _y, double _z, TVector3D _Xaxis, TVector3D _Yaxis, TVector3D _Zaxis)
_x
- the x-value of the origin vector_y
- the y-value of the origin vector_z
- the z-value of the origin vector_Xaxis
- The x-axis vector_Yaxis
- The y-axis vector_Zaxis
- The z-axis vectorMethod Detail |
public void Draw(TCamera3D _cam, Viewport _Viewport)
_cam
- The camera._Viewport
- Viewport object. This viewport object handles clipping
and transformation of real world coordinates to screen coordinates.
It does the real drawing on the screen.TCamera3D
,
Viewport
public double Depth(TCamera3D _cam)
TEntityList3D
object to sort all TEntity3D
's
according to depth._cam
- The camera.public TVector3D Translate(double _dx, double _dy, double _dz)
_dx
- displacement in x direction_dy
- displacement in y direction_dz
- displacement in z directionpublic TVector3D Translate(TVector3D _dr)
_dr
- Displacement vector.public void Rotate(TVector3D _PosVec, TVector3D _DirVec, double _angle)
_PosVec
and the direction vector _DirVec
by
an amount _angle
_PosVec
- Position vector of the line around which should be rotated_DirVec
- Direction vector of the line around which should be rotated_angle
- Amount of rotation in radians.public void InheritGlobalCords(TCoordSys3D _Parent)
_Parent
- The parent coordinate system.public TVector3D Vector3D(TVector3D _pos)
_pos
- the desired position of the object.public TVector3D Vector3D(double _x, double _y, double _z)
_x
- the desired x position of the object._y
- the desired y position of the object._z
- the desired z position of the object.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |