de.grogra.billboard
Class CakeBillboarder

java.lang.Object
  extended by de.grogra.billboard.Billboarder
      extended by de.grogra.billboard.CakeBillboarder
Direct Known Subclasses:
VRMLCakeBuilder

public class CakeBillboarder
extends Billboarder

The object which has to be rendered will separate into cake-pieces.

Author:
adgen

Field Summary
protected  float centerHeight
           
protected  float centerWidth
           
protected  int invisibleLayer
           
protected  int visibleLayer
           
 
Fields inherited from class de.grogra.billboard.Billboarder
angleOffset, appendfix, camera, countZero, currentSide, file, imageFolder, imgHeight, imgWidth, mt, MT_EXR, MT_JPG, MT_PJPG, MT_PNG, MT_X_EXR, pathAndFileName, prefix, RotationAngle, rotationPoint, sides, suffix, view3d
 
Constructor Summary
CakeBillboarder(java.io.File file, MimeType mt)
           
 
Method Summary
 void billboarding()
          This method rendered each side of an object given in the view.
 void cake()
          Which pieces of the cake has to be chosen, depends on the actual side of the camera position.
 void cake(int side)
          Rotates two HalfSpaces around z-axis.
 void setCenterDim(float centerWidth, float centerHeight)
          The center of the cake is a line which shows in positive z direction.
 void setLayer(int visible, int invisible)
          Defined which layer is for the visible and which for the invisible objects.
protected  void setRunLater()
          When a Billboard-Render-Thread is finished, the implementation of this method will be executed later.
 
Methods inherited from class de.grogra.billboard.Billboarder
angleOffset, beginAt, finalAction, getBBName, getLeadingZeros, graph, initialize, insertName, justRenderView, location, nextSide, nextSide, setDestination, transformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

centerHeight

protected float centerHeight

centerWidth

protected float centerWidth

invisibleLayer

protected int invisibleLayer

visibleLayer

protected int visibleLayer
Constructor Detail

CakeBillboarder

public CakeBillboarder(java.io.File file,
                       MimeType mt)
Method Detail

billboarding

public void billboarding()
Description copied from class: Billboarder
This method rendered each side of an object given in the view. The number of sides was set by invoke the initialize - method. After a render-step the camera will rotate and it will be start the next render-step.

Overrides:
billboarding in class Billboarder

cake

public void cake()
Which pieces of the cake has to be chosen, depends on the actual side of the camera position.


cake

public void cake(int side)
Rotates two HalfSpaces around z-axis. Both HS are twisted. The angle between HS is the same like one rotation-step angle. After the intersection of these two HS, exist a new space. All objects inside in this space will set to a visible Layer. All objects outside will set to an invisible Layer. Which Layer is visible or not can defined with #setLayer(). From the top of view, it looks like a piece of a cake.

Parameters:
side - Which two pieces will be visible.

setCenterDim

public void setCenterDim(float centerWidth,
                         float centerHeight)
The center of the cake is a line which shows in positive z direction. The line starts at the origin of the global coordinates-system. The length of a line is defined by centerHeight. All objects with a distance less then centerWidth are visible too. So the center is a quasi cylinder.

Parameters:
centerWidth -
centerHeight -

setLayer

public void setLayer(int visible,
                     int invisible)
Defined which layer is for the visible and which for the invisible objects. The default-value for visible is 0 and invisible 15.

Parameters:
visible - The Number of the visible layer in the 3D-view
invisible - The Number of the invisible layer in the 3D-view

setRunLater

protected void setRunLater()
Description copied from class: Billboarder
When a Billboard-Render-Thread is finished, the implementation of this method will be executed later.

Specified by:
setRunLater in class Billboarder