Page 1 of 1

A way to copy Frustums ?

Posted: Fri Dec 12, 2008 6:43 pm
by Archangel
Hi !
I've been playing with decals lately, making some kind of wrapper class to simplify creation of such decals (within my framework).
Most of the time, you want to apply a decal to an object, not to its material (don't read me wrong : I don't see anything bad in the way Ogre does this). If the object's material changes, you have to redo all your decal stuff.
Basically, I'd need to have a simple way to copy a decal and apply it on another material.
A decal is (mainly) a Frustum object, but there is no way that I know to do a simple copy of a Frustum. The default copy constructor is available (generated by the compiler), but doesn't compile because some members forbid direct copy (VertexData).

Would it be possible to implement this copy constructor ?
Anyway, if it is not meant to be copied, hiding the copy constructor from public scope would be cleaner (same goes for Camera afaik).

Posted: Mon Dec 15, 2008 12:11 pm
by sinbad
Camera has a synchroniseBaseSettingsWith method for quickly copying settings (mostly aimed at keeping reflection cameras synced up). If this was promoted to Frustum would that solve your problem?

Posted: Mon Dec 15, 2008 7:16 pm
by Archangel
From what I can see in the sources, yes ! That would be perfect ;)