CSG & Detail

Andreas Zehender az at azweb.de
Fri Oct 29 07:43:47 CEST 2004


Sounds good and makes sense.
Looking forward to see csg evaluated objects in kpovmodeler :)

On Friday, 29. October 2004 03:50, Leon Pennington wrote:
> Hi again,
>
> Commited the detailObject, and altered Heightfield and Sphere to work with
> it.
>
> Now adding faces to these objects, the others will follow.
>
> I've obviousley had to alter the way the object generates its
> viewStructure, but also in Sphere the defaultViewStructure, the main
> changes are:-
>
> 1. Inherited virtual function hasDisplayDetail() is added to return true.
>
> 2. viewStructureParameterKey key function now looks like
> virtual int viewStructureParameterKey( ) const { return s_parameterKey +
> globalDetailKey(); }
>
> So global detail changes affect the viewStructures. I obviously can't alter
> s_parameterKey, in the sub objects, so I though this would be the best way
> to propogate the global detail change.
>
> 3. In defaultViewStructure for sphere ( and any other objects similar ) it
> checks the parameter keys, instead of just the exsistance of the
> defaultViewStructure, in the defaultViewStructure function. This is so
> global detail changes affect the default, because I can't delete its
> defaultViewStructure from another object.
>
> When I say I can't in 2, and 3, I mean not easily and without things
> getting really messy :)
>
> I wanted global detail levels to affect the defaultViewStructure of Sphere,
> as this is obviously the best way to conserve memory.

-- 
--------------------------------------------------
 Andreas Zehender
 Master of Computer Science, Dipl. Ing. (BA)
 http://www.azweb.de
 az at azweb.de | zehender at kde.org      
--------------------------------------------------


More information about the kpovmodeler-devel mailing list