Panel that vibrates a child widget according to the acceleration sensor or panel movement. More...
Public Member Functions | |
LiveSpringPanel () | |
Constructor. | |
override void | AddChildFirst (Widget child) |
Adds the child widget to the beginning. | |
override void | AddChildLast (Widget child) |
Adds the child widget to the end. | |
override void | InsertChildBefore (Widget child, Widget nextChild) |
Inserts it immediately in front of the specified child widget. | |
override void | InsertChildAfter (Widget child, Widget prevChild) |
Inserts it immediately after the specified child widget. | |
override void | RemoveChild (Widget child) |
Deletes the specified child widget. | |
void | SetDampingConstant (Widget widget, SpringType type, float dampingConstant) |
Sets the spring damping constant (the speed until the vibration converges). | |
float | GetDampingConstant (Widget widget, SpringType type) |
Obtains the spring damping constant (the speed until the vibration converges). | |
void | SetSpringConstant (Widget widget, SpringType type, float springConstant) |
Sets the spring constant (the strength at which the spring tries to return to its original position). | |
float | GetSpringConstant (Widget widget, SpringType type) |
Obtains the spring constant (the strength at which the spring tries to return to its original position). | |
void | SetDisplacement (Widget widget, SpringType type, float displacement) |
Sets the spring displacement (the deviation from the default position). | |
float | GetDisplacement (Widget widget, SpringType type) |
Obtains the spring displacement (the deviation from the default position). | |
void | AddAcceleraton (float x, float y, float z) |
Adds the acceleration to the child widget. | |
Protected Member Functions | |
override void | OnUpdate (float elapsedTime) |
Update processing. | |
internal override void | OnMotionEvent (MotionEvent motionEvent) |
Motion event handler. | |
Properties | |
bool | ReflectSensorAcceleration [get, set] |
Obtains and sets whether to apply the acceleration sensor value to the child widget movement. | |
bool | ReflectMotionAcceleration [get, set] |
Obtains and sets whether to apply the panel movement to the child widget movement. |
Panel that vibrates a child widget according to the acceleration sensor or panel movement.
void AddAcceleraton | ( | float | x, |
float | y, | ||
float | z | ||
) |
Adds the acceleration to the child widget.
x | Acceleration in the X-axis direction |
y | Acceleration in the Y-axis direction |
z | Acceleration in the Z-axis direction |
override void AddChildFirst | ( | Widget | child | ) | [virtual] |
Adds the child widget to the beginning.
child | Child widget to be added |
Moves it to the beginning if it has already been added.
Reimplemented from ContainerWidget.
override void AddChildLast | ( | Widget | child | ) | [virtual] |
Adds the child widget to the end.
child | Child widget to be added |
Moves it to the end if it has already been added.
Reimplemented from ContainerWidget.
float GetDampingConstant | ( | Widget | widget, |
SpringType | type | ||
) |
Obtains the spring damping constant (the speed until the vibration converges).
When this value is between 0 and 1, the larger the value, the shorter the time until the vibration converges. Default is 0.2.
widget | Widget that obtains the damping constant |
type | Type of spring that obtains the damping constant |
float GetDisplacement | ( | Widget | widget, |
SpringType | type | ||
) |
Obtains the spring displacement (the deviation from the default position).
widget | Widget for obtaining the displacement |
type | Type of spring that obtains the displacement |
float GetSpringConstant | ( | Widget | widget, |
SpringType | type | ||
) |
Obtains the spring constant (the strength at which the spring tries to return to its original position).
The vibration decreases as the value between 0 and 1 increases. Default is 0.3.
widget | Widget that obtains the spring constant |
type | Type of spring that obtains the spring constant |
Inserts it immediately after the specified child widget.
child | Child widget to be inserted |
prevChild | Child widget immediately in front of the inserted child widget |
Moves it immediately after the specified child widget if it has already been added.
Reimplemented from ContainerWidget.
Inserts it immediately in front of the specified child widget.
child | Child widget to be inserted |
nextChild | Child widget immediately after the inserted child widget |
Moves it immediately in front of the specified child widget if it has already been added.
Reimplemented from ContainerWidget.
internal override void OnMotionEvent | ( | MotionEvent | motionEvent | ) | [protected, virtual] |
override void OnUpdate | ( | float | elapsedTime | ) | [protected, virtual] |
Update processing.
elapsedTime | Elapsed time from previous update (ms) |
Reimplemented from Widget.
override void RemoveChild | ( | Widget | child | ) | [virtual] |
Deletes the specified child widget.
child | Widget to be deleted |
Reimplemented from ContainerWidget.
void SetDampingConstant | ( | Widget | widget, |
SpringType | type, | ||
float | dampingConstant | ||
) |
Sets the spring damping constant (the speed until the vibration converges).
When this value is between 0 and 1, the larger the value, the shorter the time until the vibration converges. Default is 0.2.
widget | Widget that sets the damping constant. Changes the damping constant of all the widgets when null is specified. |
type | Type of spring that sets the damping constant. Changes the damping constant of all the springs when SpringType.All is specified. |
dampingConstant | Damping constant |
void SetDisplacement | ( | Widget | widget, |
SpringType | type, | ||
float | displacement | ||
) |
Sets the spring displacement (the deviation from the default position).
widget | Widget for setting the displacement |
type | Type of spring that sets the displacement |
displacement | Displacement |
void SetSpringConstant | ( | Widget | widget, |
SpringType | type, | ||
float | springConstant | ||
) |
Sets the spring constant (the strength at which the spring tries to return to its original position).
The vibration decreases as the value between 0 and 1 increases. Default is 0.3.
widget | Widget that sets the spring constant. Changes the spring constant of all the widgets when null is specified. |
type | Type of spring that sets the spring constant. Changes the damping constant of all the springs when SpringType.All is specified. |
springConstant | Spring constant |