#include "oruserobject_template_wind.h"
{
ORUserObjectWind* pFbObject = FBCast<ORUserObjectWind>( pMbObject );
return pFbObject->mWindDirection;
}
{
ORUserObjectWind* pFbObject = FBCast<ORUserObjectWind>( pMbObject );
pFbObject->mWindDirection = pValue;
}
static int ORUserObjectWindGetVelocity(
HIObject pMbObject)
{
ORUserObjectWind* pFbObject = FBCast<ORUserObjectWind>( pMbObject );
return pFbObject->mWindVelocity;
}
static void ORUserObjectWindSetVelocity(
HIObject pMbObject,
int pValue)
{
ORUserObjectWind* pFbObject = FBCast<ORUserObjectWind>( pMbObject );
pFbObject->mWindVelocity = pValue;
}
ORUserObjectWind::ORUserObjectWind(
const char* pName,
HIObject pObject ) : FBUserObject( pName, pObject )
{
mWindVelocity = 0;
FBPropertyPublish(
this, Direction,
"Direction", ORUserObjectWindGetDirection, ORUserObjectWindSetDirection);
FBPropertyPublish(
this, Velocity,
"Velocity", ORUserObjectWindGetVelocity, ORUserObjectWindSetVelocity);
}
bool ORUserObjectWind::FBCreate()
{
return true;
}
void ORUserObjectWind::FBDestroy()
{
}
bool ORUserObjectWind::FbxStore(FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat)
{
pFbxObject->FieldWriteD("DirectionX", lVector.mValue[0]);
pFbxObject->FieldWriteD("DirectionY", lVector.mValue[1]);
pFbxObject->FieldWriteD("DirectionZ", lVector.mValue[2]);
pFbxObject->FieldWriteI("Velocity", Velocity);
return true;
}
bool ORUserObjectWind::FbxRetrieve(FBFbxObject* pFbxObject,
kFbxObjectStore pStoreWhat)
{
{
lVector[0] = pFbxObject->FieldReadD("DirectionX");
lVector[1] = pFbxObject->FieldReadD("DirectionY");
lVector[2] = pFbxObject->FieldReadD("DirectionZ");
Direction = lVector;
Velocity = pFbxObject->FieldReadI("Velocity");
}
return true;
}