Nothing new
Next C++ line
The following line to wrap:
is not such an alien to us. It follows the same pattern as the first one.So we will do something similar. Wrap the types and create the constructor:
type
Vec3ArrayObj {.importcpp: "osg::Vec3Array",
header: "<osg/Array>", bycopy.} = object
Vec3ArrayRef* = RefPtr[Vec3ArrayObj]
proc newVec3ArrayRef*(): Vec3ArrayRef {.cdecl,
importcpp: "(new osg::Vec3Array)", header: "<osg/Array>".}
header
used.
And we use the newly created types and constructor in Nim: