2013-05-26 01:03 PM - last edited on 2023-08-02 02:08 PM by Doreena Deng
2013-05-30 11:18 AM
2013-06-03 08:46 AM
2013-06-13 03:11 AM
2013-06-13 03:39 AM
2013-06-13 03:53 AM
Modeler::SightPtr currentSightPtr; GSErrCode err = ACAPI_3D_GetCurrentWindowSight ((void**)¤tSightPtr);Perhaps this is not in the doco because Modeler::SightPtr is undocumented.
2013-06-17 02:08 PM
GSModeler::ModelFuncTable *funcTable = EXPGetModelFunctionTable (); if (funcTable == NULL) return APIERR_CANCEL; GSModeler::Model::SetFuncTable (funcTable); void* currentSightPtr; if (ACAPI_3D_GetCurrentWindowSight (¤tSightPtr) != NoError) return APIERR_CANCEL; GSModeler::Model model; Modeler::Sight* sight = static_cast<Modeler::Sight*> (currentSightPtr); if (EXPGetModel (sight->GetConstMainModelPtr (), sight->GetSunSettings (), &model) != NoError) return APIERR_CANCEL;
2021-08-05 09:41 PM
Modeler::SightPtr currentSightPtr; GSErrCode err = ACAPI_3D_GetCurrentWindowSight ((void**)¤tSightPtr);A Modeler::SightPtr happens to be a GS::SharedPtr<Sight>, which is not the same as a raw Sight* pointer.
void* dummy = nullptr; ACAPI_3D_GetCurrentWindowSight(&dummy); Modeler::SightPtr currentSightPtr((Modeler::Sight*)dummy); // init the shared ptr with the raw pointer ModelerAPI::Model acModel; AttributeReader attrReader; EXPGetModel(currentSightPtr, &acModel, &attrReader);
2021-08-06 01:00 AM
drjustice wrote:You are responding to an 8 year old thread... is your comment really about the AC 17 devkit / API ... or about a more recent version?
I would like to confirm that the code posted by paulk is indeed incorrect.
2021-08-06 01:43 AM