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


C++ TSShapeInstance::buildPolyList方法代码示例

本文整理汇总了C++中TSShapeInstance::buildPolyList方法的典型用法代码示例。如果您正苦于以下问题:C++ TSShapeInstance::buildPolyList方法的具体用法?C++ TSShapeInstance::buildPolyList怎么用?C++ TSShapeInstance::buildPolyList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TSShapeInstance的用法示例。


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

示例1: getPolyList

void ForestConvex::getPolyList(AbstractPolyList* list)
{
   list->setTransform( &mTransform, Point3F(mScale,mScale,mScale));
   list->setObject(mObject);

   TSShapeInstance *si = mData->getShapeInstance();

   S32 detail = mData->getCollisionDetails()[hullId];
   si->animate(detail);
   si->buildPolyList(list, detail);
}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:11,代码来源:forestCollision.cpp

示例2: preload

bool FlyingVehicleData::preload(bool server, String &errorStr)
{
   if (!Parent::preload(server, errorStr))
      return false;

   TSShapeInstance* si = new TSShapeInstance(mShape, false);

   // Resolve objects transmitted from server
   if (!server) {
      for (S32 i = 0; i < MaxSounds; i++)
         if (sound[i])
            Sim::findObject(SimObjectId(sound[i]),sound[i]);

      for (S32 j = 0; j < MaxJetEmitters; j++)
         if (jetEmitter[j])
            Sim::findObject(SimObjectId(jetEmitter[j]),jetEmitter[j]);
   }

   // Extract collision planes from shape collision detail level
   if (collisionDetails[0] != -1)
   {
      MatrixF imat(1);
      PlaneExtractorPolyList polyList;
      polyList.mPlaneList = &rigidBody.mPlaneList;
      polyList.setTransform(&imat, Point3F(1,1,1));
      si->animate(collisionDetails[0]);
      si->buildPolyList(&polyList,collisionDetails[0]);
   }

   // Resolve jet nodes
   for (S32 j = 0; j < MaxJetNodes; j++)
      jetNode[j] = mShape->findNode(sJetNode[j]);

   //
   maxSpeed = maneuveringForce / minDrag;

   delete si;
   return true;
}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:39,代码来源:flyingVehicle.cpp

示例3: buildPolyList

bool ForestItem::buildPolyList( AbstractPolyList* polyList, const Box3F &box, const SphereF &sphere ) const
{
   TSForestItemData *data = (TSForestItemData*)mDataBlock;
   
   bool ret = false;

   MatrixF xfm = getTransform();
   polyList->setTransform( &xfm, Point3F(mScale,mScale,mScale) );

   TSShapeInstance *si = data->getShapeInstance();

   const Vector<S32> &details = data->getCollisionDetails();
   S32 detail;
   for  (U32 i = 0; i < details.size(); i++ ) 
   {
      detail = details[i];
      if (detail != -1) 
         ret |= si->buildPolyList( polyList, detail );         
   }

   return ret;   
}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:22,代码来源:forestCollision.cpp


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