本文整理汇总了C++中VisBaseEntity_cl::SetOrientation方法的典型用法代码示例。如果您正苦于以下问题:C++ VisBaseEntity_cl::SetOrientation方法的具体用法?C++ VisBaseEntity_cl::SetOrientation怎么用?C++ VisBaseEntity_cl::SetOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisBaseEntity_cl
的用法示例。
在下文中一共展示了VisBaseEntity_cl::SetOrientation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
WaterSimulationController::WaterSimulationController(void)
{
#if defined(_VISION_ANDROID) //free camera for android (joystick/finger camera)
VisBaseEntity_cl* pCam = Vision::Game.CreateEntity("VFreeCamera", hkvVec3::ZeroVector());
pCam->SetPosition(-290, -220, 680); //spawns with same coordinates as windows
pCam->SetOrientation(20, 67, 19);
#endif
#if defined(WIN32)
VisBaseEntity_cl *pCamera = Vision::Game.SearchEntity("tankcamera");
Vision::Camera.AttachToEntity(pCamera, hkvVec3::ZeroVector());
#endif
/*#if defined(_VISION_ANDROID)
pMod = static_cast<vHavokPhysicsModule*>(vHavokPhysicsModule::GetInstance());
pMotionInput = (VMotionInputAndroid*)(&VInputManager::GetInputDevice(INPUT_DEVICE_MOTION_SENSOR));
pMotionInput->SetEnabled(true);
#endif*/
}
示例2: CreateEntityFromScript
/// Creates an entity from a Lua script definition.
VisBaseEntity_cl* RPG_GameManager::CreateEntityFromScript(const VString& scriptName, const hkvVec3& position, const hkvVec3& orientation)
{
VScriptResourceManager* scriptManager = static_cast<VScriptResourceManager*>(Vision::GetScriptManager());
VScriptResource* scriptRes = scriptManager->LoadScriptFile(scriptName);
IVScriptInstance* script = scriptRes->CreateScriptInstance();
VASSERT(script);
if(script)
{
// get the entity class type to create
char* className = NULL;
script->ExecuteFunctionArg("GetEntityClassType", "*>s", &className);
// create the entity
VisBaseEntity_cl* entity = Vision::Game.CreateEntity(className, position);
VASSERT(entity);
if(entity)
{
entity->SetOrientation(orientation);
// attach the script
scriptManager->SetScriptInstance(entity, script);
if(entity->IsOfType(V_RUNTIME_CLASS(RPG_BaseEntity)))
{
RPG_BaseEntity* rpgEntity = static_cast<RPG_BaseEntity*>(entity);
#if (RPG_SERIALIZATION_SCRIPT_PROPERTIES)
rpgEntity->InitializeProperties();
#endif
rpgEntity->PostInitialize();
}
return entity;
}
}
return NULL;
}