nl.kun.Engine3D
Class TLine3D
java.lang.Object
|
+--nl.kun.Engine3D.TVector3D
|
+--nl.kun.Engine3D.TCoordSys3D
|
+--nl.kun.Engine3D.TEntity3D
|
+--nl.kun.Engine3D.TLine3D
- public class TLine3D
- extends TEntity3D
This class defines a line in 3D space.
Field Summary |
double |
depth
the distance from camera to the mean of this object |
Constructor Summary |
TLine3D()
Empty constructor. |
TLine3D(double _x1,
double _y1,
double _z1,
double _x2,
double _y2,
double _z2,
java.awt.Color _cl)
Standard constructor. |
TLine3D(TVector3D _Point3D1,
TVector3D _Point3D2,
java.awt.Color _cl)
Constructor with TVector3D's in stead of doubles as input. |
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. |
TLine3D |
Line3D(double _x1,
double _y1,
double _z1,
double _x2,
double _y2,
double _z2)
Sort of constructor, used to change the begin and endpoint of the 3D line. |
TLine3D |
Line3D(TVector3D _Point3D1,
TVector3D _Point3D2)
Sort of constructor, used to change the begin and endpoint of the 3D line. |
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 |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
depth
public double depth
- the distance from camera to the mean of this object
TLine3D
public TLine3D(double _x1,
double _y1,
double _z1,
double _x2,
double _y2,
double _z2,
java.awt.Color _cl)
- Standard constructor.
- Parameters:
_x1
- the x position of the first point of the 2D line_y1
- the y position of the first point of the 2D line_z1
- the z position of the first point of the 2D line_x2
- the x position of the second point of the 2D line_y2
- the y position of the second point of the 2D line_z2
- the z position of the second point of the 2D line_cl
- the color of the line.
TLine3D
public TLine3D(TVector3D _Point3D1,
TVector3D _Point3D2,
java.awt.Color _cl)
- Constructor with TVector3D's in stead of doubles as input.
- Parameters:
_Point3D1
- First point of the line_Point3D2
- Second point of the line_cl
- Color of the object
TLine3D
public TLine3D()
- Empty constructor. Defines a black line starting at (0,0,0) ending at (1,0,0)
Line3D
public TLine3D Line3D(TVector3D _Point3D1,
TVector3D _Point3D2)
- Sort of constructor, used to change the begin and endpoint of the 3D line.
Line3D
public TLine3D Line3D(double _x1,
double _y1,
double _z1,
double _x2,
double _y2,
double _z2)
- Sort of constructor, used to change the begin and endpoint of the 3D line.
Depth
public double Depth(TCamera3D _cam)
- Description copied from class: TEntity3D
- This routine prerenders the objects and calculates the distances from the object to the camera (depth).
If more than one 3D object is inside this object, it returns the average depth. This depth can be used by a
a parent
TEntityList3D
object to sort all TEntity3D
's
according to depth.
- Overrides:
- Depth in class TEntity3D
- Tags copied from class: TEntity3D
- Parameters:
_cam
- The camera.
Draw
public void Draw(TCamera3D _cam,
Viewport _Viewport)
- Description copied from class: TEntity3D
- Draws the vissible parts of this object onto the viewport, as if it where projecting itself on a camera.
- Overrides:
- Draw in class TEntity3D
- Tags copied from class: TEntity3D
- Parameters:
_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.- See Also:
TCamera3D
,
Viewport
InheritGlobalCords
public void InheritGlobalCords(TCoordSys3D _Parent)
- Description copied from class: TEntity3D
- Inherits the global coordinates of it's parent, and adjusts it's own global coordinates if the local coordinate system is changed.
- Overrides:
- InheritGlobalCords in class TEntity3D
- Tags copied from class: TEntity3D
- Parameters:
_Parent
- The parent coordinate system.