本文整理汇总了C++中KX_GameObject::NodeSetLocalScale方法的典型用法代码示例。如果您正苦于以下问题:C++ KX_GameObject::NodeSetLocalScale方法的具体用法?C++ KX_GameObject::NodeSetLocalScale怎么用?C++ KX_GameObject::NodeSetLocalScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KX_GameObject
的用法示例。
在下文中一共展示了KX_GameObject::NodeSetLocalScale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo()
{
if (addInitFromFrame) {
KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes();
int numScenes = scenes->size();
if (numScenes>=0) {
KX_Scene* scene = scenes->at(0);
CListValue* parentList = scene->GetRootParentList();
for (int ix=0;ix<parentList->GetCount();ix++) {
KX_GameObject* gameobj = (KX_GameObject*)parentList->GetValue(ix);
if (!gameobj->IsDynamic()) {
Object* blenderobject = gameobj->GetBlenderObject();
if (!blenderobject)
continue;
if (blenderobject->type==OB_ARMATURE)
continue;
float eu[3];
mat4_to_eul(eu,blenderobject->obmat);
MT_Point3 pos = MT_Point3(
blenderobject->obmat[3][0],
blenderobject->obmat[3][1],
blenderobject->obmat[3][2]
);
MT_Vector3 eulxyz = MT_Vector3(
eu[0],
eu[1],
eu[2]
);
MT_Vector3 scale = MT_Vector3(
blenderobject->size[0],
blenderobject->size[1],
blenderobject->size[2]
);
gameobj->NodeSetLocalPosition(pos);
gameobj->NodeSetLocalOrientation(MT_Matrix3x3(eulxyz));
gameobj->NodeSetLocalScale(scale);
gameobj->NodeUpdateGS(0);
}
}
}
}
}