nl.kun.Engine3D
Class TLabel3D
java.lang.Object
|
+--nl.kun.Engine3D.TVector3D
|
+--nl.kun.Engine3D.TCoordSys3D
|
+--nl.kun.Engine3D.TEntity3D
|
+--nl.kun.Engine3D.TLabel3D
- public class TLabel3D
- extends TEntity3D
This object can draw a standard string at a certain 3D position. No scaling is used, and the label
does not rotate. The position of the label denotes the lower left corner of the label.
Field Summary |
java.lang.String |
Text
The label string |
Constructor Summary |
TLabel3D()
Empty constructor. |
TLabel3D(java.lang.String _Text,
TVector3D _Pos,
java.awt.Color _cl)
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. |
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 |
Text
public java.lang.String Text
- The label string
TLabel3D
public TLabel3D(java.lang.String _Text,
TVector3D _Pos,
java.awt.Color _cl)
- Constructor.
- Parameters:
_Text
- the string of the label_Pos
- the position of the label in 3D_cl
- the color of the label string
TLabel3D
public TLabel3D()
- Empty constructor. An empty string positioned at ((0,0,0);(1,0,0);(0,1,0);(0,0,1))
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