Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 Feb 2005
Offline Last Active Feb 06 2014 02:43 AM

Topics I've Started

Visual Studio - intercepting debug messages

20 August 2013 - 12:37 AM

As the title says; any hint on how to do it? I need to get somehow the debug messages sent by a tool to the debug window and filter them. 

Thanks for any help.

using boost multi array

16 October 2010 - 11:32 PM

In one of my project I need to handle a 3d array of 3d points and I'm using boost multi array to store it. The problem is that when I allocate a large array, say 1000x500x500 a bad_alloc exception is thrown. With smaller array all goes ok.
Here's the declaration:

boost::multi_array<Point3d, 3> m_array3d;

Am I hitting some maximum allocation limit of multi_array? Or am I using it wrong?
Any suggestions?

declaring a variable inside or outside a loop - why the difference?

20 September 2010 - 08:59 AM

I'm trying to optimize my raytracer, so I started to measure the execution time of my methods. I've noticed that there's a big difference in execution time depending on where do I declare the variables. Take a look:

Vector v(1, 1, 1);
for(unsigned int i=0;i<100000000;i++){

This took 3.3426 sec to execute.

for(unsigned int i=0;i<100000000;i++){
Vector v(1, 1, 1);

This took 0.0000014 sec to execute.

Where this difference come from?

need help with haskell code

15 September 2010 - 02:42 AM

I'm trying to implement deformations in my sphere tracer. For some reason they dont work very well for me, so I looked for some code that implement them and I found this haskell program, which I intend to experiment with. Trying to compile it gives the following error:

Couldn't match expected type `Eval b' against inferred type `()'
In the first argument of `parMap', namely `rnf'
In the expression:
rnf (map (maybe (0, 0, 0) toRGB24 . rayTrace scene 100)) rays
In the definition of `colors':
colors = parMap
rnf (map (maybe (0, 0, 0) toRGB24 . rayTrace scene 100)) rays

The problem is I dont know nothing about haskell (nothing about functional programming), so can anybody help me make this program compile?

trigonometry question

06 April 2010 - 11:22 AM

I'm trying to do something like a curved wall, made off of bricks (some OBBB's). I managed to put them in an arc of a circle path, but I fail to determine the angle by which I should rotate them to make them look at the center of the circle. I'd appreciate any help.