Problem with IHairRenderingProperties (SDK)

 
 
 
Posted by:abushinov
Data created:19 October 2013

Hello, I download OrnatrixV2_SDK.zip from this link:

https://www.ephere.com/plugins/autodesk/max/ornatrix/docs/sdk/c_plus_plus/sdk_download.html

I try to get hair radius like this:

IHairRenderingPropertiesContainer* props = static_cast<IHairRenderingPropertiesContainer*>(node->EvalWorldState(t).obj->GetInterface(IHairRenderingPropertiesContainerInterfaceID));
if(props){IHairRenderingProperties subProps = props->HairRenderingProperties();}

 

and got a lot of errors:

 

error C2259: 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties' : cannot instantiate abstract class
1> due to following members:
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::Use(bool)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(23) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::Use'
1> 'bool Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::Use(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(20) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::Use'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::StrandGroup(unsigned short)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(29) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::StrandGroup'
1> 'unsigned short Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::StrandGroup(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(26) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::StrandGroup'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::GlobalStrandRadius(float)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(38) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::GlobalStrandRadius'
1> 'float Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::GlobalStrandRadius(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(35) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::GlobalStrandRadius'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusMap(Texmap *)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(44) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusMap'
1> 'Texmap *Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusMap(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(41) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusMap'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusStrandDataChannel(unsigned int)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(50) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusStrandDataChannel'
1> 'unsigned int Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusStrandDataChannel(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(47) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusStrandDataChannel'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusCurve(const Ephere::Plugins::Autodesk::Max::Ornatrix::ICurve *)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(56) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusCurve'
1> 'const Ephere::Plugins::Autodesk::Max::Ornatrix::ICurve *Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusCurve(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(53) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::RadiusCurve'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::UsesSelfShadowing(bool)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(65) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::UsesSelfShadowing'
1> 'bool Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::UsesSelfShadowing(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(62) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::UsesSelfShadowing'
1> 'void Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::SelfShadowingCoefficient(float)' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(71) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::SelfShadowingCoefficient'
1> 'float Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::SelfShadowingCoefficient(void) const' : is abstract
1> d:\work\tools\plugin\arnold\1_exporter\assexp\3rd\ornatrix\ihairrenderingproperties.h(68) : see declaration of 'Ephere::Plugins::Autodesk::Max::Ornatrix::IHairRenderingProperties::SelfShadowingCoefficient'

It is because you cannot instantiate an interface.

if(props){IHairRenderingProperties subProps = props->HairRenderingProperties();}

should be changed to

if(props){IHairRenderingProperties& subProps = props->HairRenderingProperties();}

Marsel Khadiyev (Software Developer, EPHERE Inc.)

it works, thank you very much!