java.lang.Object
de.grogra.billboard.Billboarder
- Direct Known Subclasses:
BasicBillboarder
,CakeBillboarder
,GridBillboarder
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected String
protected RotationCamera
protected int
protected int
protected File
protected String
protected int
protected int
protected MimeType
static final MimeType
The MIME typeimage/exr
without parameters.static final MimeType
The MIME typeimage/jpeg
without parameters.static final MimeType
The MIME typeimage/pjpeg
without parameters.static final MimeType
The MIME typeimage/png
without parameters.static final MimeType
The MIME typeimage/x-exr
without parameters.protected String
protected String
protected double
protected TVector3d
protected int
protected String
protected View3D
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
angleOffset
(int angleOffset) Shift the camera after the rotation to the valueangleOffset
.void
beginAt
(int side) The Billboarder starts at the given side.void
This method rendered each side of an object given in the view.protected void
This method is invoked after the last billboard was rendered.protected String
getBBName
(int index) This method return the path and filename of the billboard as an URI-Stringprotected String
getLeadingZeros
(int limit, int position) This generates a string with leading zeros.static GraphManager
graph()
void
initialize
(double distance, double zOfsset, int sides) This method has to be invoke before invoke .protected void
insertName
(String name) Stores the name of a rendered billboard into an internal list.static void
justRenderView
(File file, MimeType mt) static Point3d
protected void
nextSide()
Just put the camera to the next side of view.protected void
nextSide
(int side) Just put the camera to the givenside
of view.protected void
setDestination
(File file, MimeType mt) protected abstract void
When a Billboard-Render-Thread is finished, the implementation of this method will be executed later.static Matrix34d
transformation
(Node node, boolean post)
-
Field Details
-
camera
-
view3d
-
RotationAngle
protected double RotationAngle -
rotationPoint
-
angleOffset
protected double angleOffset -
pathAndFileName
-
imageFolder
-
prefix
-
appendfix
-
suffix
-
countZero
protected int countZero -
file
-
mt
-
imgWidth
protected int imgWidth -
imgHeight
protected int imgHeight -
sides
protected int sides -
currentSide
protected int currentSide -
MT_JPG
The MIME typeimage/jpeg
without parameters. -
MT_PJPG
The MIME typeimage/pjpeg
without parameters. -
MT_PNG
The MIME typeimage/png
without parameters. -
MT_EXR
The MIME typeimage/exr
without parameters. -
MT_X_EXR
The MIME typeimage/x-exr
without parameters.
-
-
Constructor Details
-
Billboarder
public Billboarder()
-
-
Method Details
-
setDestination
- Throws:
IOException
-
initialize
public 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-systemzOfsset
- The z-axis shift of the camerasides
- How much sides has to be rendered of the object.
-
beginAt
public void beginAt(int side) The Billboarder starts at the given side. Attention: the first side has the number 0.- Parameters:
side
-
-
angleOffset
public 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 theRotationAngle
is (360/20 sides). And now you want 20 images more. You can take the half of the valueRotationAngle
from 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
-
-
nextSide
protected void nextSide(int side) Just put the camera to the givenside
of view. -
nextSide
protected void nextSide()Just put the camera to the next side of view. -
billboarding
public 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. -
getLeadingZeros
This generates a string with leading zeros. The number of "0" in the string depends on the log10 of a maximum numberlimit
and 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".
-
insertName
Stores the name of a rendered billboard into an internal list.- Parameters:
name
- Name of a billboard picture file.
-
getBBName
This 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
-
setRunLater
protected abstract void setRunLater()When a Billboard-Render-Thread is finished, the implementation of this method will be executed later. -
finalAction
protected void finalAction()This method is invoked after the last billboard was rendered. -
justRenderView
-