public class JsonFixture extends LXFixture
Modifier and Type | Class and Description |
---|---|
class |
JsonFixture.ParameterDefinition |
static class |
JsonFixture.ParameterType |
LXFixture.DynamicIndexBuffer, LXFixture.IndexBufferSegment, LXFixture.Protocol, LXFixture.Submodel
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
BooleanParameter |
error |
StringParameter |
errorMessage |
MutableParameter |
parametersReloaded |
BoundedParameter |
scale |
BooleanParameter |
warning |
List<String> |
warnings |
brightness, children, enabled, identify, mute, NO_SUBMODELS, outputs, pitch, points, roll, selected, solo, x, y, yaw, z
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Constructor and Description |
---|
JsonFixture(LX lx) |
JsonFixture(LX lx,
String fixtureType) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildOutputs()
Subclasses must override this method to provide an implementation that
produces the necessary set of outputs for this fixture to be sent.
|
protected void |
computeGeometryMatrix(LXMatrix geometryMatrix)
Subclasses may override this if they perform geometric transformations in a
different order or using totally different parameters.
|
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.
|
Collection<JsonFixture.ParameterDefinition> |
getJsonParameters() |
protected Map<String,String> |
getMetaData()
Subclasses may override to provide a map of String key/value pairs that are attached
as metadata onto the resulting LXModel object
|
protected String[] |
getModelKeys()
Subclasses may override to return an array of multiple key types.
|
void |
load(LX lx,
JsonObject obj)
Loads the LX component.
|
void |
onParameterChanged(LXParameter p)
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.
|
protected LXFixture.Submodel[] |
toSubmodels()
Subclasses may override when they specify submodels
|
addChild, addGeometryParameter, addMetricsParameter, addOutput, addOutputParameter, addParameter, beforeRegenerate, constructModel, constructPoint, copyPoint, dispose, fixtureGenerationChanged, fixtureGeometryChanged, getFirstPointIndex, getGeometryMatrix, getGeometryMatrix, getIndex, getIndexBufferOffset, getModelKey, getPath, regenerate, reindexOutputs, removeChild, removeOutput, setStructure, toDynamicIndexBuffer, toDynamicIndexBuffer, toDynamicIndexBuffer, toDynamicIndexBuffer, totalSize
addArray, addChild, addInternalParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, handleOscMessage, loadParameters, removeParameter, removeParameter, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public final BoundedParameter scale
public final BooleanParameter error
public final StringParameter errorMessage
public final BooleanParameter warning
public final MutableParameter parametersReloaded
public JsonFixture(LX lx)
protected String[] getModelKeys()
LXFixture
getModelKeys
in class LXFixture
protected Map<String,String> getMetaData()
LXFixture
getMetaData
in class LXFixture
public void onParameterChanged(LXParameter p)
LXComponent
onParameterChanged
in interface LXParameterListener
onParameterChanged
in class LXFixture
p
- Parameter that has a value changepublic Collection<JsonFixture.ParameterDefinition> getJsonParameters()
public void reload()
protected void computeGeometryMatrix(LXMatrix geometryMatrix)
LXFixture
computeGeometryMatrix
in class LXFixture
geometryMatrix
- The geometry transformation matrix for this objectprotected void computePointGeometry(LXMatrix matrix, List<LXPoint> points)
LXFixture
computePointGeometry
in class LXFixture
matrix
- A transform matrix representing the fixture's positionpoints
- The list of points that need to have their positions setprotected void buildOutputs()
LXFixture
LXFixture.addOutput(LXOutput)
for each output.buildOutputs
in class LXFixture
protected LXFixture.Submodel[] toSubmodels()
LXFixture
toSubmodels
in class LXFixture
protected int size()
LXFixture
public void load(LX lx, JsonObject obj)
LXComponent
load
in interface LXSerializable
load
in class LXFixture
lx
- LX instanceobj
- Object to deserializepublic void save(LX lx, JsonObject obj)
LXComponent
super.save(lx, obj)
at the appropriate time.save
in interface LXSerializable
save
in class LXComponent
lx
- LX instanceobj
- Object to serialize intoLX library by Mark C. Slee. © 2012-2020