com.actronika.skineticsdk.EffectProperties
Public Functions
Name | |
---|---|
EffectProperties(Context context) Haptic effect instances reproduce a pattern with variations describes by the following properties: |
Public Attributes
Name | |
---|---|
int | priority priority (default - 5): level of priority [1; 10] of the effect. |
float | volume volume (default - 100): percentage of the base volume between [0; 250]%: [0;100[% the pattern attenuated, 100% the pattern's base volume is preserved, ]100; 250]% the pattern is amplified. |
float | speed speed (default - 1): time scale between [0.01; 100]: [0.01; 1[ the pattern is slowed down, 1 the pattern timing is preserved, ]1; 100] the pattern is accelerated. |
int | repeatCount repeatCount (default - 1): number of repetition of the pattern if the maxDuration is not reached. |
float | repeatDelay repeatDelay (default - 0): pause in second between to repetition of the pattern, this value is not affected by the speed parameter. |
float | playAtTime playAtTime (default - 0): time in the pattern at which the effect start to play. |
float | maxDuration maxDuration (default - 0): maximum duration of the effect, it is automatically stopped if the duration is reached without any regards for the actual state of the repeatCount. |
int | effectBoost height (default - 0): normalized height [-1; 1] to translate the pattern by. |
boolean | overridePatternBoost overridePatternBoost (default - false): By setting this boolean to true, the effect will use the effectBoost value instead of the default pattern value. |
float | height height (default - 0): normalized height [-1; 1] to translate the pattern by. |
float | heading heading (default - 0): heading angle (in degree) to rotate the pattern by in the horizontal plan. |
float | tilting tilting (default - 0): tilting angle (in degree) to rotate the pattern by in the sagittal plan. |
boolean | frontBackInversion (default - false) Invert the direction of the pattern on the front-back axis. |
boolean | upDownInversion (default - false) Invert the direction of the pattern on the up-down axis. |
boolean | rightLeftInversion (default - false) Invert the direction of the pattern on the right-left axis. |
boolean | frontBackAddition (default - false) Perform a front-back addition of the pattern on the front-back axis. |
boolean | upDownAddition (default - false) Perform a up-down addition of the pattern on the front-back axis. |
boolean | rightLeftAddition (default - false) Perform a right-left addition of the pattern on the front-back axis. |
Public Functions Documentation
function EffectProperties
public EffectProperties(
Context context
)
Haptic effect instances reproduce a pattern with variations describes by the following properties:
- priority: level of priority [1; 10] of the effect. In case too many effects are playing simultaneously, the effect with lowest priority (10) will be muted.
- volume: percentage of the base volume between [0; 250]%: [0;100[% the pattern attenuated, 100% the pattern's base volume is preserved, ]100; 250]% the pattern is amplified. Too much amplification may lead to the clipping of the haptic effects, distorting them and producing audible noise.
- speed: time scale between [0.01; 100]: [0.01; 1[ the pattern is slowed down, 1 the pattern timing is preserved, ]1; 100] the pattern is accelerated. The resulting speed between the haptic effect's and the samples' speed within the pattern cannot exceed these bounds. Slowing down or accelerating a sample too much may result in an haptically poor effect.
- repeatCount: number of repetition of the pattern if the maxDuration is not reached. If 0, the pattern is repeat indefinitely until it is either stopped with stopEffect() or reach the maxDuration value.
- repeatDelay: pause in second between to repetition of the pattern, this value is not affected by the speed parameter.
- playAtTime: time in the pattern at which the effect start to play. This value need to be lower than the maxDuration. It also takes into account the repeatCount and the repeatDelay of the pattern.
- maxDuration: maximum duration of the effect, it is automatically stopped if the duration is reached without any regards for the actual state of the repeatCount. A maxDuration of 0 remove the duration limit, making the effect ables to play indefinitely. This value is not affected by the speed and the playAtTime parameters.
- effectBoost: Boost intensity level percent [-100; 100] of the effect to use instead of the default pattern value if overridePatternBoost is set to true. By using a negative value, can decrease or even nullify the global intensity boost set by the user.
- overridePatternBoost: By setting this boolean to true, the effect will use the effectBoost value instead of the default pattern value. The next properties allows to apply the pattern on the haptic device at a different location by translating/rotating it or performing some inversion/addition:
- height: height (in meter) to translate the pattern by.
- heading: heading angle (in degree) to rotate the pattern by in the horizontal plan.
- tilting: tilting angle (in degree) to rotate the pattern by in the sagittal plan.
- frontBackInversion: invert the direction of the pattern on the front-back axis. Can be combine with other inversion or addition.
- upDownInversion: invert the direction of the pattern on the up-down axis. Can be combine with other inversion or addition.
- rightLeftInversion: invert the direction of the pattern on the right-left axis. Can be combine with other inversion or addition.
- frontBackAddition: perform a front-back addition of the pattern on the front-back axis. Overrides the frontBackInversion. Can be combine with other inversion or addition.
- upDownAddition: perform a up-down addition of the pattern on the front-back axis. Overrides the upDownInversion. an be combine with other inversion or addition.
- rightLeftAddition: perform a right-left addition of the pattern on the front-back axis. Overrides the rightLeftInversion. Can be combine with other inversion or addition.
The global boost intensity is applied to every effects being rendered as to increase them evenly. However, some effects are by design stronger than others. Hence, they all have a default boost value in the .spn that is added to the global boost intensity, and which can be set to compensate the discrepancy of intensity across a set of patterns. Weaker effects can have a high default boost value while, already strong effects can have a negative default boost value as to prevent the global boost intensity set by the user to increase the perceived intensity too much. Note that the resulting boost value is clamp between 0 and 100. When an instance of an effect is being rendered, the default boost value of the pattern, the one set in the design process, is used. If the boolean overridePatternBoost is set to true, the passed value effectBoost is used instead of the default one.
Notice that combining additions greatly increase the processing time of the transformation. If the pattern possesses too many shapes and keys, a perceptible delay might be induced.
The three transformations are applied in this order: tilting, vertical rotation, vertical translation. The default position of a pattern is the one obtained when these three parameters are set to zero. The actual use of these 3 parameters depends on the default position of the pattern and the targeted interaction: e.g.; for a piercing shot, a heading between [-180; 180]° can be combined with a tilting between [-90; 90] when using a shape-based pattern centered in the middle of the torso; for a environmental effect, a heading between [-90; 90]° (or [-180; 180]°) can be combined with a tilting between [-180; 180]° (resp. [-180; 0]°) when using a pattern with shapes centered on the top, etc. There are no actual bounds to the angles as not to restrict the usage. Notice that actuator-based patterns cannot be transformed in this version.
Since all effects cannot be rendered simultaneously, the least priority ones are muted until the more priority ones are stopped of finished rendering. Muted effects are still running, but not rendered.
The priority order is obtain using the priority level: priority increase from 10 to 1. In case of equality, the number of required simultaneous samples is used to determine which effect has the highest priority: effects using less simultaneous samples have a higher priority. Again, if the number of required simultaneous samples is the same, the most recent effect has a higher priority.
Public Attributes Documentation
variable priority
int priority;
priority (default - 5): level of priority [1; 10] of the effect.
In case too many effects are playing simultaneously, the effect with lowest priority (10) will be muted.
variable volume
float volume;
volume (default - 100): percentage of the base volume between [0; 250]%: [0;100[% the pattern attenuated, 100% the pattern's base volume is preserved, ]100; 250]% the pattern is amplified.
Too much amplification may lead to the clipping of the haptic effects, distorting them and producing audible noise.
variable speed
float speed;
speed (default - 1): time scale between [0.01; 100]: [0.01; 1[ the pattern is slowed down, 1 the pattern timing is preserved, ]1; 100] the pattern is accelerated.
The resulting speed between the haptic effect's and the samples' speed within the pattern cannot exceed these bounds. Slowing down or accelerating a sample too much may result in an haptically poor effect.
variable repeatCount
int repeatCount;
repeatCount (default - 1): number of repetition of the pattern if the maxDuration is not reached.
If 0, the pattern is repeat indefinitely until it is either stopped with stopEffect() or reach the maxDuration value.
variable repeatDelay
float repeatDelay;
repeatDelay (default - 0): pause in second between to repetition of the pattern, this value is not affected by the speed parameter.
variable playAtTime
float playAtTime;
playAtTime (default - 0): time in the pattern at which the effect start to play.
This value need to be lower than the maxDuration. It also takes into account the repeatCount and the repeatDelay of the pattern.
variable maxDuration
float maxDuration;
maxDuration (default - 0): maximum duration of the effect, it is automatically stopped if the duration is reached without any regards for the actual state of the repeatCount.
A maxDuration of 0 remove the duration limit, making the effect ables to play indefinitely.
variable effectBoost
int effectBoost;
height (default - 0): normalized height [-1; 1] to translate the pattern by.
A positive value translate the pattern upwards.
variable overridePatternBoost
boolean overridePatternBoost;
overridePatternBoost (default - false): By setting this boolean to true, the effect will use the effectBoost value instead of the default pattern value.
variable height
float height;
height (default - 0): normalized height [-1; 1] to translate the pattern by.
A positive value translate the pattern upwards. Not applicable to actuator-based patterns.
variable heading
float heading;
heading (default - 0): heading angle (in degree) to rotate the pattern by in the horizontal plan.
A positive value rotates the pattern to the left of the vest. Not applicable to actuator-based patterns.
variable tilting
float tilting;
tilting (default - 0): tilting angle (in degree) to rotate the pattern by in the sagittal plan.
A positive value rotates the pattern upwards from front to back. Not applicable to actuator-based patterns.
variable frontBackInversion
boolean frontBackInversion;
(default - false) Invert the direction of the pattern on the front-back axis.
Can be combine with other inversion or addition. Not applicable to actuator-based patterns.
variable upDownInversion
boolean upDownInversion;
(default - false) Invert the direction of the pattern on the up-down axis.
Can be combine with other inversion or addition. Not applicable to actuator-based patterns.
variable rightLeftInversion
boolean rightLeftInversion;
(default - false) Invert the direction of the pattern on the right-left axis.
Can be combine with other inversion or addition. Not applicable to actuator-based patterns.
variable frontBackAddition
boolean frontBackAddition;
(default - false) Perform a front-back addition of the pattern on the front-back axis.
Overrides the frontBackInversion. Can be combine with other inversion or addition. Not applicable to actuator-based patterns.
variable upDownAddition
boolean upDownAddition;
(default - false) Perform a up-down addition of the pattern on the front-back axis.
Overrides the upDownInversion. an be combine with other inversion or addition. Not applicable to actuator-based patterns.
variable rightLeftAddition
boolean rightLeftAddition;
(default - false) Perform a right-left addition of the pattern on the front-back axis.
Overrides the rightLeftInversion. Can be combine with other inversion or addition. Not applicable to actuator-based patterns.
Updated on 2024-06-05 at 16:05:52 +0000