本文整理汇总了C++中EntityManager::CreateRigidDebris方法的典型用法代码示例。如果您正苦于以下问题:C++ EntityManager::CreateRigidDebris方法的具体用法?C++ EntityManager::CreateRigidDebris怎么用?C++ EntityManager::CreateRigidDebris使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityManager
的用法示例。
在下文中一共展示了EntityManager::CreateRigidDebris方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateThrowable
Debris* ThrowableGenerator::CreateThrowable(const String& Throwable)
{
EntityManager* EntMan = static_cast<EntityManager*>( Entresol::GetSingletonPtr()->GetWorld(0)->GetManager(ManagerBase::MT_EntityManager) );
ThrowableData* ToBeCreated = GetThrowableData(Throwable);
if(!ToBeCreated)
return NULL;
std::stringstream NameGen;
(ToBeCreated->ThrowableCount)++;
NameGen << ToBeCreated->ThrowableName << ToBeCreated->ThrowableCount;
RigidDebris* Created = EntMan->CreateRigidDebris(ToBeCreated->Mass);
Created->SetName(NameGen.str());
Created->GetRigidProxy()->SetLinearMovementFactor(Vector3(1,1,0));
Created->GetRigidProxy()->SetFriction(ToBeCreated->Friction);
Created->GetRigidProxy()->SetRestitution(ToBeCreated->Restitution);
// ©reated->GetRigidProxy()->SetActivationState(Physics::WOAS_DisableDeactivation);
Created->GetItemProxy()->SetMesh(ToBeCreated->MeshName,ToBeCreated->GroupName);
Created->SetOrientation(Quaternion(MathTools::GetPi(),Vector3(0,1,0)));
/*if("Rubber"==Throwable)
{
//generate sphere shape
}else{
//generate convex hull
//probably make more if's for cylinders and such
}// */
return Created;
}