How do you set the initial view for the model in an SKP file created with the SkpWriter in Google Sketchup C++ SDK?
There has been an example in an older version of the SDK. Part of the source is posted here.
I'm trying to use:
m_pDoc->GetModel()->SetCamera(cameraDefn);
The problem is that I'm not able to create a valid atlast::sketchup::CCameraDefinition.
Non of the examples in the above post works:
atlast::sketchup::CCameraDefinition cameraDefn;
cameraDefn.Set(atlast::geometry::CPoint3d(793.838, -1262.6, 2603.16),
atlast::geometry::CPoint3d(567.977, 338.199, 398.932),
atlast::geometry::CUnitVector3d(-0.112657, 0.798459, 0.591415));
and:
atlast::sketchup::CCameraDefinition cameraDefn;
cameraDefn.Set(atlast::geometry::CPoint3d(793.838, -1262.6, 2603.16),
atlast::geometry::CPoint3d(567.977, 338.199, 398.932),
atlast::geometry::CUnitVector3d(-0.112657, 0.798459, 0.591415));
In the end I want the initial view to be the view you get from pressing the icon for Zoom extents followed by the Iso icon (the other way around is also ok). Right now I would settle for creating a valid atlast::sketchup::CCameraDefinition. Any better way to achieve this in the SKP-file?