POV-Ray : Newsgroups : povray.programming : Array pointers : Array pointers Server Time
4 Oct 2024 17:09:38 EDT (-0400)
  Array pointers  
From: Reusser
Date: 16 Jan 2003 19:45:04
Message: <160120031840217575%reu1000@chorus.net>
Sorry since I already know this is not the best place to be posting
questions like this, but it should be relatively simple.
   I had an interpolation macro for a grid of points all set up in POV,
and I'm working on translating it into C++.   Needless to say, it
doesn't work like POV.  What is the most efficient (or at least
somewhat straightforward) way to pass any array[x][y][z] into the
function where it can be referenced like array[a][b][c] or
array[a+1][b][c]?  It works but doesn't seem efficient to just use a
pointer and &*pointer++; within the function.
   (Also, why does the line, double N = 1/3; give me .333...?  Is there
a way to accomplish this without double N = pow(3,-1);?)

 - Ricky


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.