Changes

Jump to: navigation, search

User:Dsventura

2,030 bytes removed, 22:37, 30 March 2011
no edit summary
To put all of this into the framework, we create an XObject class which is derived from Object. This will hold model information as well as the animation controller. It will also hold information that allows us to change animation sets and the speed of the animation. (refer to XObject.h)
 
<h3>Animation Controller</h3>
To give you an overview of the animation controller and it's functions, here's a list of functions used in this example (descriptions from msdn.microsoft.com):
 
 
'''LPD3DXANIMATIONCONTROLLER m_animController;'''
 
''// Takes the filename and extracts the information from the x file. memoryAllocator is the''
 
''// frame hierarchy, frameRoot is the parent frame, and m_animController is the COM object''
 
'''D3DXLoadMeshHierarchyFromX(filename, D3DXMESH_MANAGED, d3dd, &memoryAllocator, NULL, &m_frameRoot, &m_animController);'''
 
''// Like any COM object, you must release it when you're done''
 
'''m_animController->Release();'''
 
''// Returns how many different animations are stored in the file''
 
'''m_animController->GetMaxNumAnimationSets();'''
 
''// Advances the animation timeline''
 
'''m_animController->AdvanceTime(elapsedTime, NULL);'''
 
''// Retieves an LPD3DXANIMATIONSET''
 
'''m_animController->GetAnimationSet(m_currentAnimationSet, &set );'''
 
''// This method sets the animation set to the specified track for mixing. The animation set for''
 
''// each track is blended according to the track weight and speed when AdvanceTime is called''
 
'''m_animController->SetTrackAnimationSet( newTrack, set );'''
 
''// Removes events from the animation track''
 
'''m_animController->UnkeyAllTrackEvents( m_currentTrack );'''
 
''// Enables or disables an animation track''
 
'''m_animController->KeyTrackEnable( m_currentTrack, FALSE, startTime );'''
 
''// Sets the rate of play of an animation track''
 
'''m_animController->KeyTrackSpeed( m_currentTrack, newSpeed, m_currentTime, duration, D3DXTRANSITION_LINEAR );'''
 
''// Changes the weight of an animation track. The weight is used as a multiplier when combining''
 
''// multiple tracks together''
 
'''m_animController->KeyTrackWeight( m_currentTrack, newWeight, m_currentTime, duration, D3DXTRANSITION_LINEAR );'''
 
''// Enables or disables a track in the animation controller''
 
'''m_animController->SetTrackEnable( newTrack, TRUE );'''
 
<h2>Known Issues</h2>
<h3>CreateFrame() and CreateMeshContainer</h3>
1
edit

Navigation menu