2015/utils/amodeler/samples/asdkbodyapp/asdkbodyui/AsdkBodyUi.cpp
//
// queryMorphingMap()
//
// Encapsulates getMorphingMap, performing all the necessary
// user interaction.
//

queryMorphingMap()
Encapsulates getMorphingMap, performing all the necessary
user interaction.
queryMorphingMap () Encapsulates getMorphingMap performing all the necessary user interaction .
static MorphingMap*
queryMorphingMap(AsdkBody* pBody1, AsdkBody* pBody2)
{
    bool bGetMorphingMap;
	pBody1->upgradeOpen();
	pBody2->upgradeOpen();
    if (pBody1->body().edgeCount() == pBody2->body().edgeCount())
	{
		pBody1->downgradeOpen();
		pBody2->downgradeOpen();
		ads_printf(ACRX_T("\nSpecify Morphing Map? "));
		bGetMorphingMap = getYesNo(FALSE);
	}
	else
	{
		bGetMorphingMap = TRUE;
	}
	if (bGetMorphingMap)
	{
		pBody1->upgradeOpen();
		pBody2->upgradeOpen();
		MorphingMap* map;
        map = new MorphingMap(getMorphingMap(pBody1->body(), pBody2->body()));
		pBody1->downgradeOpen();
		pBody2->downgradeOpen();
		return map;
	}
    else
        return NULL;
}
static MorphingMap * queryMorphingMap ( AsdkBody * pBody1 , AsdkBody * pBody2 ) { bool bGetMorphingMap ; pBody1 -> upgradeOpen ( ) ; pBody2 -> upgradeOpen ( ) ; if ( pBody1 -> body ( ) . edgeCount ( ) == pBody2 -> body ( ) . edgeCount ( ) ) { pBody1 -> downgradeOpen ( ) ; pBody2 -> downgradeOpen ( ) ; ads_printf ( ACRX_T ( " \n " ) ) ; bGetMorphingMap = getYesNo ( FALSE ) ; } else { bGetMorphingMap = TRUE ; } if ( bGetMorphingMap ) { pBody1 -> upgradeOpen ( ) ; pBody2 -> upgradeOpen ( ) ; MorphingMap * map ; map = new MorphingMap ( getMorphingMap ( pBody1 -> body ( ) , pBody2 -> body ( ) ) ) ; pBody1 -> downgradeOpen ( ) ; pBody2 -> downgradeOpen ( ) ; return map ; } else return NULL ; }
queryMorphingMap()
Encapsulates getMorphingMap, performing all the necessary
user interaction.
queryMorphingMap () Encapsulates getMorphingMap performing all the necessary user interaction .