ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/RpictSimulManager.h
(Generate patch)

Comparing ray/src/rt/RpictSimulManager.h (file contents):
Revision 2.2 by greg, Sun Aug 18 00:37:13 2024 UTC vs.
Revision 2.6 by greg, Wed Aug 21 23:52:24 2024 UTC

# Line 85 | Line 85 | class PixelAccess { (public)
85                                  refDepth = 1.;
86                                  Init(bp, ystride, dp);
87                          }
88 +                        PixelAccess(COLORV *rp, int ystride, short *dp) {
89 +                                refDepth = 1.;
90 +                                Init(rp, ystride, dp);
91 +                        }
92          void            Init() {
93                                  pbase.f = NULL; dbase.f = NULL;
94                                  rowStride = 0;
# Line 122 | Line 126 | class PixelAccess { (public)
126                                  }
127                                  if (dp) dtyp |= RDTdshort;
128                          }
129 +        void            Init(COLORV *rp, int ystride, short *dp) {
130 +                                pbase.f = rp; dbase.s = dp;
131 +                                rowStride = ystride;
132 +                                if (NCSAMP > 3) {
133 +                                        dtyp = RDTscolor; primp = NULL;
134 +                                } else {
135 +                                        dtyp = RDTrgb; primp = stdprims;
136 +                                }
137 +                                if (dp) dtyp |= RDTdshort;
138 +                        }
139                          /// Set color space after non-empty initialization
140          bool            SetColorSpace(RenderDataType cs, RGBPRIMP pr=NULL);
141                          /// Get color space
# Line 242 | Line 256 | class RpictSimulManager : protected RtraceSimulManager
256          bool                    BelowSampThresh(int x, int y, const int noff[4][2]) const;
257          void                    FillSquare(const int x, const int y, const int noff[4][2]);
258          void                    NewBar(int ht = 0);
259 <        bool                    LowerBar(int v);
259 >        bool                    LowerBar(int v, int ytop);
260          bool                    RenderBelow(int ytop, const int vstep, FILE *pfp,
261                                                          const int dt, FILE *dfp=NULL);
262   public:
# Line 261 | Line 275 | class RpictSimulManager : protected RtraceSimulManager
275                                          frameNo = 0;
276                                  }
277                                  ~RpictSimulManager() {
278 <                                        NewBar();
278 >                                        delete [] barPix; delete [] barDepth;
279                                  }
280                                  /// Load octree and prepare renderer
281          bool                    LoadOctree(const char *octn) {
# Line 325 | Line 339 | class RpictSimulManager : protected RtraceSimulManager
339                                  /// Increments frameNo if >0
340          bool                    NewFrame(const VIEW &v, int xydim[2], double *ap=NULL,
341                                                  const int *tgrid=NULL);
342 +                                /// Get current view if set
343 +        const VIEW *            GetView() const {
344 +                                        if (!vw.type) return NULL;
345 +                                        return &vw;
346 +                                }
347 +                                /// Writeable previous view (for motion blur)
348 +        VIEW &                  PreView() {
349 +                                        return pvw;
350 +                                }
351                                  /// Get current picture width
352          int                     GetWidth() const {
353                                          return hvres[0];
# Line 353 | Line 376 | class RpictSimulManager : protected RtraceSimulManager
376                                  /// Same but also use 16-bit encoded depth buffer
377          bool                    RenderTile(COLRV *bp, int ystride, short *dp,
378                                                  const int *tile=NULL);
379 +                                /// Back to float color with 16-bit depth
380 +        bool                    RenderTile(COLORV *rp, int ystride, short *dp,
381 +                                                const int *tile=NULL);
382                                  /// Render and write a frame to the named file
383                                  /// Include any header lines set prior to call
384 <                                /// Picture file must not already exist
384 >                                /// Picture file must not exist
385                                  /// Write pixels to stdout if !pfname
386                                  /// Write depth to a command if dfname[0]=='!'
387          RenderDataType          RenderFrame(const char *pfname,
# Line 364 | Line 390 | class RpictSimulManager : protected RtraceSimulManager
390                                  /// Resume partially finished rendering
391                                  /// Picture file must exist with valid header
392          RenderDataType          ResumeFrame(const char *pfname,
393 +                                                const char *dfname=NULL);
394 +                                /// Prepare new picture (and depth) output
395 +                                /// Called by RenderFrame()
396 +        RenderDataType          NewOutput(FILE *pdfp[2], const char *pfname,
397 +                                                RenderDataType dt=RDTrgbe,
398 +                                                const char *dfname=NULL);
399 +                                /// Reopen existing picture (and depth) file
400 +                                /// Called by ResumeFrame()
401 +                                /// File pointers @ end of header (before res.)
402 +        RenderDataType          ReopenOutput(FILE *pdfp[2], const char *pfname,
403                                                  const char *dfname=NULL);
404                                  /// Close octree, free data, return status
405          int                     Cleanup(bool everything = false) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines