nl.kun.Engine3D
Class TArc3D

java.lang.Object
  |
  +--nl.kun.Engine3D.TVector3D
        |
        +--nl.kun.Engine3D.TCoordSys3D
              |
              +--nl.kun.Engine3D.TEntity3D
                    |
                    +--nl.kun.Engine3D.TArc3D

public class TArc3D
extends TEntity3D

This class can be used to draw an arc between 2 3D points, by specifying a radius, center, begin angle and end angle. The arc is NOT drawn perspectively correct, but will only be correct when the plane of the arc and the plane of the camera are parallel. It is possible to draw a string halfway of the arc.


Field Summary
 double beginAngle
          The beginAngle
 double endAngle
          The endangle
 double Radius
          Radius of the arc
 java.lang.String Text
          The text string that will be displayed between the begin and endpoint of the arc
 
Fields inherited from class nl.kun.Engine3D.TEntity3D
color, GlobalCords, ParentGlobalCords, Vissible
 
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
TArc3D()
          Empty constructor.
TArc3D(double _cx, double _cy, double _cz, double _Radius, double _beginAngle, double _endAngle, java.lang.String _Text, java.awt.Color _cl)
          Constructor.
TArc3D(TVector3D _Center, double _Radius, double _beginAngle, double _endAngle, java.lang.String _Text, java.awt.Color _cl)
          Constructor.
 
Method Summary
 TArc3D Arc3D(TVector3D _Center, double _Radius, double _beginAngle, double _endAngle, java.lang.String _Text)
          A constructor like routine.
 void changeAngle(double _alpha)
          A procedure that lets you change the end angle.
 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.TEntity3D
InheritGlobalCords, Rotate, Translate, Translate, Vector3D, Vector3D
 
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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Radius

public double Radius
Radius of the arc

beginAngle

public double beginAngle
The beginAngle

endAngle

public double endAngle
The endangle

Text

public java.lang.String Text
The text string that will be displayed between the begin and endpoint of the arc
Constructor Detail

TArc3D

public TArc3D(double _cx,
              double _cy,
              double _cz,
              double _Radius,
              double _beginAngle,
              double _endAngle,
              java.lang.String _Text,
              java.awt.Color _cl)
Constructor.
Parameters:
_cx - The x component of the center of the arc
_cy - The y component of the center of the arc
_cz - The z component of the center of the arc
_Radius - The radius of the arc
_beginAngle - The starting angle of the arc in radians
_endAngle - The end angle of the arc in radians
_Text - The string which contains the text to be displayed halfway of the arc.
_cl - The color of the arc and string.

TArc3D

public TArc3D(TVector3D _Center,
              double _Radius,
              double _beginAngle,
              double _endAngle,
              java.lang.String _Text,
              java.awt.Color _cl)
Constructor.
Parameters:
_Center - A TVector3D object for the center of the arc
_Radius - The radius of the arc
_beginAngle - The starting angle of the arc in radians
_endAngle - The end angle of the arc in radians
_Text - The string which contains the text to be displayed halfway of the arc.
_cl - The color of the arc and string.

TArc3D

public TArc3D()
Empty constructor. Creates an arc with center (0,0,0), radius 1 and beginAngle=endAngle=0 rad.
Method Detail

Arc3D

public TArc3D Arc3D(TVector3D _Center,
                    double _Radius,
                    double _beginAngle,
                    double _endAngle,
                    java.lang.String _Text)
A constructor like routine. Used to change the variables of the object without constructing it.
Parameters:
_Center - A TVector3D object for the center of the arc
_Radius - The radius of the arc
_beginAngle - The starting angle of the arc in radians
_endAngle - The end angle of the arc in radians
_Text - The string which contains the text to be displayed halfway of the arc.

changeAngle

public void changeAngle(double _alpha)
A procedure that lets you change the end angle.
Parameters:
_alpha - the end angle in radians

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