当前位置: 首页>>代码示例>>C++>>正文


C++ TimeValue函数代码示例

本文整理汇总了C++中TimeValue函数的典型用法代码示例。如果您正苦于以下问题:C++ TimeValue函数的具体用法?C++ TimeValue怎么用?C++ TimeValue使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TimeValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReplaceReference

ExtrudeMod::ExtrudeMod(BOOL create)
	{
//watje new mapping ver < 4 of this modifier use the old mapping
	ver = 4;

	pblock = NULL;
	ReplaceReference(0, CreateParameterBlock(descVer6, PBLOCK_LENGTH, CURRENT_VERSION));
	pblock->SetValue(PB_AMOUNT, TimeValue(0), dlgAmount);
	pblock->SetValue(PB_SEGS, TimeValue(0), dlgSegs);
	pblock->SetValue(PB_CAPSTART, TimeValue(0), dlgCapStart);
	pblock->SetValue(PB_CAPEND, TimeValue(0), dlgCapEnd);
	pblock->SetValue(PB_CAPTYPE, TimeValue(0), dlgCapType);
	pblock->SetValue(PB_OUTPUT, TimeValue(0), dlgOutput);
	pblock->SetValue(PB_MAPPING, TimeValue(0), dlgMapping);
	pblock->SetValue(PB_GEN_MATIDS, TimeValue(0), dlgGenMatIDs);
	pblock->SetValue(PB_USE_SHAPEIDS, TimeValue(0), dlgUseShapeIDs);
	pblock->SetValue(PB_SMOOTH, TimeValue(0), dlgSmooth);
	dlgProc.SetMod(this);

#ifdef PHYSICAL_SCALE_UVS
    if (create)
        if (!GetPhysicalScaleUVsDisabled())
            SetUsePhysicalScaleUVs(true);
#endif
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:25,代码来源:extrude.cpp

示例2: TimeValue

void ExtrudePostLoadCallback::proc(ILoad *iload) {
	DWORD oldVer = ((ExtrudeMod*)(cb->targ))->pblock->GetVersion();
	ReferenceTarget *targ = cb->targ;
	cb->proc(iload);
	if (oldVer<4)
		((ExtrudeMod*)targ)->pblock->SetValue(PB_GEN_MATIDS,0,FALSE);
	if (oldVer<5)
		((ExtrudeMod*)targ)->pblock->SetValue(PB_USE_SHAPEIDS,0,FALSE);
	if (oldVer<6)
		((ExtrudeMod*)targ)->pblock->SetValue(PB_SMOOTH,0,TRUE);

// russom - 11/19/01
// If file loaded has the lathe output set to NURBS, set it Mesh
#ifdef NO_NURBS
	int output;
	((ExtrudeMod*)targ)->pblock->GetValue(PB_OUTPUT, TimeValue(0), output, FOREVER);

	if( output == NURBS_OUTPUT )
		((ExtrudeMod*)targ)->pblock->SetValue(PB_OUTPUT, TimeValue(0), MESH_OUTPUT);
#endif

// russom - 11/19/01
// If file loaded has the lathe output set to Patches, set it Mesh
#ifdef NO_PATCHES
	int outputPatch;
	((ExtrudeMod*)targ)->pblock->GetValue(PB_OUTPUT, TimeValue(0), outputPatch, FOREVER);

	if( outputPatch == PATCH_OUTPUT )
		((ExtrudeMod*)targ)->pblock->SetValue(PB_OUTPUT, TimeValue(0), MESH_OUTPUT);
#endif

	delete this;
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,代码来源:extrude.cpp

示例3: Interval

Texmap  *plRTSpotLight::GetProjMap()
{
    if( !fLightPB->GetInt( kUseProjectorBool ) )
        return nil;

    Interval valid = Interval(0,0); 
    if( !GetTex() )
    {
        if( fLightPB->GetInt( kUseProjectorBool ) )
        {
            PBBitmap* bitmap = fLightPB->GetBitmap( kProjMapTexButton, 0 );         
            SetProjMap( &bitmap->bi );
        }
    }

    if( GetTex() )
    {
        const char* dbgTexName = GetTex()->GetName();

        IParamBlock2 *bitmapPB = fTex->GetParamBlockByID(plLayerTex::kBlkBitmap);
        hsAssert(bitmapPB, "LayerTex with no param block");

        int noCompress = fLightPB->GetInt(kProjNoCompress);
        int noMip = fLightPB->GetInt(kProjNoMip);
        bitmapPB->SetValue(kBmpNonCompressed, TimeValue(0), noCompress);
        bitmapPB->SetValue(kBmpNoFilter, TimeValue(0), noMip);
    }

    return (Texmap *)GetTex();
}
开发者ID:Drakesinger,项目名称:Plasma,代码行数:30,代码来源:plRealTimeLights.cpp

示例4: hsAssert

Texmap  *plRTProjDirLight::GetProjMap() 
{ 
    // If we don't have one, create one
    plLayerTex  *layer = (plLayerTex *)fProjPB->GetTexmap( kTexmap, 0 );
    if( layer == nil || layer->ClassID() != LAYER_TEX_CLASS_ID )
    {
        layer = new plLayerTex;
        fProjPB->SetValue( kTexmap, 0, (Texmap *)layer );

        IParamBlock2 *bitmapPB = layer->GetParamBlockByID( plLayerTex::kBlkBitmap );
        bitmapPB->SetValue( kBmpUseBitmap, 0, 1 );
    }

    // Backwards compatability here
    PBBitmap    *bitmap = fProjPB->GetBitmap( kProjMap, 0 );
    if( bitmap != nil )
    {
        layer->SetBitmap( &bitmap->bi );
        fProjPB->SetValue( kProjMap, 0, (PBBitmap *)nil );
    }

    if( layer )
    {
        const char* dbgTexName = layer->GetName();

        IParamBlock2 *bitmapPB = layer->GetParamBlockByID(plLayerTex::kBlkBitmap);
        hsAssert(bitmapPB, "LayerTex with no param block");

        int noCompress = fProjPB->GetInt(kProjNoCompress);
        int noMip = fProjPB->GetInt(kProjNoMip);
        bitmapPB->SetValue(kBmpNonCompressed, TimeValue(0), noCompress);
        bitmapPB->SetValue(kBmpNoFilter, TimeValue(0), noMip);
    }
    return (Texmap *)layer;
}
开发者ID:Asteral,项目名称:Plasma,代码行数:35,代码来源:plRTProjDirLight.cpp

示例5: startTask

void
ProgressPanel::doProgressStartOnMainThread(const NodePtr& node,
                                           const QString &message,
                                           const QString & /*messageid*/,
                                           bool canCancel)
{
    startTask(node, TimeValue(INT_MIN), TimeValue(INT_MAX), TimeValue(1), false, canCancel, message);
}
开发者ID:ebrayton,项目名称:Natron,代码行数:8,代码来源:ProgressPanel.cpp

示例6: SetColor

// --- Methods inherited from Tex3D ---
void Speckle::ReadSXPData(const TCHAR *name, void *sxpdata) {
	SpeckleState *state = (SpeckleState*)sxpdata;
	if (state != NULL && (state->version == SPECKLE_SXP_VERSION)) {
		SetColor(0, ColorFromCol24(state->col1), TimeValue(0));
		SetColor(1, ColorFromCol24(state->col2), TimeValue(0));
		SetSize(state->size, TimeValue(0));
	}
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:9,代码来源:speckle.cpp

示例7: main

int main ()
{
  printf ("Results of animation2_test:\n");
  
  try
  {  
    AnimationManager manager;
    
    manager.LoadResource ("data/test.xanim");

    Node::Pointer node = Node::Create (), target1 = Node::Create (), target2 = Node::Create ();
    
    target1->SetName ("target1");
    target2->SetName ("target2");

    target1->BindToParent (*node);
    target2->BindToParent (*node);

    Animation animation = manager.PlayAnimation ("animation1", *node, &event_handler);
    
    animation.RegisterEventHandler (AnimationEvent_OnPlay, &event_handler);
    animation.RegisterEventHandler (AnimationEvent_OnPause, &event_handler);
    animation.RegisterEventHandler (AnimationEvent_OnStop, &event_handler);
    animation.RegisterEventHandler (AnimationEvent_OnUpdate, &event_handler);
    animation.RegisterEventHandler (AnimationEvent_OnDestroy, &event_handler);
    
    printf ("animation duration: %.2f\n", animation.Duration ());

    node->Update (TimeValue (2, 1));
    node->Update (TimeValue (3, 1));
    
    animation.Pause ();
    animation.Pause ();
    
    node->Update (TimeValue (4, 1));
    
    printf ("animation offset %.2f\n", animation.Tell ());
    
    animation.Play ();
    animation.Play ();
    
    node->Update (TimeValue (5, 1));
    
    printf ("animation offset %.2f\n", animation.Tell ());    
    
    animation.Stop ();
    
    node->Update (TimeValue (6, 1));    
    
    printf ("animation offset %.2f\n", animation.Tell ());
  }
  catch (std::exception& e)
  {
    printf ("%s\n", e.what ());
  }

  return 0;
}
开发者ID:untgames,项目名称:funner,代码行数:58,代码来源:animation2.cpp

示例8: SetColor

// --- Methods inherited from Tex3D ---
void Splat::ReadSXPData(TCHAR *name, void *sxpdata) {
    SplatState *state = (SplatState*)sxpdata;
    if (state != NULL && (state->version == SPLAT_SXP_VERSION)) {
        SetColor(0, ColorFromCol24(state->col1), TimeValue(0));
        SetColor(1, ColorFromCol24(state->col2), TimeValue(0));
        SetSize(state->size, TimeValue(0));
        SetThresh(state->thresh, TimeValue(0));
    }
}
开发者ID:vasilenkomike,项目名称:xray,代码行数:10,代码来源:splat.cpp

示例9: ReplaceReference

RelaxMod::RelaxMod() {
	pblock = NULL;
	ReplaceReference(0, CreateParameterBlock(descVer1, PBLOCK_LENGTH, CURRENT_VERSION));
	pblock->SetValue (PB_RELAX,		TimeValue(0), DEF_RELAX);
	pblock->SetValue (PB_ITER,		TimeValue(0), DEF_ITER);
	pblock->SetValue (PB_BOUNDARY,	TimeValue(0), DEF_BOUNDARY);
	pblock->SetValue (PB_SADDLE,	TimeValue(0), DEF_SADDLE);
	version = RELAXMOD_CURRENT_VERSION;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:9,代码来源:relax.cpp

示例10: DbgAssert

void EditPolyData::ShrinkSelection (IMeshSelect *imod, int level) {
	DbgAssert (mpMesh);
	if( !mpMesh ) return;

	BitArray newSel;
	int mnSelLevel = meshSelLevel[level];
	DbgAssert (mpMesh->GetFlag (MN_MESH_FILLED_IN));
	if (!mpMesh->GetFlag (MN_MESH_FILLED_IN)) return;

	SynchBitArrays();

	switch (mnSelLevel) {
	case MNM_SL_VERTEX: 
		// Find the edges between two selected vertices.
		mpMesh->ClearEFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_EDGE, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mVertSel;
		// De-select all the vertices touching edges to unselected vertices:
		for (int i=0; i<mpMesh->nume; i++) {
			if (!mpMesh->e[i].GetFlag (MN_USER)) {
				newSel.Clear (mpMesh->e[i].v1);
				newSel.Clear (mpMesh->e[i].v2);
			}
		}
		SetVertSel (newSel, imod, TimeValue(0));
		break;
	case MNM_SL_EDGE:
		// Find all vertices used by only selected edges:
		mpMesh->ClearVFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mEdgeSel;
		for (int i=0; i<mpMesh->nume; i++) {
			// Deselect edges with at least one vertex touching a nonselected edge:
			if (!mpMesh->v[mpMesh->e[i].v1].GetFlag (MN_USER) || !mpMesh->v[mpMesh->e[i].v2].GetFlag (MN_USER))
				newSel.Clear (i);
		}
		SetEdgeSel (newSel, imod, TimeValue(0));
		break;
	case MNM_SL_FACE:
		// Find all vertices used by only selected faces:
		mpMesh->ClearVFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mFaceSel;
		for (int i=0; i<mpMesh->numf; i++) {
			for (int j=0; j<mpMesh->f[i].deg; j++) {
				if (!mpMesh->v[mpMesh->f[i].vtx[j]].GetFlag (MN_USER)) 
            {
               // Deselect faces with at least one vertex touching a nonselected face:
               newSel.Clear (i);
               break;
            }
			}
		}
		SetFaceSel (newSel, imod, TimeValue(0));
		break;
	}
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:57,代码来源:EditPolyData.cpp

示例11: SetSize

// --- Methods inherited from Tex3D ---
void Planet::ReadSXPData(TCHAR *name, void *sxpdata) {
	PlanetState *state = (PlanetState*)sxpdata;
	if (state != NULL && (state->version == PLANET_SXP_VERSION)) {
		SetSize(state->size, TimeValue(0));
		SetPercent(state->percent, TimeValue(0));
		SetIsland(state->island, TimeValue(0));
		SetSeed(state->seed, TimeValue(0));
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:10,代码来源:planet.cpp

示例12: SetBlur

void Plate::Init() {
	ivalid.SetEmpty();
	nth = 1;
	do_nth = TRUE;
	applyBlur = TRUE;
	useEnvMap = TRUE;
	SetBlur(1.0f, TimeValue(0));
	SetThick(0.5f, TimeValue(0));
	SetRefrAmt(1.0f, TimeValue(0));
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:10,代码来源:plate.cpp

示例13: IOTM

Matrix3 plDistributor::IOTM(int iRepNode) const
{
    // objectTM = otm * nodeTM
    // objectTM * Inverse(nodeTM) = otm
    INode* repNode = fRepNodes[iRepNode];
    Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0));
    Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0));
    Matrix3 OTM = objectTM * Inverse(nodeTM);
    return OTM;
}
开发者ID:Asteral,项目名称:Plasma,代码行数:10,代码来源:plDistributor.cpp

示例14: IInvOTM

Matrix3 plDistributor::IInvOTM(int iRepNode) const
{
    // objectTM = otm * nodeTM
    // invOTM * objectTM = nodeTM
    // invOTM = nodeTM * invObjectTM
    INode* repNode = fRepNodes[iRepNode];
    Matrix3 objectTM = repNode->GetObjectTM(TimeValue(0));
    Matrix3 nodeTM = repNode->GetNodeTM(TimeValue(0));
    Matrix3 invOTM = nodeTM * Inverse(objectTM);
    return invOTM;
}
开发者ID:Asteral,项目名称:Plasma,代码行数:11,代码来源:plDistributor.cpp

示例15: TimeValue

void FEVersionFix::proc (ILoad *iload) {
	int type;
	// See if we're dealing with an old parameter block:
	ReferenceTarget* ref = mod->GetReference (kFEX_PBLOCK_REF);
	if (ref != NULL && ref->ClassID() != Class_ID(PARAMETER_BLOCK2_CLASS_ID, 0)) {
		// Must be an old param block.
		IParamBlock *mp_pblock = (IParamBlock*) ref;
		mp_pblock->GetValue (kFexType, TimeValue(0), type, FOREVER);
		mp_pblock->SetValue (kFexType, TimeValue(0), type+1);
	}
	delete this;
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:12,代码来源:fextrude.cpp


注:本文中的TimeValue函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。