reactor physics exporting

Started by
2 comments, last by aliessmael 13 years, 2 months ago
Hello all

I am trying to make rag doll physics
I did physics , but the problem is i need to export reactor joints parameters from 3ds studio max .
I found a way to do this by using max script, but i already write plug in using max sdk c++

I can not find way to export it from max sdk angry.gif
Can you help me ?
Advertisement
Not sure. Do you have the Havok SDK? And if so, does it ship with a version of reactor? There might be a C++ reactor plugin API published with the Havok SDK. If not from Havok, then you'd have to ask Autodesk if they can provide one. If nobody can provide a C++ API to access the reactor plugin properties, then you are stuck with the Max script. There is, I am sure, a 3ds max C++ API from which you can execute a max script. So, it wouldn't be pure C++ but at least you could invoke the export from C++.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Thanks [color="#1C2837"]Dave
[color="#1C2837"][color="#1C2837"]

[color="#1C2837"]I checked Havok SDK , but they have not mentioned any thing about reactor , they use their own tools for physics, they handle constrain as modifier not as object.
[color="#1C2837"]

[color="#1C2837"]in max script they mentioned the hinge constrain has this id Class_ID(1967289542, 1265062123)
[color="#1C2837"]I got pointer to the object which has same id , when i print class name ( max_obj->GetClassName( className ) ) it gave me "Hinge" , so i got pointer to this constrain
[color="#1C2837"]but max_obj is Object* type , I can not find reactor object type , I don't know how to access its properties , nothing mentioned in max sdk about reactor constraints objects , I can not find any help in internet .
[color="#1C2837"]

[color="#1C2837"]
finally ..... I found way to get max script property from c++
I know it is not proper way , but for me this is enough

if( max_obj->ClassID() == Class_ID(1967289542, 1265062123)) //hinge
{
FPValue objectValue = FPValue( TYPE_REFTARG, max_obj );
FPValue minAngleValue = GetScriptedProperty( objectValue, _T("minLimitAngle") );
float fMinAngle = minAngleValue.f ;

FPValue maxAngleValue = GetScriptedProperty( objectValue, _T("maxLimitAngle") );
float fMaxAngle = maxAngleValue.f ;

}

you can get the function GetScriptedProperty from MaxSDK\samples\utilities\applyvc\evalcol.cpp

This topic is closed to new replies.

Advertisement