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
Modifier and TypeClassDescriptionstatic enum
class
static enum
Nested classes/interfaces inherited from class heronarts.lx.structure.LXFixture
LXFixture.OutputDefinition, LXFixture.Protocol, LXFixture.Segment, LXFixture.Submodel, LXFixture.Transform, LXFixture.Transport
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Placeholder, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionfinal BooleanParameter
final StringParameter
final MutableParameter
final MutableParameter
static final String
static final char
final BooleanParameter
Fields 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, z
Fields inherited from class heronarts.lx.LXComponent
internalParameters, KEY_CLASS, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFile
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addModelMetaData
(Map<String, String> metaData) Subclasses may override to add additiona metadata fields for inclusion in the modelprotected void
Subclasses must override this method to provide an implementation that produces the necessary set of outputs for this fixture to be sent.protected void
computePointGeometry
(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.void
load
(LX lx, JsonObject obj) Loads the LX component.void
Subclasses are free to override this if desired.void
reload()
void
save
(LX lx, JsonObject obj) Serializes the LX component.protected int
size()
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, totalSize
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameters, contains, copyParameters, getCategory, getChild, 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.LXPath
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
-
-
Constructor Details
-
JsonFixture
-
JsonFixture
-
-
Method Details
-
onParameterChanged
Description copied from class:LXComponent
Subclasses are free to override this if desired. It will automatically fire for any listenable parameter that is registered with this component.- Specified by:
onParameterChanged
in interfaceLXParameterListener
- Overrides:
onParameterChanged
in classLXFixture
- Parameters:
p
- Parameter that has a value change
-
getJsonParameters
-
reload
public void reload() -
buildOutputs
protected void buildOutputs()Description copied from class:LXFixture
Subclasses 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:
buildOutputs
in classLXFixture
-
size
protected int size()Description copied from class:LXFixture
Subclasses 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:LXFixture
This 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:
computePointGeometry
in 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:LXFixture
Subclasses may override to add additiona metadata fields for inclusion in the model- Overrides:
addModelMetaData
in classLXFixture
- Parameters:
metaData
- Map to add meta-data fields to
-
load
Description copied from class:LXComponent
Loads 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:
load
in interfaceLXSerializable
- Overrides:
load
in classLXFixture
- Parameters:
lx
- LX instanceobj
- Object to deserialize
-
save
Description copied from class:LXComponent
Serializes 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:
save
in interfaceLXSerializable
- Overrides:
save
in classLXComponent
- Parameters:
lx
- LX instanceobj
- Object to serialize into
-