java.lang.Object
de.grogra.billboard.Billboarder
- Direct Known Subclasses:
- BasicBillboarder,- CakeBillboarder,- GridBillboarder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected doubleprotected Stringprotected RotationCameraprotected intprotected intprotected Fileprotected Stringprotected intprotected intprotected MimeTypestatic final MimeTypeThe MIME typeimage/exrwithout parameters.static final MimeTypeThe MIME typeimage/jpegwithout parameters.static final MimeTypeThe MIME typeimage/pjpegwithout parameters.static final MimeTypeThe MIME typeimage/pngwithout parameters.static final MimeTypeThe MIME typeimage/x-exrwithout parameters.protected Stringprotected Stringprotected doubleprotected TVector3dprotected intprotected Stringprotected View3D
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidangleOffset(int angleOffset) Shift the camera after the rotation to the valueangleOffset.voidbeginAt(int side) The Billboarder starts at the given side.voidThis method rendered each side of an object given in the view.protected voidThis method is invoked after the last billboard was rendered.protected StringgetBBName(int index) This method return the path and filename of the billboard as an URI-Stringprotected StringgetLeadingZeros(int limit, int position) This generates a string with leading zeros.static GraphManagergraph()voidinitialize(double distance, double zOfsset, int sides) This method has to be invoke before invoke .protected voidinsertName(String name) Stores the name of a rendered billboard into an internal list.static voidjustRenderView(File file, MimeType mt) static Point3dprotected voidnextSide()Just put the camera to the next side of view.protected voidnextSide(int side) Just put the camera to the givensideof view.protected voidsetDestination(File file, MimeType mt) protected abstract voidWhen a Billboard-Render-Thread is finished, the implementation of this method will be executed later.static Matrix34dtransformation(Node node, boolean post) 
- 
Field Details- 
camera
- 
view3d
- 
RotationAngleprotected double RotationAngle
- 
rotationPoint
- 
angleOffsetprotected double angleOffset
- 
pathAndFileName
- 
imageFolder
- 
prefix
- 
appendfix
- 
suffix
- 
countZeroprotected int countZero
- 
file
- 
mt
- 
imgWidthprotected int imgWidth
- 
imgHeightprotected int imgHeight
- 
sidesprotected int sides
- 
currentSideprotected int currentSide
- 
MT_JPGThe MIME typeimage/jpegwithout parameters.
- 
MT_PJPGThe MIME typeimage/pjpegwithout parameters.
- 
MT_PNGThe MIME typeimage/pngwithout parameters.
- 
MT_EXRThe MIME typeimage/exrwithout parameters.
- 
MT_X_EXRThe MIME typeimage/x-exrwithout parameters.
 
- 
- 
Constructor Details- 
Billboarderpublic Billboarder()
 
- 
- 
Method Details- 
setDestination- Throws:
- IOException
 
- 
initializepublic void initialize(double distance, double zOfsset, int sides) This method has to be invoke before invoke .- Parameters:
- distance- Distance between camera and the origin of the coordinates-system
- zOfsset- The z-axis shift of the camera
- sides- How much sides has to be rendered of the object.
 
- 
beginAtpublic void beginAt(int side) The Billboarder starts at the given side. Attention: the first side has the number 0.- Parameters:
- side-
 
- 
angleOffsetpublic void angleOffset(int angleOffset) Shift the camera after the rotation to the valueangleOffset. This is helpful if you already got some rendered images of a model and you want to render the images between. Maybe you've got a 20-image billboard. So theRotationAngleis (360/20 sides). And now you want 20 images more. You can take the half of the valueRotationAnglefrom the last billboard-render. In this caseRotationAngle/2 = 9. But beware: you have to safe the images of your last render, cause the billboard starts to count at zero. This old images could be overwritten.- Parameters:
- angleOffset-
 
- 
nextSideprotected void nextSide(int side) Just put the camera to the givensideof view.
- 
nextSideprotected void nextSide()Just put the camera to the next side of view.
- 
billboardingpublic void billboarding()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.
- 
getLeadingZerosThis generates a string with leading zeros. The number of "0" in the string depends on the log10 of a maximum numberlimitand aposition. Its used by generating a filename with leading zeros. This is important to beware the order of the files, cause filenames are strings and not numbers. For 14 files you've got one leading 0: "bill_01.jpg, bill_02.jpg, ... bill_14.png- Parameters:
- limit- For creation of the maximum number of zeros.
- position- How much zeros are at a position.
- Returns:
- A string filled with "0".
 
- 
insertNameStores the name of a rendered billboard into an internal list.- Parameters:
- name- Name of a billboard picture file.
 
- 
getBBNameThis method return the path and filename of the billboard as an URI-String- Parameters:
- index- Number of the rendered billboard
- Returns:
- Path and filename of the given billboard-number.
 
- 
location
- 
transformation
- 
graph
- 
setRunLaterprotected abstract void setRunLater()When a Billboard-Render-Thread is finished, the implementation of this method will be executed later.
- 
finalActionprotected void finalAction()This method is invoked after the last billboard was rendered.
- 
justRenderView
 
-