public class UIPointCloud extends UI3dComponent implements LXSerializable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
protected P3LX |
lx |
BoundedParameter |
pointSize |
protected float[] |
pointSizeAttenuation |
children, hasFocus, mousePressContextMenu, visible
Constructor and Description |
---|
UIPointCloud(P3LX lx)
Point cloud for everything in the LX instance
|
Modifier and Type | Method and Description |
---|---|
UIPointCloud |
disablePointSizeAttenuation()
Disable point size attenuation
|
void |
load(LX lx,
JsonObject object)
Restores this instance from a JSON object
|
protected void |
onDraw(UI ui,
PGraphics pg)
Subclasses should override this method to perform their drawing functions.
|
void |
save(LX lx,
JsonObject object)
Serializes this instance into the JSON object
|
UIPointCloud |
setPointSize(float pointSize)
Sets the size of points
|
UIPointCloud |
setPointSizeAttenuation(float a,
float b,
float c)
Sets point size attenuation, fn = 1/sqrt(constant + linear*d + quadratic*d^2)
|
addChild, contains, getHeight, getWidth, removeChild
addLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getDescription, getFocusedChild, getLX, getParent, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onFocus, onUIResize, removeLoopTask, setDescription, setVisible, toggleVisible
onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMousePressed, onMouseReleased, onMouseWheel
protected final P3LX lx
public final BoundedParameter pointSize
protected float[] pointSizeAttenuation
public UIPointCloud(P3LX lx)
lx
- LX instancepublic UIPointCloud setPointSize(float pointSize)
pointSize
- Point sizepublic UIPointCloud disablePointSizeAttenuation()
public UIPointCloud setPointSizeAttenuation(float a, float b, float c)
a
- Constant factorb
- Linear factorc
- Quadratic factorprotected void onDraw(UI ui, PGraphics pg)
UIObject
public void save(LX lx, JsonObject object)
LXSerializable
save
in interface LXSerializable
lx
- LX instanceobject
- Object to serialize intopublic void load(LX lx, JsonObject object)
LXSerializable
load
in interface LXSerializable
lx
- LX instanceobject
- Object to deserializeLX library by Mark C. Slee. © 2012-2020