Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ActorScroller.h

Go to the documentation of this file.
00001 /* ActorScroller - ActorFrame that moves its children. */ 00002 00003 #ifndef ActorScroller_H 00004 #define ActorScroller_H 00005 00006 #include "ActorFrame.h" 00007 00008 struct XNode; 00009 class ActorScroller : public ActorFrame 00010 { 00011 public: 00012 ActorScroller(); 00013 00014 void Load( 00015 float fScrollSecondsPerItem, 00016 float fNumItemsToDraw, 00017 const RageVector3 &vRotationDegrees, 00018 const RageVector3 &vTranslateTerm0, 00019 const RageVector3 &vTranslateTerm1, 00020 const RageVector3 &vTranslateTerm2 ); 00021 00022 virtual void Update( float fDelta ); 00023 virtual void DrawPrimitives(); // DOES draw 00024 00025 void LoadFromNode( const CString &sDir, const XNode *pNode ); 00026 void SetDestinationItem( int iItem ) { m_fDestinationItem = float(iItem); } 00027 void SetCurrentAndDestinationItem( int iItem ) { m_fCurrentItem = m_fDestinationItem = float(iItem); } 00028 00029 protected: 00030 bool m_bLoaded; 00031 float m_fCurrentItem; // usually between 0 and m_SubActors.size() 00032 float m_fDestinationItem; 00033 float m_fSecondsPerItem; // <= 0 means don't scroll 00034 float m_fNumItemsToDraw; 00035 00036 // Note: Rotation is applied before translation. 00037 00038 // rot = m_vRotationDegrees*itemOffset^1 00039 RageVector3 m_vRotationDegrees; 00040 00041 // trans = m_vTranslateTerm0*itemOffset^0 + 00042 // m_vTranslateTerm1*itemOffset^1 + 00043 // m_vTranslateTerm2*itemOffset^2 00044 RageVector3 m_vTranslateTerm0; 00045 RageVector3 m_vTranslateTerm1; 00046 RageVector3 m_vTranslateTerm2; 00047 }; 00048 00049 #endif 00050 00051 /* 00052 * (c) 2003-2004 Chris Danford 00053 * All rights reserved. 00054 * 00055 * Permission is hereby granted, free of charge, to any person obtaining a 00056 * copy of this software and associated documentation files (the 00057 * "Software"), to deal in the Software without restriction, including 00058 * without limitation the rights to use, copy, modify, merge, publish, 00059 * distribute, and/or sell copies of the Software, and to permit persons to 00060 * whom the Software is furnished to do so, provided that the above 00061 * copyright notice(s) and this permission notice appear in all copies of 00062 * the Software and that both the above copyright notice(s) and this 00063 * permission notice appear in supporting documentation. 00064 * 00065 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00066 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00067 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00068 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00069 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00070 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00071 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00072 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00073 * PERFORMANCE OF THIS SOFTWARE. 00074 */

Generated on Thu Jan 27 20:57:17 2005 for StepMania by doxygen 1.3.7