本文整理汇总了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);
}
示例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;
}
示例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;
}