Re: Frame System
Andreas Zehender <[email protected]> Wed, 04 Oct 2006 08:14:34 +0200
| Newsgroups | gmane.comp.kde.devel.kpovmodeler |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Miguel Angel G=F3mez M=E1rquez schrieb:
> In which cases it wouldn't work?
> You understood very well my idea but forgot something i mentioned.
> That the " if (clock > x) " its in another file named animation.inc which
> contains the animation in another hand if not being present that file, =
> POVRay
> would render the first scene of the animation. (if not being present =
> that animation files, objects don't know if they are animated or not.
No, you still don't understand me. I don't talk about the povray code =
itself, but about the generation of the povray code. The povray code is =
fine, I have only problems how to generate that.
A part of the light serialization:
if( o->isAreaLight( ) )
{
dev->writeLine( QString( "area_light " ) + o->axis1( ).serialize( )
+ QString( ", " ) + o->axis2( ).serialize( )
+ QString( ", %1, %2" ).arg( o->size1( ) ).arg( =
o->size2( ) ) );
if( o->adaptive( ) !=3D c_defaultLightAdaptive )
dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) );
if( o->jitter( ) )
dev->writeLine( QString( "jitter" ) );
if ( o->areaType( ) =3D=3D PMLight::Circular )
dev->writeLine( QString( "circular" ) );
if ( o->orient( ) )
dev->writeLine( QString( "orient" ) );
}
Do you want to add checks for each property if that's animated and write =
a variable name instead of the value? That's what I mean with "an object =
should not know if its animated or not". There is a serialiation method =
that transforms a memory representation of an object into povray code. =
And with your idea you have to check for every property in every object =
whether a variable name or the actual value should be exported which is =
IMHO quite ugly.
> I got 2 technical questions:
> Which files make writings to the harddisk? (writing files)
pmpart.cpp, there are all load/save functions for documents
pmpovrayrenderwidget.cpp (rendering and texture preview)
> And in which file you make the convertion from lets say KPM format to =
> PRay (in memory)?
There is a class PMSerializer that is the base class for all classes =
that generate a binary/textual representation of the scene.
PMOutputDevice is a sub class that handles the povray identation and =
uses PMPovrayFormat. The actual serialization methods for all objects =
are in pmpovray31serialization.cpp and pmpovray35serialization.cpp.
Regards,
Andreas
List archive and information: https://mail.kde.org/mailman/listinfo/kpovmod=
eler-devel