本文整理汇总了C++中BitmapTex::GetStartTime方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapTex::GetStartTime方法的具体用法?C++ BitmapTex::GetStartTime怎么用?C++ BitmapTex::GetStartTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitmapTex
的用法示例。
在下文中一共展示了BitmapTex::GetStartTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMtlAnim
bool SGP_MaxInterface::GetMtlAnim( StdMat* pStdMtl, ColorTrack& track, int nChannel )
{
if( pStdMtl == NULL )
{
assert( false && "std mtl is NULL" );
return false;
}
int nFrameCount = 0;
TimeValue nStartTick = GetStartTick();
TimeValue nEndTick = GetEndTick();
int nTickPerFrame = GetTickPerFrame();
track.bTiling = false;
StdUVGen *uv = NULL;
Texmap *tx = pStdMtl->GetSubTexmap(nChannel);
if( tx )
{
if( tx->ClassID() == Class_ID( BMTEX_CLASS_ID, 0 ) )
{
BitmapTex *bmt = (BitmapTex*)tx;
uv = bmt->GetUVGen();
if( uv )
{
track.nUTile = (int)uv->GetUScl(0);
track.nVTile = (int)uv->GetVScl(0);
if( track.nUTile == 1 && track.nVTile == 1 )
track.bTiling = false;
else
track.bTiling = true;
track.nStartFrame = bmt->GetStartTime();
track.fPlaybackRate = bmt->GetPlaybackRate();
track.nLoopMode = bmt->GetEndCondition();
if( uv->GetUAng( 0 ) != 0.0f ||
uv->GetVAng( 0 ) != 0.0f )
{
track.fUSpeed = uv->GetUAng( 0 ) / piOver180;
track.fVSpeed = uv->GetVAng( 0 ) / piOver180;
track.bUVMoving = true;
}
else
track.bUVMoving = false;
}
}
}
TimeValue t;
for( t = nStartTick; t <= nEndTick; t += nTickPerFrame )
nFrameCount++;
track.ColorKeyFrame.resize( nFrameCount );
t = nStartTick;
for( int i = 0; i < nFrameCount; i++, t += nTickPerFrame )
{
SGP_ColorKey key;
memset( &key, 0x00, sizeof( key ) );
Color diffuse = pStdMtl->GetDiffuse( t );
Color ambient = pStdMtl->GetAmbient( t );
Color specular = pStdMtl->GetSpecular( t );
Color filter = pStdMtl->GetFilter( t );
float alpha = pStdMtl->GetOpacity( t );
float shinstr = pStdMtl->GetShinStr(t);
float selfillum = pStdMtl->GetSelfIllum( t );
float uoffset = 0;
float voffset = 0;
if( uv )
{
uoffset = uv->GetUOffs( t );
voffset = uv->GetVOffs( t );
}
/*
int nTransparencyType = pStdMtl->GetTransparencyType();
key.dwBlendMode = 0;
switch( nTransparencyType )
{
case TRANSP_SUBTRACTIVE:
key.dwBlendMode |= HR3D_MDX2_MODULATE;
break;
case TRANSP_ADDITIVE:
key.dwBlendMode |= HR3D_MDX2_ADD;
break;
case TRANSP_FILTER:
key.dwBlendMode |= HR3D_MDX2_MODULATE2X;
break;
default:
break;
};
*/
key.dr = diffuse.r;
//.........这里部分代码省略.........