POV-Ray : Newsgroups : povray.programming : Modify source code of program POVRAY + MPI (please Help) : Re: Modify source code of program POVRAY + MPI (please Help) Server Time
16 Apr 2024 13:17:13 EDT (-0400)
  Re: Modify source code of program POVRAY + MPI (please Help)  
From: Thorsten Froehlich
Date: 4 Jun 2014 17:30:01
Message: <web.538f8f52393ecfd073edb5c70@news.povray.org>
> - Another step performed by vfeSession::SetOptions() might be easily
> overlooked:
>
>      POVMS_Object ropts (obj) ;
>
> Note that while obj is of type POVMSObject, ropts is of type
> POVMS_Object. Fun, huh? :-P What that class does is... well, I actually
> have no clear idea :) But browsing through povmscpp.h, in which that
> type is defined, we find that its parent class POVMS_Container has some
> friend functions called POVMS_SendMessage(), so it is apparently tied to
> the actual sending of the message.

You do not need it to send a message! The C++ class is nothing more than a
wrapper around the C functions of POVMS. You can send messages with the C API
directly.

Or you can mix the C and C++ APIs pretty much as much as you want - like the
quoted code does. The history behind it is trivial: The C++ API was written
years after the C API, so there was lots of C API code around and no need to
convert it to C++.

For a beginner, I would recommend using the POVMS C++ API exclusively because it
greatly reduces the risk of memory leaks and pointer errors.


Post a reply to this message

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