您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetMesh函数代码示例

51自学网 2021-06-01 21:10:50
  C++
这篇教程C++ GetMesh函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetMesh

void ACarcinusCharacter::SetHealth(int damage){	Super::SetHealth(damage);	mEnemyHealth = mEnemyHealth - damage;		if (mEnemyHealth <= 0)	{		GetMesh()->SetCollisionProfileName("Ragdoll");		GetMesh()->SetSimulatePhysics(true);				GetWorld()->GetTimerManager().SetTimer(mDeathTimeHandler, this, &ACarcinusCharacter::DisablePhysics, 10.0f, false);				ACharacter* PlayerRef = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);		FString DeathEvent = "Event_CrabDeath";		AAudioManager::GetInstance()->PlayWwiseEvent(DeathEvent, PlayerRef);		AAudioManager::GetInstance()->SetFearValue(1.0f);		ParticleComponent->Activate(true); 		if (GetCapsuleComponent() != NULL)		{			GetCapsuleComponent()->DestroyComponent();		}		if (HeadCollider != NULL)		{			HeadCollider->DestroyComponent();		}	}	mEnemyHealth = FMath::Clamp(mEnemyHealth, 0, mEnemyMaxHealth);}
开发者ID:AndreaOsorio,项目名称:PSI,代码行数:35,


示例2: GameObject

Rock::Rock(D3DCOLORVALUE color, const btVector3 &startPos) : 	GameObject(	new btCylinderShape(btVector3(1.5, 1, 1)),	10, 	startPos, 	btQuaternion((90), (0), (1), (0))	){	D3DCOLORVALUE ambColor;	ambColor.r = color.r * 0.3;	ambColor.g = color.g * 0.3;	ambColor.b = color.b * 0.3;	ambColor.a = 0;	D3DCOLORVALUE diffColor;	diffColor.r = color.r*1;	diffColor.g = color.g*1;	diffColor.b = color.b*1;	diffColor.a = 0;	CreateMeshFromShape();	GetMesh()->SetColour(diffColor, Advanced2D::Mesh::MT_DIFFUSE);	GetMesh()->SetColour(ambColor,Advanced2D::Mesh::MT_AMBIENT);	GetMesh()->SetRotation(0, 90, 0);	//GetRigidBody()->setWorldTransform(btTransform(}
开发者ID:Guy-Sensei,项目名称:ShuffleBoard,代码行数:26,


示例3: GetMesh

// Player Died, Called on all usersvoid ARadeCharacter::GlobalDeath_Implementation(){	// save third person mesh Relative Location and rotation before ragdoll	if (GetMesh())	{		Mesh_InGameRelativeLoc = GetMesh()->RelativeLocation;		Mesh_InGameRelativeRot = GetMesh()->RelativeRotation;	}	// Disable player input	DisableInput(Cast<APlayerController>(Controller));	// If Player can revive, revive hit after a delay	if (bCanRevive)	{		FTimerHandle MyHandle;		GetWorldTimerManager().SetTimer(MyHandle, this, &ARadeCharacter::Revive, ReviveTime, false);	}	// Event and Ragdoll	Super::GlobalDeath_Implementation();	// Update Visibility	UpdateComponentsVisibility();	// Call on Blueprint	BP_PlayerDied();}
开发者ID:dcyoung,项目名称:Rade,代码行数:29,


示例4: GetMesh

float ALD35Character::TakeDamage(float DamageAmount, FDamageEvent const & DamageEvent, AController * EventInstigator, AActor * DamageCauser){	UGameplayStatics::PlaySoundAtLocation(this, HitSound, this->GetActorLocation());	float dmg = Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);	Health -= dmg;	if (Health <= 0)	{		GetMesh()->SetSimulatePhysics(true);		GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);		GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision);		GetMovementComponent()->SetActive(false);		UGameplayStatics::PlaySoundAtLocation(this, DeathSound, this->GetActorLocation());		if (EventInstigator)		{			if (auto a = Cast<ALD35Character>(EventInstigator->GetPawn()))			{				if (a->Faction == Faction)				{					UE_LOG(LogTemp, Display, TEXT("Teamkilling detected!"));					a->Faction = FMath::Rand();				}			}		}	}	return dmg;}
开发者ID:Quadtree,项目名称:LD35,代码行数:32,


示例5: GetMesh

float *EditPolyData::GetSoftSelection (TimeValue t,									   float falloff, float pinch, float bubble, int edist,									   bool ignoreBackfacing, Interval & edistValid) {	if (!GetMesh()) return NULL;	if (GetMesh()->numv == 0) return NULL;	if (!mpTemp) mpTemp = new MNTempData();	mpTemp->SetMesh (GetMesh());	int nv = GetMesh()->numv;	mpTemp->InvalidateSoftSelection ();	// have to do, or it might remember last time's falloff, etc.	if (!mVertexDistanceValidity.InInterval (t)) {		mpTemp->InvalidateDistances ();		mVertexDistanceValidity = mGeomValid;		mVertexDistanceValidity &= mTopoValid;		mVertexDistanceValidity &= edistValid;	}	// Question: Should we be using MN_SEL here, or MN_EDITPOLY_OP_SELECT based on our selection BitArrays?	// Answer: As of this writing, this method is only called from EditPolyMod::ModifyObject,	// where the MN_SEL flags are set to the appropriate selection, or from the Display code, which is based	// on the cache set in ModifyObject.  So I think we're fine.	return mpTemp->VSWeight (edist, edist, ignoreBackfacing,		falloff, pinch, bubble, MN_SEL)->Addr(0);}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:25,


示例6: GetMesh

BOOL TriObject::PolygonCount(TimeValue t, int& numFaces, int& numVerts) {    numFaces = GetMesh().getNumFaces();    numVerts = GetMesh().getNumVerts();    return TRUE;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:7,


示例7: serverEquipWeapon_Implementation

void AFPSGCharacter::serverEquipWeapon_Implementation(int32 in_currentWeaponIndex){	if (weaponInventory[in_currentWeaponIndex] != NULL)	{		//Detach previous weapon		if (currentWeapon != NULL)		{			//If previous weapon is attached to firstPersonMesh, then detach it and attach it to the inventory socket			if (currentWeapon->IsAttachedTo(firstPersonMesh->GetOwner()))			{				currentWeapon->DetachRootComponentFromParent(true);				currentWeapon->AttachRootComponentTo(GetMesh(), inventoryWeaponSocket, EAttachLocation::SnapToTarget);				currentWeapon->SetActorHiddenInGame(true);			}		}		//Retrieve the new weapon from the inventory		currentWeapon = weaponInventory[in_currentWeaponIndex];		//Attach the new weapon		if (currentWeapon != NULL)		{			//If current weapon is attached to the inventory socket, detach it and then attach it to the equipped weapon socket			if (currentWeapon->IsAttachedTo(GetMesh()->GetOwner()))			{				currentWeapon->DetachRootComponentFromParent(true);				currentWeapon->AttachRootComponentTo(firstPersonMesh, currentWeapon->getEquipAtSocket(), EAttachLocation::SnapToTarget);				currentWeapon->SetActorHiddenInGame(false);			}		}	}}
开发者ID:Gardern,项目名称:FPSGame_code,代码行数:32,


示例8: GetMaxHealth

void ANimModCharacter::PostInitializeComponents(){	Super::PostInitializeComponents();	if (Role == ROLE_Authority)	{		Health = GetMaxHealth();		SpawnDefaultInventory();	}	// set initial mesh visibility (3rd person view)	UpdatePawnMeshes();	// create material instance for setting team colors (3rd person view)	for (int32 iMat = 0; iMat < GetMesh()->GetNumMaterials(); iMat++)	{		MeshMIDs.Add(GetMesh()->CreateAndSetMaterialInstanceDynamic(iMat));	}	// play respawn effects	if (GetNetMode() != NM_DedicatedServer)	{		if (RespawnFX)		{			UGameplayStatics::SpawnEmitterAtLocation(this, RespawnFX, GetActorLocation(), GetActorRotation());		}		if (RespawnSound)		{			UGameplayStatics::PlaySoundAtLocation(this, RespawnSound, GetActorLocation());		}	}}
开发者ID:Nimgoble,项目名称:NimMod,代码行数:33,


示例9: GetMesh

void ABaseCharacter::SetCameraView(bool bFirstPerson){	if (bFirstPerson)	{		GetMesh()->SetOwnerNoSee(true);		FirstPersonViewMesh->SetOnlyOwnerSee(true);		FirstPersonViewMesh->SetOwnerNoSee(false);		WeaponMesh->SetOnlyOwnerSee(false);		WeaponMesh->SetOwnerNoSee(false);		CameraBoom->TargetArmLength = 0.0f;		bIsInFirstPersonView = true;	}	else	{		GetMesh()->SetOwnerNoSee(false);		FirstPersonViewMesh->SetOnlyOwnerSee(false);		FirstPersonViewMesh->SetOwnerNoSee(true);		WeaponMesh->SetOnlyOwnerSee(false);		WeaponMesh->SetOwnerNoSee(true);		CameraBoom->TargetArmLength = 300.0f;		bIsInFirstPersonView = false;	}}
开发者ID:TheComet93,项目名称:iceweasel,代码行数:30,


示例10: GetPosition

void ClothEntity_cl::InitFunction(){  m_vCurrentPos = GetPosition();  m_vCurrentOri = GetOrientation();  BaseInit();  if (!GetMesh())    return;  const char *szModel = GetMesh()->GetFilename();  SetMeshModel(szModel,m_vCurrentScaling);}
开发者ID:Alagong,项目名称:projectanarchy,代码行数:10,


示例11: IsFirstPerson

void ANimModCharacter::UpdatePawnMeshes(){	bool const bFirstPerson = IsFirstPerson();	if (Mesh1P != nullptr)	{		Mesh1P->MeshComponentUpdateFlag = !bFirstPerson ? EMeshComponentUpdateFlag::OnlyTickPoseWhenRendered : EMeshComponentUpdateFlag::AlwaysTickPoseAndRefreshBones;		Mesh1P->SetOwnerNoSee(!bFirstPerson);	}	GetMesh()->MeshComponentUpdateFlag = bFirstPerson ? EMeshComponentUpdateFlag::OnlyTickPoseWhenRendered : EMeshComponentUpdateFlag::AlwaysTickPoseAndRefreshBones;	GetMesh()->SetOwnerNoSee(bFirstPerson);}
开发者ID:Nimgoble,项目名称:NimMod,代码行数:12,


示例12: assert

void GeometryInstanceIterator::StepNext(){	assert(IsValid());	++m_batchIdx;	if( m_batchIdx >= GetMesh()->GetBatchCount() )	{		m_batchIdx = 0;		m_currentMesh = NULL;		do		{			++m_instIdx; // skip empty meshes		} while( IsValid() && GetMesh()->GetBatchCount() == 0 );	}}
开发者ID:ChiahungTai,项目名称:OpenCL-playgorund,代码行数:14,


示例13: OnConstruction

void AARCharacter::OnConstruction(const FTransform& Transform){	Head->SetMasterPoseComponent(GetMesh());	Head->UpdateMasterBoneMap();	Shoulders->SetMasterPoseComponent(GetMesh());	Shoulders->UpdateMasterBoneMap();	Arms->SetMasterPoseComponent(GetMesh());	Arms->UpdateMasterBoneMap();	Hands->SetMasterPoseComponent(GetMesh());	Hands->UpdateMasterBoneMap();	Torso->SetMasterPoseComponent(GetMesh());	Torso->UpdateMasterBoneMap();	Legs->SetMasterPoseComponent(GetMesh());	Legs->UpdateMasterBoneMap();	Feets->SetMasterPoseComponent(GetMesh());	Feets->UpdateMasterBoneMap();	Backpack->SetMasterPoseComponent(GetMesh());	Backpack->UpdateMasterBoneMap();}
开发者ID:iniside,项目名称:ActionRPGGame,代码行数:26,


示例14: GetWorld

void AMonster::PostInitializeComponents(){	Super::PostInitializeComponents();	// instantiate the melee weapon if a bp was selected	if (BPMeleeWeapon)	{		MeleeWeapon = GetWorld()->SpawnActor<AMeleeWeapon>(BPMeleeWeapon, FVector(), FRotator());		if (MeleeWeapon)		{			const USkeletalMeshSocket *meshSocket = (USkeletalMeshSocket*)GetMesh()->GetSocketByName("RightHandSocket"); // be sure to use correct			// socket name!			meshSocket->AttachActor(MeleeWeapon, GetMesh());		}	}}
开发者ID:damorton,项目名称:raider,代码行数:15,


示例15: SetCastShadows

// **************************************************//            OVERRIDDEN ENTITY FUNCTIONS// **************************************************void TransitionBarbarian_cl::InitFunction(){  if (!HasMesh())    return;  SetCastShadows(TRUE);    // Setup all animation sequences	SetupAnimations();  if (!m_bModelValid)    return;  if( !m_pPhys)  {    m_pPhys = new vHavokCharacterController();    m_pPhys->Initialize();    hkvAlignedBBox bbox;    VDynamicMesh *pMesh = GetMesh();    pMesh->GetCollisionBoundingBox(bbox);    float r = bbox.getSizeX() * 0.5f;    m_pPhys->Capsule_Radius = r;    m_pPhys->Character_Top.set(0,0,bbox.m_vMax.z - r);    m_pPhys->Character_Bottom.set(0,0,bbox.m_vMin.z + r);    m_pPhys->Max_Slope = 75.0f;    AddComponent(m_pPhys);    //	pPhys->SetDebugRendering(TRUE);  }   // Get Model  VDynamicMesh* pModel = GetMesh();	VASSERT(pModel);  // Transition table to use  VTransitionTable *pTable = VTransitionManager::GlobalManager().LoadTransitionTable(pModel,"Barbarian.vTransition");  VASSERT(pTable && pTable->IsLoaded());	// Setup the state machine component and pass the filename of the transition file  // in which the transitions between the various animation states are defined.	m_pStateMachine = new VTransitionStateMachine();  m_pStateMachine->Init(this, pTable);	AddComponent(m_pStateMachine);	// Set initial state	m_pStateMachine->SetState(m_pSkeletalSequenceList[ANIMID_IDLE]);}
开发者ID:Bewolf2,项目名称:projectanarchy,代码行数:51,


示例16: GetMesh

void XTCSample::DeleteFaces(TimeValue t,Object *obj){	if(bNF_OnOff)	{		Mesh *mesh = GetMesh(obj);				if(!mesh)			return;				Interval ivalid = FOREVER;		int nf;		bo->GetParamBlockByID(x_params)->GetValue(pb_nf_spin,t,nf, ivalid);		BitArray ba;		ba.SetSize(mesh->getNumFaces());		ba.ClearAll();				for(int i = nf ; i < mesh->getNumFaces() ; i++ )		{			ba.Set(i);		}				if(!ba.IsEmpty())			mesh->DeleteFaceSet(ba);	}}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:25,


示例17: DbgAssert

int XTCSample::Display(TimeValue t, INode* inode, ViewExp *vpt, int flags, Object *pObj){	if ( ! vpt || ! vpt->IsAlive() )	{		// why are we here		DbgAssert(!_T("Doing Display() on invalid viewport!"));		return FALSE;	}	if(pObj->ClassID() == XGSPHERE_CLASS_ID || pObj->IsSubClassOf(triObjectClassID))	{		return DisplayMesh(t, inode, vpt, flags, GetMesh(pObj));	}#ifndef NO_PATCHES	else if( pObj->IsSubClassOf(patchObjectClassID) )	{		return DisplayPatch(t, inode, vpt, flags, (PatchObject *) pObj);	}#endif	else if(pObj->CanConvertToType(triObjectClassID))	{		TriObject *pTri = (TriObject *) pObj->ConvertToType(t,triObjectClassID);		DisplayMesh(t, inode, vpt, flags, &pTri->mesh);		if(pTri != pObj)			pTri->DeleteThis();			}		return 0;}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:30,


示例18: GetMesh

void ABaseCharacter::SetRagdollPhysics(){	USkeletalMeshComponent* Mesh3P = GetMesh();	if (Mesh3P)	{		Mesh3P->SetCollisionProfileName(TEXT("Ragdoll"));	}	SetActorEnableCollision(true);	if (!IsPendingKill() || Mesh3P || Mesh3P->GetPhysicsAsset())	{		Mesh3P->SetAllBodiesSimulatePhysics(true);		Mesh3P->SetSimulatePhysics(true);		Mesh3P->WakeAllRigidBodies();		Mesh3P->bBlendPhysics = true;		SetLifeSpan(TimeAfterDeathBeforeDestroy);	}	else	{		// Immediately hide the pawn		TurnOff();		SetActorHiddenInGame(true);		SetLifeSpan(1.0f);	}	UCharacterMovementComponent* CharacterComp = Cast<UCharacterMovementComponent>(GetMovementComponent());	if (CharacterComp)	{		CharacterComp->StopMovementImmediately();		CharacterComp->DisableMovement();		CharacterComp->SetComponentTickEnabled(false);	}}
开发者ID:1992please,项目名称:Unreal_ShooterGame,代码行数:34,


示例19: GetMesh

// Set Default ValueAWirePickup::AWirePickup(){    GetMesh()->SetSimulatePhysics(true);        // Drain power level of the Wire    DrainPower = -50.f;}
开发者ID:gsvendso,项目名称:SER432_HomeWork,代码行数:8,


示例20: GetWorld

void AVehiclePawn::ReceiveHit(class UPrimitiveComponent* MyComp, class AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalForce, const FHitResult& Hit){	Super::ReceiveHit(MyComp, Other, OtherComp, bSelfMoved, HitLocation, HitNormal, NormalForce, Hit);	if (ImpactTemplate && NormalForce.Size() > ImpactEffectNormalForceThreshold)	{		AVehicleImpactEffect* EffectActor = GetWorld()->SpawnActorDeferred<AVehicleImpactEffect>(ImpactTemplate, HitLocation, HitNormal.Rotation());		if (EffectActor)		{			float DotBetweenHitAndUpRotation = FVector::DotProduct(HitNormal, GetMesh()->GetUpVector());			EffectActor->HitSurface = Hit;			EffectActor->HitForce = NormalForce;			EffectActor->bWheelLand = DotBetweenHitAndUpRotation > 0.8;			UGameplayStatics::FinishSpawningActor(EffectActor, FTransform(HitNormal.Rotation(), HitLocation));		}	}	if (ImpactCameraShake)	{		AVehiclePlayerController* PC = Cast<AVehiclePlayerController>(Controller);		if (PC != NULL && PC->IsLocalController())		{			PC->ClientPlayCameraShake(ImpactCameraShake, 1);		}	}}
开发者ID:WesMC,项目名称:UnrealVehicleExampleNetworked,代码行数:26,


示例21: GetInventory

void PlayerBehaviour::Drop(){	GetInventory();	size_t count = pcinventory->GetEntityCount();	if(count <= 0)	{		printf("Inventory is empty!/n");		return;	}	iCelEntity* child = pcinventory->GetEntity(0);	pcinventory->RemoveEntity(child);	csRef<iPcLinearMovement> pclinmove = CEL_QUERY_PROPCLASS_ENT(		child, iPcLinearMovement);	if(pclinmove)	{		GetMesh ();		csVector3 pos = pcmesh->GetMesh()->GetMovable()->GetTransform()			.This2Other(csVector3 (0, 2, -2));		iSector* sector = pcmesh->GetMesh()->GetMovable()->GetSectors()->Get(0);		pclinmove->SetPosition(pos, 0, sector);		pclinmove->SetVelocity(csVector3 (0, .1f, 0));		csRef<iPcMesh> pcmesh_child = CEL_QUERY_PROPCLASS_ENT(child, iPcMesh);		if(pcmesh_child) pcmesh_child->Show();	}}
开发者ID:Shamanblood,项目名称:HiveGame,代码行数:25,


示例22: toggleCastOngoing

void AManaJourneyCharacter::useShell(){	if (characterClasses.Contains("whiteMageClass") && whiteMageClassRef && !castOngoing)	{		toggleCastOngoing();		bool bCastedShell = false;		bCastedShell = whiteMageClassRef->castShell(*this, GetMesh());		if (bCastedShell)		{			toggleCharacterMovement();			updatePhysicProtection();			castShellAnimation(level);			toggleCastOngoing();			//NOTE remove shell effect after fadeTimeForEffect has set to false (so add slight delay for beeing sure) 			FTimerHandle UpdatePhysicProtectionTimer;			GetWorldTimerManager().ClearTimer(UpdatePhysicProtectionTimer);			FTimerDelegate UpdatePhysicProtectionTimerDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::updatePhysicProtection);			GetWorldTimerManager().SetTimer(UpdatePhysicProtectionTimer, UpdatePhysicProtectionTimerDelegate, fadeTimeForEffect + 0.2f, false);			FTimerHandle EnableMovementTimer;			GetWorldTimerManager().ClearTimer(EnableMovementTimer);			FTimerDelegate updateCharacterMovementDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::toggleCharacterMovement);			GetWorldTimerManager().SetTimer(EnableMovementTimer, updateCharacterMovementDelegate, 1.50f, false);			// timer for setting cast to false			FTimerHandle CastOngoingHandler;			GetWorldTimerManager().ClearTimer(CastOngoingHandler);			FTimerDelegate CastOngoingHandlerDelegate = FTimerDelegate::CreateUObject(this, &AManaJourneyCharacter::toggleCastOngoing);			GetWorldTimerManager().SetTimer(CastOngoingHandler, CastOngoingHandlerDelegate, whiteMageClassRef->fShellTimer, false);		}	}}
开发者ID:xhallix,项目名称:UnrealEngine_Manajourney,代码行数:33,


示例23: GetMesh

void  SalomeIO::FindDimension(hid_t gid, const  std::string menu_name, hsize_t n_fem_type) {        Mesh& mesh = GetMesh();    uint mydim = 1;  //this is the initial value, then it will be updated below    mesh.SetDimension(mydim);      std::vector<char*> elem_list;  elem_list.resize(n_fem_type);    for (unsigned j=0; j < elem_list.size(); j++) {      elem_list[j] = new char[max_length];      H5Gget_objname_by_idx(gid,j,elem_list[j],max_length); ///@deprecated see the HDF doc to replace this      std::string tempj(elem_list[j]);            if ( tempj.compare("HE8") == 0 || 	   tempj.compare("H20") == 0 ||  	   tempj.compare("H27") == 0 || 	   tempj.compare("TE4") == 0 || 	   tempj.compare("T10") == 0    )      { mydim = 3; }       else if ( tempj.compare("QU4") == 0 || 	        tempj.compare("QU8") == 0 ||  	        tempj.compare("QU9") == 0 || 	        tempj.compare("TR3") == 0 || 	        tempj.compare("TR6") == 0    ) { mydim = 2; }             if ( mydim > mesh.GetDimension() ) mesh.SetDimension(mydim); 	    }  //end for        return;}
开发者ID:rushs777,项目名称:femus,代码行数:32,


示例24: GetWorld

void AAI_RangeEnemy::ReceiveBeginPlay(){	FActorSpawnParameters SpawnParams;	SpawnParams.Owner = this;	// Added GetMesh check becuase it randomly crashe dhere. No idea if this will fix anything and should be found out	if (GunClass && GetMesh())	{		Gun = GetWorld()->SpawnActor<AGun>(GunClass, SpawnParams);		if (Gun)		{			Gun->SetActorLocation(GetMesh()->GetComponentLocation());			Gun->AttachRootComponentTo(GetMesh());		}	}	Super::ReceiveBeginPlay();}
开发者ID:pcerioli,项目名称:MOOnshineWorks,代码行数:16,


示例25: GetMesh

// **************************************************//            SETUP ANIMATIONS// **************************************************void TransitionCharacter_cl::SetupAnimations(){  m_bModelValid = false;  VDynamicMesh *pMesh = GetMesh();  VVERIFY_OR_RET(pMesh);  // idle animations  m_spSkeletalSequenceList[ANIMID_IDLE] = (VisSkeletalAnimSequence_cl*)pMesh->GetSequence("Idle", VIS_MODELANIM_SKELETAL);  VVERIFY_OR_RET(m_spSkeletalSequenceList[ANIMID_IDLE]);  // run animations  m_spSkeletalSequenceList[ANIMID_RUN] = (VisSkeletalAnimSequence_cl*)pMesh->GetSequence("Run", VIS_MODELANIM_SKELETAL);  VVERIFY_OR_RET(m_spSkeletalSequenceList[ANIMID_RUN]);  // walk animations  m_spSkeletalSequenceList[ANIMID_WALK] = (VisSkeletalAnimSequence_cl*)pMesh->GetSequence("Walk", VIS_MODELANIM_SKELETAL);  VVERIFY_OR_RET(m_spSkeletalSequenceList[ANIMID_WALK]);  // turn animations  m_spSkeletalSequenceList[ANIMID_TURN] = (VisSkeletalAnimSequence_cl*)pMesh->GetSequence("Turn", VIS_MODELANIM_SKELETAL);  VVERIFY_OR_RET(m_spSkeletalSequenceList[ANIMID_TURN]);  // walk backwards animation  m_spSkeletalSequenceList[ANIMID_WALKBACKWARDS] = (VisSkeletalAnimSequence_cl*)pMesh->GetSequence("Run_BWD", VIS_MODELANIM_SKELETAL);  VVERIFY_OR_RET(m_spSkeletalSequenceList[ANIMID_WALKBACKWARDS]);  m_bModelValid = true;}
开发者ID:cDoru,项目名称:projectanarchy,代码行数:31,


示例26: GetMesh

void AUnsealed4x4Pawn::UpdatePhysicsMaterial(){	if (GetActorUpVector().Z < 0)	{		if (bIsLowFriction == true)		{			GetMesh()->SetPhysMaterialOverride(NonSlipperyMaterial);			bIsLowFriction = false;		}		else		{			GetMesh()->SetPhysMaterialOverride(SlipperyMaterial);			bIsLowFriction = true;		}	}}
开发者ID:providence94,项目名称:Unsealed4x4,代码行数:16,


示例27: GetWorld

void ATopDownShmupCharacter::BeginPlay(){    health = 100;    //	Call base class	BeginPlay    Super::BeginPlay();    //	Spawn the weapon, if one was specified    if (WeaponClass)    {        UWorld*	World =	GetWorld();        if (World)        {            FActorSpawnParameters SpawnParams;            SpawnParams.Owner =	this;            SpawnParams.Instigator = Instigator;                        //	Need	to	set	rotation	like	this	because	otherwise	gun	points	down            //	NOTE:	This	should	probably	be	a	blueprint	parameter                        FRotator Rotation(0.0f,	0.0f, -90.0f);            //	Spawn the Weapon            MyWeapon =	World->SpawnActor<AWeapon>(WeaponClass,	FVector::ZeroVector, Rotation, SpawnParams);            if (MyWeapon)            {                //	This is	attached to	"WeaponPoint" which	is defined in the skeleton                //	NOTE: This	should	probably	be	a	blueprint	parameter                MyWeapon->WeaponMesh->AttachTo(GetMesh(),	TEXT("WeaponPoint"));            }        }    }}
开发者ID:aaronwhitnee,项目名称:DwarfCode,代码行数:30,



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


C++ GetMessage函数代码示例
C++ GetMenuString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。