# _swx_

Members

163

1138 Excellent

• Rank
Member
1. ## Getting bounding box of convex polyhedron without the points?

I think the standard approach is to have a really large "world cube" as the initial shape and clip it against the planes. This is the approach in most papers I've read and the one I'm using. I am however using a plane based representation for all the actual operations, and only compute points for rendering since this allows me to have 100% robust CSG operations.

3. ## OpenGL OpenGL supporting libs

One good reason not to use GLM is that Eigen is much more versatile and suitable for more than simple graphics calculations :) GLM doesn't have any of the advanced features that Eigen has and mixing different math libraries is messy as hell.
4. ## Baking high-poly to low-poly

www.cs.unc.edu/~olano/papers/SuccessiveMapping.IJCGA.pdf?   "In this paper we present a new simplification algorithm, which computes a piece-wise linear mapping between the original surface and the simplified surface"   Some images from an old implementation I did: Left: High poly Middle: Low poly Right: High poly geometry mapped onto low-poly mesh   Any property can be transferred from the high poly version.
5. ## sugar consumption

I'm on a ketogenic diet, so I eat almost no carbohydrates at all. No negative side effects as far as I can tell :)
6. ## When to Use Interpolation in Animations

Who exactly decides what's allowed, and how come Bitsquid is excempt from those rules?
7. ## When to Use Interpolation in Animations

I'm using a system similar to the one described here: http://bitsquid.blogspot.se/2009/11/bitsquid-low-level-animation-system.html http://bitsquid.blogspot.se/2011/10/low-level-animation-part-2.html
8. ## Question on conversion functions

struct Vector2D{ float x, y; }; struct Point2D{ float x, y; operator Vector2D() const { Vector2D r = { x, y }; return r; } }; Point2D operator-(const Point2D &lh, const Point2D &rh) { Point2D r = { lh.x - rh.x, lh.y - rh.y }; return r; } int main() { Point2D x = { 1, 1 }; Point2D y = { 2, 2 }; Vector2D z = x - y; }
9. ## Question on conversion functions

I don't recommend having different types for points and vectors though... it will make your code much messier with lots of conversions.
10. ## Question on conversion functions

Avoid conversion operators and find alternative solutions like: Vector2D operator-(const Position2D &lh, const Position2D &rh) { return Vector2D(lh.x - rh.x, lh.y - rh.y); }
11. ## Are there any standards to organizing game file and data chunks?

I use json for pretty much all my resource files except textures, models and other very large resource types. This allows my resource compiler to automatically find dependencies between the resources.
12. ## Looking for fast c++ math library

http://macton.smugmug.com/gallery/8936708_T6zQX#!i=593426709&k=BrHWXdJ is a good read if you want to write really efficient code, even if the author is a bit smug ;)
13. ## Looking for fast c++ math library

Use SSE intrinsics?   __m128 x = _mm_set_ps(3*3, 2*2, 4*4, 8*8); __m128 y = _mm_sqrt_ps(x); // sqrt(x) __m128 z = _mm_mul_ps(y, y); // sqrt(x) * sqrt(x)   Or use a library like Eigen (http://eigen.tuxfamily.org).   Edit: I don't know how much faster using SSE is (if at all). Anyway, Alvaro has the best solution. An actual distance value is very rarely needed.