Hello! I was trying to get the Volume Object example working that's in the SDK here:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_manual_volumeobject.html
I'm having trouble having it successfully compile though.
The two headers I'm including:
#include "lib_volumeobject.h"
#include "lib_volumebuilder.h"
BaseObject* object = static_cast<BaseObject*>(node->GetDown());
// create VolumeObject
// This example checks if the given object is a volume builder.
// If so, it accesses the cache to get the VolumeObject.
if (object == nullptr)
return true;
// check if VolumeBuilder
if (object->IsInstanceOf(Ovolumebuilder) == false)
return true;
VolumeBuilder* const volumeBuilder = static_cast<VolumeBuilder*>(object);
// get cache
BaseObject* const cache = volumeBuilder->GetCache(nullptr);
if (cache == nullptr)
return true;
// check for volume object
if (cache->IsInstanceOf(Ovolume))
{
const VolumeObject* const volumeObject = static_cast<VolumeObject*>(cache);
const maxon::VolumeInterface* volInterface = volumeObject->GetVolume();
const maxon::String gridname2 = volInterface->GetGridName();
//Error:: Member access into incomplete type 'const maxon::VolumeInterface'
const maxon::Volume volume = volumeObject->GetVolume();
// Error:: No type named 'Volume' in namespace 'maxon'
const maxon::String gridName = volume.GetGridName();
DiagnosticOutput("Grid Name: @", gridName);
}
I'm having problems with these two bits:
const maxon::VolumeInterface* volInterface = volumeObject->GetVolume();
const maxon::String gridname2 = volInterface->GetGridName();
//Error:: Member access into incomplete type 'const maxon::VolumeInterface'
const maxon::Volume volume = volumeObject->GetVolume();
// Error:: No type named 'Volume' in namespace 'maxon'
Is there some sort of header that I need to include or is the example out of date?
Thanks for any help!
Dan