Package ilda
Class IldaFrame
java.lang.Object
be.cmbsoft.ilda.IldaFrame
A frame is essentially a collection of points, and some metadata. It can render its
geometry
to a PGraphics.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Fix the header of the current framestatic void
Static version of fixHeader() See documentation therestatic void
fixHeaders
(IldaFrame[] frames) static void
fixHeaders
(List<IldaFrame> frames) Fixes the frame headers eg. updates point count, frame number, total frames, ...static void
fixHeaders
(List<IldaFrame> frames, String frameName, String companyName) Fixes the frame headers eg.updates point count, frame number, total frames It sets the frame name and company name to the arguments you gave it.int
int
int
int
int
boolean
void
palettePaint
(IldaPalette palette) processing.core.PGraphics
renderFrame
(processing.core.PApplet parent) processing.core.PGraphics
renderFrame
(processing.core.PApplet parent, boolean showBlanking) processing.core.PGraphics
renderFrame
(processing.core.PApplet parent, boolean showBlanking, float rotx, float roty, float rotz) processing.core.PGraphics
renderFrame
(processing.core.PApplet parent, boolean showBlanking, int sizex, int sizey) processing.core.PGraphics
renderFrame
(processing.core.PApplet parent, int sizex, int sizey) processing.core.PGraphics
renderFrame
(processing.core.PGraphics pg, boolean showBlanking) processing.core.PGraphics
renderFrame
(processing.core.PGraphics pg, boolean showBlanking, float rotx, float roty, float rotz) processing.core.PGraphics
renderFrame
(processing.core.PGraphics pg, boolean showBlanking, int sizex, int sizey) processing.core.PGraphics
renderFrame
(processing.core.PGraphics pg, boolean showBlanking, int sizex, int sizey, float rotx, float roty, float rotz) Renders the frame to a PGraphics to be displayed in the sketch.void
setCompanyName
(String companyName) void
setFrameName
(String frameName) void
setFrameNumber
(int frameNumber) void
setIldaFormat
(int versionNumber) Set the ilda version this frame uses. 0 = 3D, palette 1 = 2D, palette 4 = 3D, RGB 5 = 3D, RGB Internally, all frames are 3D and use RGB.void
setPalette
(boolean palette) void
setScannerHead
(int scannerHead) void
setTotalFrames
(int totalFrames) toString()
-
Field Details
-
ildaVersion
protected int ildaVersion -
frameName
-
companyName
-
pointCount
protected int pointCount -
frameNumber
protected int frameNumber -
totalFrames
protected int totalFrames -
scannerHead
protected int scannerHead -
palette
protected boolean palette
-
-
Constructor Details
-
IldaFrame
public IldaFrame()
-
-
Method Details
-
fixHeaders
Fixes the frame headers eg. updates point count, frame number, total frames, ... It leaves the frame name and company name untouched. It assumes the frames form a complete sequence.- Parameters:
frames
- A reference to the frames whose headers need to get fixed.
-
fixHeaders
Fixes the frame headers eg.updates point count, frame number, total frames It sets the frame name and company name to the arguments you gave it. It assumes the frames form a complete sequence (for the total frame entry). Call this before writing to an ilda file- Parameters:
frames
- A reference to the frames whose headers need to get fixed.frameName
- A name you want to give the framecompanyName
- Another name
-
fixHeader
public static void fixHeader(IldaFrame frame, int frameNumber, int totalFrames, String frameName, String companyName) Static version of fixHeader() See documentation there -
fixHeaders
-
addPoint
-
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PApplet parent) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PApplet parent, int sizex, int sizey) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PGraphics pg, boolean showBlanking, int sizex, int sizey) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PApplet parent, boolean showBlanking, int sizex, int sizey) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PGraphics pg, boolean showBlanking) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PGraphics pg, boolean showBlanking, float rotx, float roty, float rotz) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PApplet parent, boolean showBlanking) -
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PApplet parent, boolean showBlanking, float rotx, float roty, float rotz) -
palettePaint
-
getIldaVersion
public int getIldaVersion() -
getFrameName
-
setFrameName
-
getCompanyName
-
setCompanyName
-
getPointCount
public int getPointCount() -
getFrameNumber
public int getFrameNumber() -
setFrameNumber
public void setFrameNumber(int frameNumber) -
getTotalFrames
public int getTotalFrames() -
setTotalFrames
public void setTotalFrames(int totalFrames) -
getScannerHead
public int getScannerHead() -
setScannerHead
public void setScannerHead(int scannerHead) -
isPalette
public boolean isPalette() -
setPalette
public void setPalette(boolean palette) -
fixHeader
Fix the header of the current frame- Parameters:
frameNumber
- index of the frame in the animationtotalFrames
- total frames in the animationframeName
- name of the framecompanyName
- name of the owner/program/company that owns or created the frame
-
setIldaFormat
public void setIldaFormat(int versionNumber) Set the ilda version this frame uses. 0 = 3D, palette 1 = 2D, palette 4 = 3D, RGB 5 = 3D, RGB Internally, all frames are 3D and use RGB. This just stores the version number as a variable, so it can be resaved in the same format if required.- Parameters:
versionNumber
- integer, can be 0, 1, 4 or 5
-
renderFrame
public processing.core.PGraphics renderFrame(processing.core.PGraphics pg, boolean showBlanking, int sizex, int sizey, float rotx, float roty, float rotz) Renders the frame to a PGraphics to be displayed in the sketch. The PGraphics should be 3D a 2D version might get implemented You must call beginDraw() and endDraw() yourself!- Parameters:
pg
- A reference to the PGraphics (it can't generate its own as this usually results in memory leaks)showBlanking
- Should blanking lines be displayed?sizex
- Size of the PGraphics element it returnssizey
-rotx
- Rotation of the frameroty
-rotz
-- Returns:
- a PGraphics with the frame drawn
-
getPoints
-
getCopyOnWritePoints
-
toString
-