A way to copy Frustums ?

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

A way to copy Frustums ?

Post 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).
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post 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?
User avatar
Archangel
Greenskin
Posts: 101
Joined: Sun Dec 19, 2004 6:02 pm
Location: Nantes, France
Contact:

Post by Archangel »

From what I can see in the sources, yes ! That would be perfect ;)
Post Reply