Add a VOLUMETYPES macro to avoid repeating ourselves.

This commit is contained in:
Matt Williams
2012-11-24 14:16:52 +00:00
parent a932d060f2
commit 63e0298fbf
4 changed files with 13 additions and 27 deletions

View File

@ -24,6 +24,16 @@ const char* __str__() {
}
%enddef
//Centralise this to avoid repeating ourselves
//This macro will be called in the volume interface files to define the various volume types.
%define VOLUMETYPES(shortname, class)
%template(shortname ## Density8) class<PolyVox::Density8>;
%template(shortname ## Material8) class<PolyVox::Material8>;
%template(shortname ## Material16) class<PolyVox::Material16>;
%template(shortname ## MaterialDensityPair44) class<PolyVox::MaterialDensityPair44>;
%template(shortname ## MaterialDensityPair88) class<PolyVox::MaterialDensityPair88>;
%enddef
%feature("autodoc", "1");
//This will rename "operator=" to "assign" since Python doesn't have assignment