Ticket #157 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 3 months ago

Dynamic Volume replacement

Reported by: dirk Assigned to: unassigned
Priority: minor Milestone: 2.X
Component: System Version: 2.0
Keywords: Cc:
Completion:

Description

DynamicVolume for bounding volumes are not all that flexible and very hard to debug. Alternatives would be a better implementation (union-based), or using a separate Volume instance.

Change History

01/31/07 18:26:44 changed by dirk

This is the email trail from a discussion about it on opensg-users:

Carsten Neumann wrote:

Hi Marcus, Marcus Lindblom wrote:

Dirk Reiners wrote:

We tried that in the beginning, but the restrictions on classes inside a union (no non-default constructor, no virtual methods) didn't seem to make that practical.

How about using some sort of flywheel pattern and keep only data in the union? So the node would have a pointer to the volume type, but there would be only one per type, and each method there would take it's data as additional parameter? I.e. union VolUnion{ BoxData? m_box; SphereData? m_sphere }

[snip more code] yes, that is what I tried to describe :) The problem now seems to be that BoxData? and SphereData? would contain Pnt3f, etc. which are classes not suitable for a union. So this would only work if extended to the whole basic math types - plus adding wrappers that carry the data for "normal" uses.

[snip even more code]

Arent the vecstorage classes something like that?

Anyway, couldn't you just copy the data into pnt3f and do math on them? Would that be too burdensome? (we're talking 6 floats, right?)

/Marcus

06/17/08 13:55:40 changed by cneumann

  • status changed from new to closed.
  • resolution set to wontfix.

this is not relevant any more, DynamicVolume is gone as of r1307.