POV-Ray : Newsgroups : povray.general : df3Maker in C++ Server Time
1 Nov 2024 14:20:37 EDT (-0400)
  df3Maker in C++ (Message 1 to 10 of 10)  
From: Mark James Lewin
Subject: df3Maker in C++
Date: 3 Jul 2000 23:00:58
Message: <39615123.AD0AAAA7@yahoo.com.au>
Pabs has kindly rewritten df3Maker in C++. It is available for download
(size is now only 20kb) at
http://www.geocities.com/m_j_lewin/index.html .

Pabs, if I need to put in any files other than the exe, please let me
know.

MJL


Post a reply to this message

From: Chris Huff
Subject: Re: df3Maker in C++
Date: 3 Jul 2000 23:16:29
Message: <chrishuff-8B5A36.22164003072000@news.povray.org>
In article <39615123.AD0AAAA7@yahoo.com.au>, Mark James Lewin 
<m_j### [at] yahoocomau> wrote:

> Pabs has kindly rewritten df3Maker in C++. It is available for download...

Could you post the C++ source code for it, so people not running Windows 
can compile it?

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Mark James Lewin
Subject: Re: df3Maker in C++
Date: 4 Jul 2000 00:35:41
Message: <39616757.4FD335A2@yahoo.com.au>
The zip Pabs sent me is now posted, and includes C++ source. Enjoy.

MJL

Chris Huff wrote:

> In article <39615123.AD0AAAA7@yahoo.com.au>, Mark James Lewin
> <m_j### [at] yahoocomau> wrote:
>
> > Pabs has kindly rewritten df3Maker in C++. It is available for download...
>
> Could you post the C++ source code for it, so people not running Windows
> can compile it?
>
> --
> Christopher James Huff - Personal e-mail: chr### [at] maccom
> TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
> Personal Web page: http://homepage.mac.com/chrishuff/
> TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Pabs
Subject: Re: df3Maker in C++
Date: 5 Jul 2000 00:34:23
Message: <3962BB02.2B8EA68B@nospamthanks.hotmail.com>
Chris Huff wrote:

> In article <39615123.AD0AAAA7@yahoo.com.au>, Mark James Lewin
> <m_j### [at] yahoocomau> wrote:
>
> > Pabs has kindly rewritten df3Maker in C++. It is available for download...
>
> Could you post the C++ source code for it, so people not running Windows
> can compile it?

You'll have to do a bit of work to get a Mac compile since it uses quite a few
Win32 API functions & it uses Win32 dialogs.


Post a reply to this message

From: Chris Huff
Subject: Re: df3Maker in C++
Date: 5 Jul 2000 10:38:23
Message: <chrishuff-AC2E61.09383505072000@news.povray.org>
In article <3962BB02.2B8EA68B@nospamthanks.hotmail.com>, Pabs 
<pab### [at] nospamthankshotmailcom> wrote:

> You'll have to do a bit of work to get a Mac compile since it uses quite 
> a few
> Win32 API functions & it uses Win32 dialogs.

I noticed. :-(
Still, I might be able to scavenge something...I wish the 
Windows-specific code was separated better from the rest of the code, 
and that Windows functions were only used where necessary...

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Pabs
Subject: Re: df3Maker in C++
Date: 6 Jul 2000 01:31:08
Message: <396419CD.2C632411@nospamthanks.hotmail.com>
Chris Huff wrote:

> In article <3962BB02.2B8EA68B@nospamthanks.hotmail.com>, Pabs
> <pab### [at] nospamthankshotmailcom> wrote:
>
> > You'll have to do a bit of work to get a Mac compile since it uses quite
> > a few
> > Win32 API functions & it uses Win32 dialogs.
>
> I noticed. :-(
> Still, I might be able to scavenge something...I wish the
> Windows-specific code was separated better from the rest of the code,
> and that Windows functions were only used where necessary...

It is not all that complex an app - you could propably rewrite it in an hr or
two for the Mac (if standard low level & stream I/O libs exist on the Mac)
Sorry Mark I didn't mean any offense but it is true :)

Bye
Pabs


Post a reply to this message

From: Mark James Lewin
Subject: Re: df3Maker in C++
Date: 6 Jul 2000 01:48:49
Message: <39641B83.EB6C5D4A@yahoo.com.au>
I know. I only wrote it because I couldn't find anything else to do it.

MJL

Pabs wrote:

> Chris Huff wrote:
>
> > In article <3962BB02.2B8EA68B@nospamthanks.hotmail.com>, Pabs
> > <pab### [at] nospamthankshotmailcom> wrote:
> >
> > > You'll have to do a bit of work to get a Mac compile since it uses quite
> > > a few
> > > Win32 API functions & it uses Win32 dialogs.
> >
> > I noticed. :-(
> > Still, I might be able to scavenge something...I wish the
> > Windows-specific code was separated better from the rest of the code,
> > and that Windows functions were only used where necessary...
>
> It is not all that complex an app - you could propably rewrite it in an hr or
> two for the Mac (if standard low level & stream I/O libs exist on the Mac)
> Sorry Mark I didn't mean any offense but it is true :)
>
> Bye
> Pabs


Post a reply to this message

From: Chris Huff
Subject: Re: df3Maker in C++
Date: 6 Jul 2000 06:45:17
Message: <chrishuff-1B6E1C.05453006072000@news.povray.org>
In article <396419CD.2C632411@nospamthanks.hotmail.com>, Pabs 
<pab### [at] nospamthankshotmailcom> wrote:

> It is not all that complex an app - you could propably rewrite it in 
> an hr or two for the Mac (if standard low level & stream I/O libs 
> exist on the Mac) Sorry Mark I didn't mean any offense but it is true 
> :)

Probably true, for someone who knows what they are doing...however, I am 
very inexperienced with file I/O. I have never written a program that 
used binary files, for example. And the only program I have written that 
takes file input was a particle simulator :-), which took a simple scene 
description as input. (standard C and C++ functions are available with 
all major development environments, BTW.)

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Mark James Lewin
Subject: Re: df3Maker in C++
Date: 6 Jul 2000 18:16:49
Message: <3965031B.7CE9B8B5@yahoo.com.au>
Chris, you have had much more programming experience than me! df3Maker was
only my second atempt at writing programs that touched binary files. Writing
particle simulators for pov looks like much more work to me :-)

MJL

Chris Huff wrote:

> In article <396419CD.2C632411@nospamthanks.hotmail.com>, Pabs
> <pab### [at] nospamthankshotmailcom> wrote:
>
> > It is not all that complex an app - you could propably rewrite it in
> > an hr or two for the Mac (if standard low level & stream I/O libs
> > exist on the Mac) Sorry Mark I didn't mean any offense but it is true
> > :)
>
> Probably true, for someone who knows what they are doing...however, I am
> very inexperienced with file I/O. I have never written a program that
> used binary files, for example. And the only program I have written that
> takes file input was a particle simulator :-), which took a simple scene
> description as input. (standard C and C++ functions are available with
> all major development environments, BTW.)
>
> --
> Christopher James Huff - Personal e-mail: chr### [at] maccom
> TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
> Personal Web page: http://homepage.mac.com/chrishuff/
> TAG Web page: http://tag.povray.org/


Post a reply to this message

From: smellenbergh
Subject: Yo Chriss, df3Maker for Macintosh PPC [was:Re: df3Maker in C++]
Date: 10 Jul 2000 14:11:13
Message: <1edki3o.1d2ku6a1qyzpzkN%smellenbergh@skynet.be>
Chris Huff <chr### [at] maccom> wrote:

> In article <396419CD.2C632411@nospamthanks.hotmail.com>, Pabs 
> <pab### [at] nospamthankshotmailcom> wrote:
> 
> > It is not all that complex an app - you could propably rewrite it in
> > an hr or two for the Mac (if standard low level & stream I/O libs 
> > exist on the Mac) Sorry Mark I didn't mean any offense but it is true
> > :)
Yes, those libs exist on the Mac, but for some mysterious reason(s) I
could not get the following to work:
 fscanf(FileNum," %d , %d , %d \n", &XDim, &YDim, &ZDim);
The value of XDim was placed somewhere randomly in memory and not in the
location of XDdim. And before you ask: XDim is a 2 byte integer. I
actually didn't change anything in the source, except for the
windows/mac specific parts. Hmmm, I did rewrite the SaveFile() function
a bit so that fopen/fwrite are used there too.

But when I use this:
    float a,b,c;
    fscanf(FileNum," %f , %f , %f \n", &a, &b, &c);
    XDim=a; YDim=b;ZDim=c;
everything is working.
Two possibilities:
1) I'm doing something wrong but I can't see what (I never used fscanf
or scanf before)
2) There is an error in the standard c libs of CodeWarrior (My guess)

 > Probably true, for someone who knows what they are doing...however, I
am 
> very inexperienced with file I/O. I have never written a program that
> used binary files, for example. And the only program I have written that
> takes file input was a particle simulator :-), which took a simple scene
> description as input. (standard C and C++ functions are available with
> all major development environments, BTW.)
Well, you probably never bothered to take a look at the PowerPlant
framework. 
Especially to make such a simple application as df3Maker is, you will
find it easy to use. I had everything converted in about 15 minutes but
I had to search for that fscanf bug and that took me quite a bit longer
;-)
The only bit that is a bit more complicated is the part were you make a
full path out of a FSSpec.

I did a bit off cut and paste for that, it was already in MacMegaPov. 
I should rewrite that bit, using more of PowerPlant but for some reason
I never get round to it.

Ok, you can download a small archive here:
http://users.skynet.be/smellenbergh/makedf3.sit
It contains the CW project and a ready to run application. I also added
the df3Maker internet page. Allowed?

Perhaps one day I add the function to make a df3 file out of 2or more
tga files. An explanation can be found at:
http://users.skynet.be/egelie/   

Just look for the eruption entry for the irtc competition 'landmarks'.

Yvo Smellenbergh
-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

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