Package heronarts.lx.structure
Class JsonFixture
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.structure.LXFixture
heronarts.lx.structure.JsonFixture
- All Implemented Interfaces:
LXComponent.Renamable,LXPath,LXSerializable,LXParameterListener,LXFixtureContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclassstatic enumNested classes/interfaces inherited from class heronarts.lx.structure.LXFixture
LXFixture.OutputDefinition, LXFixture.Protocol, LXFixture.Segment, LXFixture.Submodel, LXFixture.Transform, LXFixture.TransportNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.Placeholder, LXComponent.PluginRequired, LXComponent.RenamableNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BooleanParameterfinal StringParameterfinal List<LXModel.Mesh> final MutableParameterfinal MutableParameterstatic final Stringstatic final charfinal BooleanParameterFields inherited from class heronarts.lx.structure.LXFixture
brightness, children, deactivate, DEFAULT_OUTPUT_REPEAT, DEFAULT_OUTPUT_STRIDE, enabled, identify, metaData, mute, NO_SUBMODELS, outputDefinitions, outputsDirect, pitch, points, POSITION_RANGE, roll, scale, selected, solo, tagList, tags, x, y, yaw, zFields inherited from class heronarts.lx.LXComponent
childArrays, internalParameters, KEY_CLASS, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFileFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddModelMetaData(Map<String, String> metaData) Subclasses may override to add additiona metadata fields for inclusion in the modelprotected voidSubclasses must override this method to provide an implementation that produces the necessary set of outputs for this fixture to be sent.protected voidcomputePointGeometry(LXMatrix matrix, List<LXPoint> points) This method should be implemented by subclasses to generate the geometry of the fixture any time its geometry parameters have changed.protected List<LXModel.Mesh> voidload(LX lx, JsonObject obj) Loads the LX component.voidSubclasses are free to override this if desired.voidreload()voidsave(LX lx, JsonObject obj) Serializes the LX component.protected intsize()Subclasses must implement to specify the number of points in the fixture.Methods inherited from class heronarts.lx.structure.LXFixture
addChild, addGeometryParameter, addMetricsParameter, addOutputDefinition, addOutputDirect, addOutputParameter, addParameter, addTagParameter, addTransform, beforeRegenerate, clearTransforms, computeGeometryMatrix, constructModel, constructPoint, copyPoint, dispose, fixtureGenerationChanged, fixtureGeometryChanged, fixtureOutputChanged, fixtureTagsChanged, getDefaultTags, getFirstPointIndex, getGeometryMatrix, getGeometryMatrix, getIndex, getIndexBufferOffset, getPath, regenerate, regenerateOutputs, reindexOutputs, removeChild, removeOutputDefinition, removeOutputDirect, setStructure, setTags, toSubmodels, totalSizeMethods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, hasParameter, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
PATH_SEPARATOR
- See Also:
-
PATH_SEPARATOR_CHAR
public static final char PATH_SEPARATOR_CHAR- See Also:
-
error
-
errorMessage
-
warning
-
parametersDisposed
-
parametersReloaded
-
warnings
-
meshes
-
-
Constructor Details
-
JsonFixture
-
JsonFixture
-
-
Method Details
-
onParameterChanged
Description copied from class:LXComponentSubclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChangedin interfaceLXParameterListener- Overrides:
onParameterChangedin classLXFixture- Parameters:
p- Parameter that has a value change
-
getFixturePath
-
getJsonParameters
-
reload
public void reload() -
buildOutputs
protected void buildOutputs()Description copied from class:LXFixtureSubclasses must override this method to provide an implementation that produces the necessary set of outputs for this fixture to be sent. The subclass should callLXFixture.addOutputDefinition(OutputDefinition)orLXFixture.addOutputDirect(LXOutput)for each output.- Specified by:
buildOutputsin classLXFixture
-
getModelMeshes
- Overrides:
getModelMeshesin classLXFixture
-
size
protected int size()Description copied from class:LXFixtureSubclasses must implement to specify the number of points in the fixture. This does not include the number of points that are in children. -
computePointGeometry
Description copied from class:LXFixtureThis method should be implemented by subclasses to generate the geometry of the fixture any time its geometry parameters have changed. The correct number of points will have already been computed, and merely need to have their positions set.- Specified by:
computePointGeometryin classLXFixture- Parameters:
matrix- A transform matrix representing the fixture's positionpoints- The list of points that need to have their positions set
-
addModelMetaData
Description copied from class:LXFixtureSubclasses may override to add additiona metadata fields for inclusion in the model- Overrides:
addModelMetaDatain classLXFixture- Parameters:
metaData- Map to add meta-data fields to
-
load
Description copied from class:LXComponentLoads the LX component. Restores the ID of the component, as well as its internal and user-facing parameters. Any explicitly registered children will be automatically loaded, so long as they are direct descendants. Dynamic arrays will not be automatically loaded, this is left to subclasses to implement.- Specified by:
loadin interfaceLXSerializable- Overrides:
loadin classLXFixture- Parameters:
lx- LX instanceobj- Object to deserialize
-
save
Description copied from class:LXComponentSerializes the LX component. By default, all internal and user-facing parameters are serialized, as well as any explicitly registered child components. Note that child arrays are not serialized, or any other dynamic components. Subclasses may override to perform more saving, and are expected to callsuper.save(lx, obj)at the appropriate time.- Specified by:
savein interfaceLXSerializable- Overrides:
savein classLXComponent- Parameters:
lx- LX instanceobj- Object to serialize into
-