Hello Rainer,
Rainer Schuetze wrote:
> Because of the intensive memory cost of the high number of points, we
> have look to for redundancy free methodic.
>
> We think of two ways to get this solved.
> + create a new “MyGeoPositions” container (which can be put in the
> Geometry object) for our own point class. But we don’t know how. Are
> there any examples or can you give us a hint. We had a look to the
> example/NewTypes but we think this isn’t the way we have to use.
>
> + put our point class in a OpenSG independent container. Now we need a
> type of GeoPosition with hold the pointer to the elements of the
> container. OpenSG must put the 3D values (by the pointer to the Points)
> to OpenGL when drawing. Does this make sense and how can this be done.
while it is not completely impossible to implement one of these two
approaches, it is definitely not an easy task. Unless you have a very
compelling reason not to do so, I'd recommend to use the existing
properties. What prevents you from using those ?
Anyways, the general approach would look something like this:
1. Define SField<MyPoint>, MField<MyPoint> - mainly requires a
specialization of FieldTraits<MyPoint>
2. Define a GeoPositionsMyPointPropertyDesc (see
Source/System/NodeCores/Drawables/Geometry/OSGGeoPropPositions.{h,inl,cpp}).
3. Use that as template argument for GeoProperty.
The infrastructure for the GeoProperties is in the files
OSGGeoPropertyBase.{h,inl,cpp} and OSGGeoPropertyInterface.{h,inl,cpp}.
Your second approach would be even more difficult as you would have to
create a specialization of GeoProperty that does not really store a
field, but pretends to do so.
Hope it helps,
Carsten
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users