H3D.org Forum Index Programming Issues
Is this a bug in CoordinateDeformer with multiple haptic devices? | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| karlu | Posted on: 2012/1/5 15:07 |
Guru ![]() ![]() Joined: 2004/12/2 From: Sweden Posts: 765 |
Re: Is this a bug in CoordinateDeformer with multiple haptic devices? There are two ways to find the maximum value. Either you start with a value you know is lower than any value that may be and iterate over all devices, or you start with the value of the first device (if you know one exists) and iterate over the rest of them. The loop is not treating the first device differently, just treating it first. I would not recommend this way of coding since it includes unnecessary duplication of code and may confuse some readers.
You could, for the patch, replace the treatment of the first device with setting max_value to -1 and set the iteration to include index zero.
|
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| |
cgunn | 2012/1/4 10:00 |
| |
karlu | 2012/1/4 20:38 |
| |
Markus | 2012/1/4 23:26 |
| |
karlu | 2012/1/5 1:31 |
| |
cgunn | 2012/1/5 8:02 |
| » |
karlu | 2012/1/5 15:07 |
| |
cgunn | 2012/1/6 7:59 |
| |
Markus | 2012/1/9 15:16 |
| |
cgunn | 2012/1/10 14:49 |
| Register To Post | |


