本文整理汇总了C++中LocalModelPiece类的典型用法代码示例。如果您正苦于以下问题:C++ LocalModelPiece类的具体用法?C++ LocalModelPiece怎么用?C++ LocalModelPiece使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LocalModelPiece类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseLocalModelPiece
int CLuaUnitScript::GetPieceRotation(lua_State* L)
{
if (activeScript == NULL)
return 0;
LocalModelPiece* piece = ParseLocalModelPiece(L, activeScript, __FUNCTION__);
return ToLua(L, piece->GetRotation());
}
示例2: ShowScriptError
void CUnitScript::TurnNow(int piece, int axis, float destination)
{
if (!PieceExists(piece)) {
ShowScriptError("Invalid piecenumber");
return;
}
LocalModelPiece* p = pieces[piece];
float3 rot = p->GetRotation();
rot[axis] = destination;
p->SetRotation(rot);
}
示例3: ParseLocalModelPiece
int CLuaUnitScript::GetPiecePosDir(lua_State* L)
{
if (activeScript == NULL) {
return 0;
}
LocalModelPiece* piece = ParseLocalModelPiece(L, activeScript, __FUNCTION__);
float3 pos, dir;
if (!piece->GetEmitDirPos(pos, dir)) {
return 0;
}
ToLua(L, pos); ToLua(L, dir);
return 6;
}
示例4: LocalModelPiece
LocalModelPiece* LocalModel::CreateLocalModelPieces(const S3DModelPiece* mpParent, size_t pieceNum)
{
LocalModelPiece* lmpParent = new LocalModelPiece(mpParent);
pieces.push_back(lmpParent);
LocalModelPiece* lmpChild = NULL;
for (unsigned int i = 0; i < mpParent->GetChildCount(); i++) {
lmpChild = CreateLocalModelPieces(mpParent->GetChild(i), ++pieceNum);
lmpChild->SetParent(lmpParent);
lmpParent->AddChild(lmpChild);
}
return lmpParent;
}