Package heronarts.lx.structure
Class LXStructure
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.structure.LXStructure
- All Implemented Interfaces:
LXPath,LXSerializable,LXParameterListener,LXFixtureContainer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListener interface for the top-level structurestatic interfaceImplementation-only interface to relay model changes back to the core LX instance.static enumNested 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 BooleanParameterfinal StringParameterfinal BooleanParameterfinal BoundedParameterfinal BoundedParameterfinal BoundedParameterfinal BoundedParameterfinal BoundedParameterfinal BoundedParameterfinal LXStructureOutputfinal StringParameterfinal BooleanParameterfinal BooleanParameterfinal LXViewEngineFields inherited from class heronarts.lx.LXComponent
childArrays, children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, 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
ConstructorsConstructorDescriptionLXStructure(LX lx, LXModel immutable, LXStructure.ModelListener modelListener) -
Method Summary
Modifier and TypeMethodDescriptionaddFixture(LXFixture fixture) addFixture(LXFixture fixture, int index) addListener(LXStructure.Listener listener) adjustSelectedFixtureBrightness(float delta) voiddispose()Invoked when a component is being removed from the system and will no longer be used at all.enableSelectedFixtures(boolean enabled) exportModel(File file) voidexportViews(File file) voidfixtureGenerationChanged(LXFixture fixture) The generation of this fixture has changed, its metrics or hierarchy are now different.voidfixtureGeometryChanged(LXFixture fixture) The geometry of this fixture has changed, its metrics and hierarchy are consistent but the point locations may have changed.voidfixtureOutputChanged(LXFixture fixture) The output settings of this fixture has changed, the top level structure should re-consolidate all the outputs.voidfixtureTagsChanged(LXFixture fixture) The tags of this fixture has changed, the container will need to take this into account.getModel()getPath()Accessor for the path of this object.identifySelectedFixtures(boolean identify) importModel(File file) importViews(File file) booleanisDirty()booleanvoidload(LX lx, JsonObject obj) Loads the LX component.moveFixture(LXFixture fixture, int index) voidreload()removeFixture(LXFixture fixture) removeFixtures(List<LXFixture> fixtures) removeListener(LXStructure.Listener listener) rotateSelectedFixtures(float theta, float phi) rotateSelectedFixtures(float theta, float phi, LXCommand.Structure.ModifyFixturePositions action) voidsave(LX lx, JsonObject obj) Serializes the LX component.selectFixture(LXFixture fixture) selectFixture(LXFixture fixture, boolean isMultipleSelection) selectFixtureRange(LXFixture fixture) setStaticModel(LXModel model) soloFixture(LXFixture fixture) translateSelectedFixtures(float tx, float ty, float tz) translateSelectedFixtures(float tx, float ty, float tz, LXCommand.Structure.ModifyFixturePositions action) Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, 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, onParameterChanged, 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
-
modelName
-
isStatic
-
syncModelFile
-
outputError
-
allWhite
-
mute
-
normalizationMode
-
normalizationX
-
normalizationY
-
normalizationZ
-
normalizationWidth
-
normalizationHeight
-
normalizationDepth
-
showNormalizationBounds
-
fixtures
-
output
-
views
-
-
Constructor Details
-
LXStructure
-
-
Method Details
-
getPath
Description copied from class:LXComponentAccessor for the path of this object. Returns the path this component was registered with. Some subclasses may override this if path structure is dynamic.- Specified by:
getPathin interfaceLXPath- Overrides:
getPathin classLXComponent- Returns:
- path of this component relative to its parent
-
getModelFile
-
getModel
-
addListener
-
removeListener
-
addFixture
-
addFixture
-
moveFixture
-
selectFixtureRange
-
selectAllFixtures
-
selectFixture
-
selectFixture
-
soloFixture
-
getSelectedFixtures
-
removeFixtures
-
removeSelectedFixtures
-
removeFixture
-
translateSelectedFixtures
-
translateSelectedFixtures
public LXStructure translateSelectedFixtures(float tx, float ty, float tz, LXCommand.Structure.ModifyFixturePositions action) -
rotateSelectedFixtures
-
rotateSelectedFixtures
public LXStructure rotateSelectedFixtures(float theta, float phi, LXCommand.Structure.ModifyFixturePositions action) -
adjustSelectedFixtureBrightness
-
enableSelectedFixtures
-
identifySelectedFixtures
-
newDynamicModel
-
setStaticModel
-
fixtureGenerationChanged
Description copied from interface:LXFixtureContainerThe generation of this fixture has changed, its metrics or hierarchy are now different. The container will need to take this into account.- Specified by:
fixtureGenerationChangedin interfaceLXFixtureContainer- Parameters:
fixture- Fixture that has changed
-
fixtureGeometryChanged
Description copied from interface:LXFixtureContainerThe geometry of this fixture has changed, its metrics and hierarchy are consistent but the point locations may have changed.- Specified by:
fixtureGeometryChangedin interfaceLXFixtureContainer- Parameters:
fixture- Fixture that has changed
-
fixtureOutputChanged
Description copied from interface:LXFixtureContainerThe output settings of this fixture has changed, the top level structure should re-consolidate all the outputs.- Specified by:
fixtureOutputChangedin interfaceLXFixtureContainer- Parameters:
fixture- Fixture that has changed
-
fixtureTagsChanged
Description copied from interface:LXFixtureContainerThe tags of this fixture has changed, the container will need to take this into account.- Specified by:
fixtureTagsChangedin interfaceLXFixtureContainer- Parameters:
fixture- Fixture that has changed
-
isExternalModel
public boolean isExternalModel() -
isDirty
public boolean isDirty() -
reload
public void reload() -
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 classLXComponent- 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
-
importModel
-
exportModel
-
exportViews
-
importViews
-
dispose
public void dispose()Description copied from class:LXComponentInvoked when a component is being removed from the system and will no longer be used at all. This unregisters the component and should free up any resources and parameter listeners. Ideally after this method is called the object should be eligible for garbage collection. Subclasses are generally expected to override this method to handle their particular cleanup work. They should also generally callsuper.dispose()at the appropriate time to perform the basic cleanup, which may need to happen either before or after cleaning up other objects.- Overrides:
disposein classLXComponent
-