inprazia

Member
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

107 Neutral

About inprazia

  • Rank
    Member
  1. OpenAL Sound Error C++

    I'm not using the ALUT lib, just basic OpenAL. Didn't have any problems. Just follow the samples included in the OpenAL SDK.
  2. Hi, [font=arial, sans-serif][size=3]I'm searching for information about a software version of the OpenAL compressor effect. Is there a way to use such effect on a sound device supporting only reverberation and low pass filtering?[/size][/font]
  3. Guys, that ain't rocket science after all. If you have 0 slip, then the linear velocity of the point of the wheel touching the ground is zero, and that's enough to work out a kinetic model.
  4. Gauss-Jordan Problems

    At first glance it seems that you should eliminate that peace of code: int maxrow = y + 1;
  5. Well, given the fact that you don't know the uncertainty in the input data, the optimal approach would be to apply some kind of least squares fitting. Try to obtain Y equations for your X markers, where Y >= X, describing the transformations you are talking about. Resolve the obtained system of equations by optimizing the least square error iteratively using the Gauss-Newton algorithm. And don't forget to have fun.
  6. Vector rotation to Euler angles

    It's simple. The atan2f function considers the signs of its two arguments, thus yielding the correct result. By using the atanf function, you loose the sign information.
  7. Mountain (and terrain algorithms)

    Try with Perlin noise, it's one of the most used and efficient ways to create realistic height fields. Check this site: [url="http://www.noisemachine.com/talk1"]http://www.noisemachine.com/talk1[/url]
  8. Quote:Original post by MrRowl Quote:Original post by inprazia Using classes for such purposes is very nice and clean, but for time critical situations I'm always using inline functions or even macroses. As the others suggested, the point is to avoid creating temporally objects for such simple operations. It's true that the compiler would optimize the code if told so, but I suggest you to avoid the practice "do whatever you can imagine, the compiler should find about what you meant". Have you actually tested that? I've gone through large amounts of code replacing things like A = B * a + C with inline functions... and found that the result (when compiler optimisations are enabled) is actually slower than the original. So you may have just been obfuscating your code with no benefit... You're right, in this case the class implementation is faster when optimized. But this is not generally true. If T is float, not double, the inline function is faster on my PC. Moreover, once you have some dynamic memory allocation in the class constructor, the inline function would be a much better solution.
  9. Using classes for such purposes is very nice and clean, but for time critical situations I'm always using inline functions or even macroses. As the others suggested, the point is to avoid creating temporally objects for such simple operations. It's true that the compiler would optimize the code if told so, but I suggest you to avoid the practice "do whatever you can imagine, the compiler should find about what you meant".
  10. Inverse kinematics

    The way you define your problem, is just the standard definition of the inverse kinematics problem. I miss what is the difference in your case. Anyway, in a 3D world, there is no trivial solution. Even if you simplify the task decreasing the degrees of freedom in the body, the presence of constrains strongly suggests an iterative algorithm.
  11. Hi, from what I remember, your angular velocity quaternion is wrong. Try the following association between rotations and axes: X -> ROLL (p) Y -> PITCH (q) Z -> YAW (r) Also, you don't need the additional scale step, just start with: W = [0 p/2 q/2 r/2] Finally, if you change coordinate systems, it's possible to have inertial effects and thus variable angular velocity. But that's not your case. Have fun transforming.