Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## simogl.util
Class Calc

    java.lang.Object
      simogl.util.Calc

    public class Calc

extends java.lang.Object

This class provides some usefull methods for calculations

Author:
  Frank Bruns

Constructor Summary
`Calc()`

Method Summary
`static void` | `billboardCylindricalBegin(javax.media.opengl.GL gl)` Applies the cylindrical billboarding technique by performing some undo calculations on the current modelview matrix.
`static void` | `billboardEnd(javax.media.opengl.GL gl)` Finishes the application of the current billboarding technique
`static void` | `billboardSphericalBegin(javax.media.opengl.GL gl)` Applies the sphericla billboarding technique by performing some undo calculations on the current modelview matrix.
`static double` | `cos(double value)` Returns the cosine value for the specified value
`static float[]` | `removeRotations(javax.media.opengl.GL gl)` This method returns a float array with 16 values, that represents the modelview matrix with all rotation operations eliminated.
`static float[]` | `removeTranslations(javax.media.opengl.GL gl)` This method returns a float array with 16 values, that represents the modelview matrix with all translate operations eliminated.
`static double` | `sin(double value)` Returns the sine value for the specified value
`static double` | `tan(double value)` Returns the tangent value for the specified value

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Calc

    public Calc()

Method Detail

### sin

    public static double sin(double value)

  Returns the sine value for the specified value

  Parameters:
    `value` - value in degrees, not radians
  Returns:
    sinus

### cos

    public static double cos(double value)

  Returns the cosine value for the specified value

  Parameters:
    `value` - value in degrees, not radians
  Returns:
    cosine

### tan

    public static double tan(double value)

  Returns the tangent value for the specified value

  Parameters:
    `value` - value in degrees, not radians
  Returns:
    tangent

### billboardSphericalBegin

    public static void billboardSphericalBegin(javax.media.opengl.GL gl)

  Applies the sphericla billboarding technique by performing some undo calculations on the current modelview matrix. The effect of this is that the objects which are drawn between the billboardSphericalBegin()- and billboardEnd()-methods always face the camera. They even face the camera if you look up or down, which is the difference to the spherical billboarding technique.

  Parameters:
    `gl` -

### billboardCylindricalBegin

    public static void billboardCylindricalBegin(javax.media.opengl.GL gl)

  Applies the cylindrical billboarding technique by performing some undo calculations on the current modelview matrix. The effect of this is that the objects which are drawn between the billboardCylindricalBegin()- and billboardEnd()-methods always face the camera. But if you look up with the camera you will still get a perspective effect, which is the difference to the spherical billboarding technique.

  Parameters:
    `gl` -

### billboardEnd

    public static void billboardEnd(javax.media.opengl.GL gl)

  Finishes the application of the current billboarding technique

### removeTranslations

    public static float[] removeTranslations(javax.media.opengl.GL gl)

  This method returns a float array with 16 values, that represents the modelview matrix with all translate operations eliminated. You can load the matrix with the gl.glLoadMatrixf()-method.

  Parameters:
    `gl` -
  Returns:
    modelview matrix without its translations

### removeRotations

    public static float[] removeRotations(javax.media.opengl.GL gl)

  This method returns a float array with 16 values, that represents the modelview matrix with all rotation operations eliminated. You can load the matrix with the gl.glLoadMatrixf()-method.

  Parameters:
    `gl` -
  Returns:
    modelview matrix without its rotations

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD