251 |
|
COLORV * barPix; // current render bar pixels |
252 |
|
float * barDepth; // current render bar depths |
253 |
|
bool SetTile(const int ti[2]); |
254 |
< |
bool RenderRect(); |
254 |
> |
bool RenderRect(const int x0 = 0, const int y0 = 0); |
255 |
|
bool ComputePixel(int x, int y); |
256 |
< |
bool BelowSampThresh(int x, int y, const int noff[4][2]) const; |
256 |
> |
bool BelowSampThresh(const int x, const int y, |
257 |
> |
const int noff[4][2]) const; |
258 |
|
void FillSquare(const int x, const int y, const int noff[4][2]); |
259 |
|
void NewBar(int ht = 0); |
260 |
|
bool LowerBar(int v, int ytop); |
276 |
|
frameNo = 0; |
277 |
|
} |
278 |
|
~RpictSimulManager() { |
279 |
< |
NewBar(); |
279 |
> |
delete [] barPix; delete [] barDepth; |
280 |
|
} |
281 |
|
/// Load octree and prepare renderer |
282 |
|
bool LoadOctree(const char *octn) { |
295 |
|
return RtraceSimulManager::AddHeader(ac, av); |
296 |
|
} |
297 |
|
/// Get header lines if any |
298 |
< |
const char * GetHeader() const { |
299 |
< |
return RtraceSimulManager::GetHeader(); |
298 |
> |
const char * GetHeadStr() const { |
299 |
> |
return RtraceSimulManager::GetHeadStr(); |
300 |
|
} |
301 |
+ |
/// Look for specific header keyword, return value |
302 |
+ |
const char * GetHeadStr(const char *key, bool inOK = false) const { |
303 |
+ |
return RtraceSimulManager::GetHeadStr(key, inOK); |
304 |
+ |
} |
305 |
|
/// Set number of computation threads (0 => #cores) |
306 |
|
int SetThreadCount(int nt = 0) { |
307 |
|
return RtraceSimulManager::SetThreadCount(nt); |
386 |
|
const int *tile=NULL); |
387 |
|
/// Render and write a frame to the named file |
388 |
|
/// Include any header lines set prior to call |
389 |
< |
/// Picture file must not already exist |
389 |
> |
/// Picture file must not exist |
390 |
|
/// Write pixels to stdout if !pfname |
391 |
|
/// Write depth to a command if dfname[0]=='!' |
392 |
|
RenderDataType RenderFrame(const char *pfname, |
395 |
|
/// Resume partially finished rendering |
396 |
|
/// Picture file must exist with valid header |
397 |
|
RenderDataType ResumeFrame(const char *pfname, |
398 |
+ |
const char *dfname=NULL); |
399 |
+ |
/// Prepare new picture (and depth) output |
400 |
+ |
/// Called by RenderFrame() |
401 |
+ |
RenderDataType NewOutput(FILE *pdfp[2], const char *pfname, |
402 |
+ |
RenderDataType dt=RDTrgbe, |
403 |
+ |
const char *dfname=NULL); |
404 |
+ |
/// Reopen existing picture (and depth) file |
405 |
+ |
/// Called by ResumeFrame() |
406 |
+ |
/// File pointers @ end of header (before res.) |
407 |
+ |
RenderDataType ReopenOutput(FILE *pdfp[2], const char *pfname, |
408 |
|
const char *dfname=NULL); |
409 |
|
/// Close octree, free data, return status |
410 |
|
int Cleanup(bool everything = false) { |