Andreas Zieringer wrote:
> did you call Thread::getCurrentChangeList()->commitChanges();
Hi Andreas,
indeed, this fixed it. The aspects are more or less synchronized now.
I still can't see my geometry.
I exported the scenegraph in aspect 1. The vertex position indices show up in
the .osg file. However, they don't show up when I export the scenegraph
in aspect 0. The vertex positions, vertex colors and primitive type/length
values
are available in both aspects, though.
Here is a snippet of my code that builds up the osg::Geometry node core:
//-- primitve types and length values
osg::GeoPTypesUI8Ptr meshPTs = osg::GeoPTypesUI8::create();
osg::GeoPLengthsUI32Ptr meshPLs = osg::GeoPLengthsUI32::create();
osg::GeoPTypesUI8::StoredFieldType &meshPTsData = meshPTs->editField();
osg::GeoPLengthsUI32::StoredFieldType &meshPLsData = meshPLs->editField();
// fill meshPTsData and meshPLsData
//-- vertex positions
osg::GeoPositions3fPtr meshVertices = osg::GeoPositions3f::create();
osg::GeoPositions3f::StoredFieldType &meshVerticesData =
meshVertices->editField();
// fill meshVerticesData
//-- vertex position indices
osg::GeoIndicesUI32Ptr meshVertexIndices = osg::GeoIndicesUI32::create();
osg::GeoIndicesUI32::StoredFieldType &meshVertexIndicesData =
meshVertexIndices->editField();
// fill meshVertexIndicesData
//-- vertex color indicies (optional)
osg::GeoIndicesUI32Ptr meshColorIndices = osg::GeoIndicesUI32::create();
osg::GeoIndicesUI32::StoredFieldType &meshColorIndiciesData =
meshColorIndices->editField();
// fill meshColorIndicesData
//-- create geometry node core
osg::GeometryPtr meshGeometryCore = osg::Geometry::create();
//-- supply primitve data and vertex positions/colors
meshGeometryCore->setPositions(meshVertices);
meshGeometryCore->setTypes(meshPTs);
meshGeometryCore->setLengths(meshPLs);
if (hasNodeProperties || hasElementProperties)
{
#ifdef IFX_POST_CLASSIFICATION
osg::GeoTexCoords3fPtr meshScalars = osg::GeoTexCoords3f::create();
meshGeometryCore->setTexCoords(meshScalars);
#else
osg::GeoColorsPtr meshColors = osg::GeoColors3f::create();
meshGeometryCore->setColors(meshColors);
#endif
}
//-- supply vertex indices
meshGeometryCore->setIndex(meshVertexIndices, osg::Geometry::PositionsIndex);
if (hasNodeProperties) // simply reuse meshVertexIndices
meshGeometryCore->setIndex(meshVertexIndices,
osg::Geometry::ColorsIndex);
else if (hasElementProperties)
meshGeometryCore->setIndex(meshColorIndices,
osg::Geometry::ColorsIndex);
//-- set core geometry node
vmn.geometryNode->setCore(meshGeometryCore);
//-- supply vertex colors
updateMeshColors(...);
Any ideas?
Moritz
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users