Discussion:
[Opensg-users] OpenSG2: dependency problem
Johannes Brunen
2017-03-15 10:45:05 UTC
Permalink
Hello,

I have a dependency problem for that I'm looking for a proper solution.

I'm in the process of writing a Chunk based class that depends on core Transform. Nearly all chunks are sorted into System/State. Transform is in System/Group that is dependent on State. Should I sort my chunk class into library Group though is belongs definitely into State?

The problem is that my chunk is holding a beacon and does need to get informed when the beacons transform changes. Therefore I add a changed function entry into the Transform and beacon objects that allows me to take proper action in any cases.

Best,
Johannes
Carsten Neumann
2017-03-15 18:55:38 UTC
Permalink
Hello Johannes,
Post by Johannes Brunen
I'm in the process of writing a Chunk based class that depends on core
Transform. Nearly all chunks are sorted into System/State. Transform is
in System/Group that is dependent on State. Should I sort my chunk class
into library Group though is belongs definitely into State?
The problem is that my chunk is holding a beacon and does need to get
informed when the beacons transform changes. Therefore I add a changed
function entry into the Transform and beacon objects that allows me to
take proper action in any cases.
can the beacon type be something derived from Transform instead? In that
case perhaps split the functionality so that the Chunk only represents
the state and the Transform derived type populates the Chunk with
values. I think that would move the setup closer to how other parts of
the system use Chunks, i.e. there is a user facing type that internally
manages a chunk in order to communicate OpenGL state to the system.

Cheers,
Carsten
Johannes
2017-03-20 09:03:54 UTC
Permalink
Hello Carsten,

thank you for your answer.
Post by Carsten Neumann
Hello Johannes,
Post by Johannes Brunen
I'm in the process of writing a Chunk based class that depends on core
Transform. Nearly all chunks are sorted into System/State. Transform is
in System/Group that is dependent on State. Should I sort my chunk class
into library Group though is belongs definitely into State?
The problem is that my chunk is holding a beacon and does need to get
informed when the beacons transform changes. Therefore I add a changed
function entry into the Transform and beacon objects that allows me to
take proper action in any cases.
can the beacon type be something derived from Transform instead? In that
case perhaps split the functionality so that the Chunk only represents
the state and the Transform derived type populates the Chunk with
values. I think that would move the setup closer to how other parts of
the system use Chunks, i.e. there is a user facing type that internally
manages a chunk in order to communicate OpenGL state to the system.
I will remember that for the future, but in this case I have found a way
around and I'm quite happy with the result. I have send the outcome of
this work in a top level mail (and send a cc to you) and requested
adoption in the framework.

Best,
Johannes

Loading...