Package paletai.mapping
Class GenerativeMediaItem
java.lang.Object
paletai.mapping.MediaItem
paletai.mapping.GenerativeMediaItem
A specialized MediaItem subclass for generative content.
Extends MediaItem to handle content generated programmatically by LunaContentGenerator implementations rather than from static media files. Provides custom rendering that integrates generative content with the homography transformation system.
Key features:
- Integration with LunaContentGenerator framework
- Custom rendering pipeline for dynamic content
- Automatic thumbnail generation from generator output
- Inherits all homography transformation capabilities from MediaItem
- See Also:
-
Field Summary
Fields inherited from class paletai.mapping.MediaItem
assignedScreen, calibrate, fileName, generator, mediaHeight, mediaId, mediaWidth, thumbnail, thumbnailX, thumbnailY, vm -
Constructor Summary
ConstructorsConstructorDescriptionGenerativeMediaItem(processing.core.PApplet p, LunaContentGenerator generator, int screenIndex, int mediaId) Constructs a new GenerativeMediaItem with the specified generator.GenerativeMediaItem(processing.core.PApplet p, LunaContentGenerator generator, processing.data.XML mediaXML) Constructs a GenerativeMediaItem from XML configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidrender()Renders the generative content with homography transformation bypassing mediaCanvas.Methods inherited from class paletai.mapping.MediaItem
applyAspectRatioCorrection, assignToDisplay, checkHover, generateThumbnail, getFileName, getFilePath, getMediaCanvas, getThumbnail, hideControls, isLoaded, isVideo, loopMedia, mouseReleased, moveHoverPoint, muteMedia, offCalibration, onCalibration, playMedia, resetHomography, setPreviewArea, setThumbnailPosition, showControls, stopMedia, toggleCalibration, toggleInput, toggleLoop, togglePlayback, updateHomography
-
Constructor Details
-
GenerativeMediaItem
public GenerativeMediaItem(processing.core.PApplet p, LunaContentGenerator generator, int screenIndex, int mediaId) Constructs a new GenerativeMediaItem with the specified generator.- Parameters:
p- The parent PApplet instancegenerator- The content generator to use for this media itemscreenIndex- The screen index this media is assigned tomediaId- Unique identifier for this media item- See Also:
-
GenerativeMediaItem
public GenerativeMediaItem(processing.core.PApplet p, LunaContentGenerator generator, processing.data.XML mediaXML) Constructs a GenerativeMediaItem from XML configuration. Recreates a generative media item from saved project data.- Parameters:
p- The parent PApplet instancegenerator- The content generator to use for this media itemmediaXML- XML element containing media configuration- See Also:
-
-
Method Details
-
render
public void render()Renders the generative content with homography transformation bypassing mediaCanvas. Updates the generator, applies homography transformation to the generator's output graphics, and generates thumbnails when needed.This override provides a custom rendering pipeline that integrates the dynamic generator output with the VidMap transformation system.
-