[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kpovmodeler-devel
Subject:    Re: Frame System
From:       Andreas Zehender <az () azweb ! de>
Date:       2006-10-04 6:14:34
Message-ID: 4523514A.20201 () azweb ! de
[Download RAW message or body]

Hi,

Miguel Angel Gómez Márquez 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( ) != c_defaultLightAdaptive )
         dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) );
      if( o->jitter( ) )
         dev->writeLine( QString( "jitter" ) );
      if ( o->areaType( ) == 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/kpovmodeler-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic