• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetModel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetModel

//-----------------------------------------------------------------------------
// implements these so ragdolls can handle frustum culling & leaf visibility
//-----------------------------------------------------------------------------
void C_DynamicProp::GetRenderBounds( Vector& theMins, Vector& theMaxs )
{
	if ( m_bUseHitboxesForRenderBox )
	{
		if ( GetModel() )
		{
			studiohdr_t *pStudioHdr = modelinfo->GetStudiomodel( GetModel() );
			if ( !pStudioHdr || GetSequence() == -1 )
			{
				theMins = vec3_origin;
				theMaxs = vec3_origin;
				return;
			}

			// Only recompute if it's a new frame
			if ( gpGlobals->framecount != m_iCachedFrameCount )
			{
				ComputeEntitySpaceHitboxSurroundingBox( &m_vecCachedRenderMins, &m_vecCachedRenderMaxs );
				m_iCachedFrameCount = gpGlobals->framecount;
			}

			theMins = m_vecCachedRenderMins;
			theMaxs = m_vecCachedRenderMaxs;
			return;
		}
	}

	BaseClass::GetRenderBounds( theMins, theMaxs );
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:32,代码来源:c_props.cpp


示例2:

void setup1_qm::UpdateAtomFlags(void)
{
	for (iter_al it1 = GetModel()->GetAtomsBegin();it1 != GetModel()->GetAtomsEnd();it1++)
	{
		(* it1).flags |= ATOMFLAG_IS_QM_ATOM;
	}
}
开发者ID:daju1,项目名称:winlibghemical,代码行数:7,代码来源:eng1_qm.cpp


示例3: FindEnvironment

void CSamplingInfEngine::
FindEnvironment( intVecVector *chlds )
{
    
    
    const CGraph *pGraph = m_pGraphicalModel->GetGraph();
    int i;
    if( GetModel()->GetModelType() != mtBNet )
    {
        int nnodes; 
        nnodes = GetModel()->GetNumberOfNodes();
        chlds->resize( nnodes );
        const CMNet* pMNet = static_cast<const CMNet*>( m_pGraphicalModel );
        
        for( i = 0; i < nnodes; i++ )
        {
            
            pMNet->GetClqsNumsForNode( i, &(*chlds)[i] );
        }
    }
    else
    {
        intVector ndsForSampling;
        GetNdsForSampling( &ndsForSampling );
        chlds->resize( ndsForSampling.size() );
        
        for( i = 0; i < ndsForSampling.size(); i++ )
        {
            pGraph->GetChildren( ndsForSampling[i], &(*chlds)[i] );
            (*chlds)[i].push_back( ndsForSampling[i]) ;
        }
        
    }
    
}
开发者ID:lspatial,项目名称:spstatics_parallel,代码行数:35,代码来源:pnlSamplingInferenceEngine.cpp


示例4: GetModel

void CAht::UpdateModelProperty( int id )
{
    //		プロパティの参照データを更新する
    //
    int i;
    int target;
    int a;
    AHTMODEL *model;
    AHTMODEL *m;
    AHTPROP *p;
    AHTPROP *p2;
    char *res;
    CStrNote note;
    char *list;
    char tmp[256];
    
    model = GetModel( id );
    if ( model == NULL ) return;
    target = id;
    
    for(i=0;i<model->GetPropCount();i++) {
        p = model->GetProperty( i );
        switch( p->ahttype ) {
            case AHTTYPE_PARTS_INT:
                res = p->newval;
                if ( res == NULL ) {
                    list = SearchModelByClassName( p->defval2 );
                    note.Select( list );
                    note.GetLine( tmp, 0, 255 );
                    p->SetNewVal( tmp );
                }
                target = p->GetValueInt();
                break;
            case AHTTYPE_PARTS_PROP_STRING:
                a = target;if ( *p->defval3 == 'm' ) a = id;				// 自分を参照するオプション
                m = GetModel( a );
                if ( m != NULL ) {
                    p2 = m->GetProperty( p->defval2 );
                    //Alertf( "%d:%d:%s:%s:%x",i,a,p->defval, p->defval2,p2 );
                    if ( p2 != NULL ) {
                        res = p2->GetValue();
                        p->SetNewVal( res );
                    }
                }
                break;
            case AHTTYPE_PARTS_OPT_STRING:
                a = target;if ( *p->defval3 == 'm' ) a = id;				// 自分を参照するオプション
                m = GetModel( a );
                if ( m != NULL ) {
                    res = m->GetAHTOption( p->defval2 );
                    if ( res != NULL ) {
                        p->SetNewVal( res );
                    }
                }
                break;
            default:
                break;
        }
    }
}
开发者ID:dolphilia,项目名称:hspcmp-macosx,代码行数:60,代码来源:ahtobj.cpp


示例5: GetStore

void DataModelListCtrl::Fill()
{
#if USE_DATALISTVIEW
    GetStore()->Reset(GetItemCount());
#else
    SetItemCount(GetModel() ? GetModel()->GetRowCount() : 0);
    Refresh();
#endif
}
开发者ID:tchv71,项目名称:StartPP,代码行数:9,代码来源:datalist.cpp


示例6: GetModel

void Ship::Render(Graphics::Renderer *renderer, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform)
{
	if (IsDead()) return;

	m_shipFlavour.ApplyTo(GetModel());

	//angthrust negated, for some reason
	GetModel()->SetThrust(vector3f(m_thrusters), -vector3f(m_angThrusters));

	if (m_landingGearAnimation)
		m_landingGearAnimation->SetProgress(m_wheelState);

	//strncpy(params.pText[0], GetLabel().c_str(), sizeof(params.pText));
	RenderModel(renderer, viewCoords, viewTransform);

	// draw shield recharge bubble
	if (m_stats.shield_mass_left < m_stats.shield_mass) {
		const float shield = 0.01f*GetPercentShields();
		renderer->SetBlendMode(Graphics::BLEND_ADDITIVE);
		glPushMatrix();
		matrix4x4f trans = matrix4x4f::Identity();
		trans.Translate(viewCoords.x, viewCoords.y, viewCoords.z);
		trans.Scale(GetPhysRadius());
		renderer->SetTransform(trans);

		//fade based on strength
		Sfx::shieldEffect->GetMaterial()->diffuse =
			Color((1.0f-shield),shield,0.0,0.33f*(1.0f-shield));
		Sfx::shieldEffect->Draw(renderer);
		glPopMatrix();
		renderer->SetBlendMode(Graphics::BLEND_SOLID);
	}

	if (m_ecmRecharge > 0.0f) {
		// ECM effect: a cloud of particles for a sparkly effect
		vector3f v[100];
		for (int i=0; i<100; i++) {
			const double r1 = Pi::rng.Double()-0.5;
			const double r2 = Pi::rng.Double()-0.5;
			const double r3 = Pi::rng.Double()-0.5;
			v[i] = vector3f(viewTransform * (
				GetPosition() + GetPhysRadius() *
				vector3d(r1, r2, r3).Normalized()
			));
		}
		Color c(0.5,0.5,1.0,1.0);
		float totalRechargeTime = GetECMRechargeTime();
		if (totalRechargeTime >= 0.0f) {
			c.a = m_ecmRecharge / totalRechargeTime;
		}

		Sfx::ecmParticle->diffuse = c;
		renderer->SetBlendMode(Graphics::BLEND_ALPHA_ONE);
		renderer->DrawPointSprites(100, v, Sfx::ecmParticle, 50.f);
	}
}
开发者ID:HeadHunterEG,项目名称:pioneer,代码行数:56,代码来源:Ship.cpp


示例7: wxCHECK_RET

void wxDataViewCtrl::AddChildren(wxDataViewItem const& parentItem)
{
  int noOfChildren;

  wxDataViewItemArray items;


  wxCHECK_RET(GetModel() != NULL,"Model pointer not initialized.");
  noOfChildren = GetModel()->GetChildren(parentItem,items);
  (void) GetModel()->ItemsAdded(parentItem,items);
}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:11,代码来源:dataview_osx.cpp


示例8: DynamicBody

Ship::Ship(const ShipType::Id &shipId): DynamicBody(),
	m_flightState(FLYING),
	m_alertState(ALERT_NONE),
	m_controller(0),
	m_thrusterFuel(1.0),
	m_reserveFuel(0.0),
	m_landingGearAnimation(nullptr)
{
	Properties().Set("flightState", EnumStrings::GetString("ShipFlightState", m_flightState));
	Properties().Set("alertStatus", EnumStrings::GetString("ShipAlertStatus", m_alertState));

	m_lastAlertUpdate = 0.0;
	m_lastFiringAlert = 0.0;
	m_shipNear = false;
	m_shipFiring = false;

	m_testLanded = false;
	m_launchLockTimeout = 0;
	m_wheelTransition = 0;
	m_wheelState = 0;
	m_dockedWith = nullptr;
	m_dockedWithPort = 0;
	SetShipId(shipId);
	m_thrusters.x = m_thrusters.y = m_thrusters.z = 0;
	m_angThrusters.x = m_angThrusters.y = m_angThrusters.z = 0;

	InitEquipSet();

	m_hyperspace.countdown = 0;
	m_hyperspace.now = false;
	for (int i=0; i<ShipType::GUNMOUNT_MAX; i++) {
		m_gun[i].state = 0;
		m_gun[i].recharge = 0;
		m_gun[i].temperature = 0;
	}
	m_ecmRecharge = 0;
	m_shieldCooldown = 0.0f;
	m_curAICmd = 0;
	m_aiMessage = AIERROR_NONE;
	m_decelerating = false;

	SetModel(m_type->modelName.c_str());
	SetLabel("UNLABELED_SHIP");
	m_skin.SetRandomColors(Pi::rng);
	m_skin.SetDecal(m_type->manufacturer);
	m_skin.Apply(GetModel());
	if(GetModel()->SupportsPatterns())
		GetModel()->SetPattern(Pi::rng.Int32(0, GetModel()->GetNumPatterns()-1));

	Init();
	SetController(new ShipController());
}
开发者ID:tomm,项目名称:pioneer,代码行数:52,代码来源:Ship.cpp


示例9: Settings_Reset

void Settings_Reset()
{
	settings.remoteExtendingDisabled = FALSE;
	if ( GetModel() == TF5800 && GetModel() == TF5810t || GetModel() == TF5800t )
	{
		settings.mheg = TRUE;
	}
	else
	{
		settings.mheg = FALSE;
	}
	settings.quickAspectBlocker = FALSE;
}
开发者ID:BackupTheBerlios,项目名称:tap-svn,代码行数:13,代码来源:Settings.c


示例10: GetModel

void CGibbsSamplingInfEngine::Initialization()
{
  
  int nFactors = GetModel()->GetNumberOfFactors();
  pFactorVector *currentFactors = GetCurrentFactors();
  currentFactors->resize(nFactors);
  int i;
  for( i = 0; i < nFactors; i++ )
  {
    (*currentFactors)[i] = GetModel()->GetFactor(i);
  }
  
}
开发者ID:JacobCWard,项目名称:PyPNL,代码行数:13,代码来源:pnlGibbsSamplingInferenceEngine.cpp


示例11: GetModel

bool CSamplingInfEngine::CheckIsAllNdsTab() const
{
    const CStaticGraphicalModel *pGrModel = GetModel();
    int nnodes = pGrModel->GetNumberOfNodes();
    const CModelDomain *pMD = GetModel()->GetModelDomain();
    int i;
    for( i = 0; i < nnodes; i++ )
    {
	if(! pMD->GetVariableType(i)->IsDiscrete())
	{
	    return false;
	}
    }
    return true;
}
开发者ID:lspatial,项目名称:spstatics_parallel,代码行数:15,代码来源:pnlSamplingInferenceEngine.cpp


示例12: rand

void SpaceStation::InitStation()
{
	m_adjacentCity = 0;
	for(int i=0; i<NUM_STATIC_SLOTS; i++) m_staticSlot[i] = false;
	Random rand(m_sbody->GetSeed());
	const bool ground = m_sbody->GetType() == SystemBody::TYPE_STARPORT_ORBITAL ? false : true;
	m_type = SpaceStationType::RandomStationType(rand, ground);

	if(m_shipDocking.empty()) {
		m_shipDocking.reserve(m_type->NumDockingPorts());
		for (unsigned int i=0; i<m_type->NumDockingPorts(); i++) {
			m_shipDocking.push_back(shipDocking_t());
		}
		// only (re)set these if we've not come from the ::Load method
		m_doorAnimationStep = m_doorAnimationState = 0.0;
	}
	assert(m_shipDocking.size() == m_type->NumDockingPorts());

	// This SpaceStation's bay ports are an instance of...
	m_ports = m_type->Ports();

	SetStatic(ground);			// orbital stations are dynamic now

	// XXX hack. if we loaded a game then ModelBody::Load already restored the
	// model and we shouldn't overwrite it
	if (!GetModel())
		SetModel(m_type->ModelName().c_str());

	SceneGraph::Model *model = GetModel();

	m_navLights.reset(new NavLights(model, 2.2f));
	m_navLights->SetEnabled(true);

	if (ground) SetClipRadius(CITY_ON_PLANET_RADIUS);		// overrides setmodel

	m_doorAnimation = model->FindAnimation("doors");

	SceneGraph::ModelSkin skin;
	skin.SetDecal("pioneer");

	if (model->SupportsPatterns()) {
		skin.SetRandomColors(rand);
		skin.Apply(model);
		model->SetPattern(rand.Int32(0, model->GetNumPatterns()));
	} else {
		skin.Apply(model);
	}
}
开发者ID:christiank,项目名称:pioneer,代码行数:48,代码来源:SpaceStation.cpp


示例13: Spawn

void CBaseTrainDoor :: Spawn( void )
{
	Precache();

	pev->movetype = MOVETYPE_PUSH;
	pev->solid = SOLID_BSP;

	SET_MODEL( edict(), GetModel( ));

	// is mapper forget set angles?
	if( pev->movedir == g_vecZero )
	{
		pev->movedir = Vector( 1, 0, 0 );
		SetLocalAngles( g_vecZero );
	}

	// save initial angles
	m_vecOldAngles = GetLocalAngles();	// ???
	m_vecPosition1 = GetLocalOrigin();	// member the initial position

	if( !pev->speed )
		pev->speed = 100;

	m_pUserData = WorldPhysic->CreateKinematicBodyFromEntity( this );
	door_state = TD_CLOSED;
	SetTouch( NULL );

	SetThink( &CBaseTrainDoor :: FindTrain );
	SetNextThink( 0.1 );
}
开发者ID:XashDev,项目名称:XashXT,代码行数:30,代码来源:doors.cpp


示例14: SetOrient

void SpaceStation::TimeStepUpdate(const float timeStep)
{
	// rotate the thing
	double len = m_type->angVel * timeStep;
	if (!is_zero_exact(len)) {
		matrix3x3d r = matrix3x3d::RotateY(-len);		// RotateY is backwards
		SetOrient(r * GetOrient());
	}
	m_oldAngDisplacement = len;

	// reposition the ships that are docked or docking here
	for (int i=0; i<m_type->numDockingPorts; i++) {
		const shipDocking_t &dt = m_shipDocking[i];
		if (!dt.ship) { //free
			m_navLights->SetColor(i+1, NavLights::NAVLIGHT_GREEN);
			continue;
		}
		if (dt.stage == 1) //reserved
			m_navLights->SetColor(i+1, NavLights::NAVLIGHT_YELLOW);
		if (dt.ship->GetFlightState() == Ship::FLYING)
			continue;
		PositionDockedShip(dt.ship, i);
		m_navLights->SetColor(i+1, NavLights::NAVLIGHT_RED); //docked
	}

	if (m_doorAnimation)
		GetModel()->UpdateAnimations();
}
开发者ID:abramhindle,项目名称:pioneer,代码行数:28,代码来源:SpaceStation.cpp


示例15: KeyValues

//------------------------------------------------------------------------------
// Purpose:
//------------------------------------------------------------------------------
bool CNPC_Furniture::CreateVPhysics( void )
{
#ifndef HL2_DLL
	return false;
#endif

	if ( !m_BoneFollowerManager.GetNumBoneFollowers() )
	{
		KeyValues *modelKeyValues = new KeyValues("");
		if ( modelKeyValues->LoadFromBuffer( modelinfo->GetModelName( GetModel() ), modelinfo->GetModelKeyValueText( GetModel() ) ) )
		{
			// Do we have a bone follower section?
			KeyValues *pkvBoneFollowers = modelKeyValues->FindKey("bone_followers");
			if ( pkvBoneFollowers )
			{
				// Loop through the list and create the bone followers
				KeyValues *pBone = pkvBoneFollowers->GetFirstSubKey();
				while ( pBone )
				{
					// Add it to the list
					const char *pBoneName = pBone->GetString();
					m_BoneFollowerManager.AddBoneFollower( this, pBoneName );

					pBone = pBone->GetNextKey();
				}
			}
		}
		modelKeyValues->deleteThis();
	}

	return true;
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:35,代码来源:genericmonster.cpp


示例16: GetModel

// 武器の初期化(ブレード)
void CWeapon::Reset() {
    //Model = GetModel(L"WEAPON\\blade.x");
    //Scale = CVector(1.0f, 1, 1)*0.6f;//0.6f
    Model = GetModel(L"WEAPON\\sword.x");
    Scale = CVector(1.5f, 1, 1)*2.7f;//0.6f
    Color = CColor(1, 1, 1, 0.0f);//0.0
}
开发者ID:owarisoranaki,项目名称:Homebrew-games,代码行数:8,代码来源:Weapon.cpp


示例17: GetModel

void CDirectPrintPrinterSettingView::NewDataL()
	{
	CDirectPrintModel& model = GetModel();
	TInt count = model.PrinterCount();

	TBuf<50> buf;
	TBool IsNewName = EFalse;
	for (TInt i=1; !IsNewName; i++)
		{
		buf.Format(_L("Printer%d"), count+i);
		IsNewName = ETrue;

		for (TInt j=0; j<count; j++)
			{
			TDirectPrintPrinterData printerData;
			model.GetPrinterDataL(j, printerData);
			if (printerData.iPrinterName.Compare(buf) == 0)
				{
				IsNewName = EFalse;
				break;
				}
			}
		}

	iPrinterId = model.NewPrinterId();
	iPrinterName.Copy(buf);
	iDriver = 0;
	iBearer = 0;
	iAccessPoint = 0;
//	iAccessPointName.Copy(_L("WLAN_ap1"));
//	iHostIp.SetAddress(3232235530);
	iPort = 80;
	iUserName.Copy(_L(""));
	iQue.Copy(_L(""));
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:directprintsettingview.cpp


示例18: Spawn

// UNDONE: right now this is pretty much a copy of the squid spit with minor changes to the way it does damage
void CBMortar:: Spawn( void )
{
	SetMoveType( MOVETYPE_FLYGRAVITY );
	SetClassname( "bmortar" );
	
	SetSolid( SOLID_BBOX );

	pSprite = CSprite::SpriteCreate( "sprites/mommaspit.vmt", GetAbsOrigin(), true ); 

	if ( pSprite )
	{
		pSprite->SetAttachment( this, 0 );
		pSprite->m_flSpriteFramerate = 5;

		pSprite->m_nRenderMode = kRenderTransAlpha;
		pSprite->SetBrightness( 255 );

		m_iFrame = 0;

		pSprite->SetScale( 2.5f );
	}

	UTIL_SetSize( this, Vector( 0, 0, 0), Vector(0, 0, 0) );

	m_maxFrame = (float)modelinfo->GetModelFrameCount( GetModel() ) - 1;
	m_flDmgTime = gpGlobals->curtime + 0.4;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:28,代码来源:hl1_npc_bigmomma.cpp


示例19: switch

void CDirectPrintPrinterSettingView::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		case EAknSoftkeyBack:
			{
			iListBox->StoreSettingsL();
			StoreDriverInfoL();
			StoreTypeInfoL();
			StoreBearerInfoL();
			StoreExtendSettingsL();
			WriteDataL(); // write to model
			GetBearerMgr()->SetJobSettings(); // write to bearer
			GetModel().SetIsNewData(EFalse);

			AppUi()->HandleCommandL(EDirectPrintCmdIdPrinterSettingViewBack);
			}
			break;
		default:
			{
			AppUi()->HandleCommandL(aCommand);
			}
			break;
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:25,代码来源:directprintsettingview.cpp


示例20: GetModel

void DataModelListCtrl::InitColumns(bool row_column)
{
    const wxDataModelBase* model = GetModel();
    const DataViewColumnInfoVector vec = DataViewColumnInfoVector::MakeDefaultVector(model);

    InitColumns(vec, row_column);
}
开发者ID:tchv71,项目名称:StartPP,代码行数:7,代码来源:datalist.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetModelName函数代码示例发布时间:2022-05-30
下一篇:
C++ GetMode函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap