Patrick Hartling schrieb: > Carsten Neumann wrote: > >> Hello Patrick, >> >> Patrick Hartling wrote: >> >>> I am working on porting OpenManip to OpenSG 2, and I have run into a >>> difference WRT OpenSG 1.x that I cannot resolve. In OpenSG 1.x, the >>> following worked (where mRenderAction is an OSG::DrawActionBase*): >>> >>> OSG::Camera* cam = mRenderAction->getCamera(); >>> OSG::CameraPtr camPtr(cam); >>> >>> I have not found a way to construct an OSG::CameraPtr from an OSG::Camera*, >>> and I am wondering if this is being done by design. In other words, is this >>> prevention of OSG::FCPtr<> construction from a raw pointer deliberate? The >>> closest I came was to try OSG::Camera::constructPtr(), but this method is >>> protected. >>> >>> The OSG::CameraPtr is needed because the pointer is sorted in that form >>> elsewhere in the code. It might be possible to eliminate the need for the >>> OSG::CameraPtr, but since I don't know the internal workings of >>> OSG::FCPtr<>, I do not know how far-reaching the side effects of that may >>> be. >>> >>> Should this be considered a design flaw in OpenManip, or am I just missing >>> how to construct the OSG::CameraPtr that I need? >>> >> the definite answer probably has to come from Gerrit or Dirk, but I >> think constructing that CameraPtr could work like this: >> >> // probably not needed: >> #include <OpenSG/OSGContainerCreateMixin.h> >> >> OSG::CameraPtr camPtr = >> OSG::CPtrConstructionFunctions<OSG::Camera::ContainerFactory>::constructPtr(cam); >> >> I haven't tested this, but it is used in the implementation of >> OSG::FieldContainer::constructPtr() so it should do the right thing. >> > > That's precisely what I needed. Thanks! > > Now that I have this final piece in place, OpenManip runs on top of OpenSG > 2. However, the time between selecting an object and the manipulators > actually appearing is very, very long, and I need to figure out why that is. > > -Patrick > Maybe I can sheed some light on that even if my answer comes very late. The inefficency has to do with some very bad implementations of the primitives (especially sphere and cone) of OpenManip in the OpenManip scenegraph driver. I currently have a student working on OpenManip and I hope to eliminate those performance bottle necks in that context.
In the meantime the OpenManip code is maintained at SourceForge and even if it looks abandoned over some month I am still there and keeping an eye on it. However I am the only one developing on it (actually my time is very spare, so I don't do much on development) which makes it hard to realize all the ideas, bugfixes that I have in mind. The overall goal is to make OpenManip more usable, easier to build and do some improvements over time which haven't been done back in my study project, when we initially created OpenManip. Michael > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users > -- ------------------ Dipl.-Inf. Michael Braitmaier HLRS - Visualization / Video Conferencing University of Stuttgart Germany Phone: ++49 711 685 65996 Fax : ++49 711 682 357 Website: http://www.hlrs.de/people/braitmaier/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
