本文整理汇总了C++中plKey::GetUoid方法的典型用法代码示例。如果您正苦于以下问题:C++ plKey::GetUoid方法的具体用法?C++ plKey::GetUoid怎么用?C++ plKey::GetUoid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plKey
的用法示例。
在下文中一共展示了plKey::GetUoid方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsInteresting
virtual bool IsInteresting( const plKey &objectKey )
{
if( objectKey->GetUoid().GetClassType() == plPythonFileMod::Index() )
return true;
if( objectKey->GetUoid().GetClassType() == plSceneObject::Index() &&
objectKey->GetUoid().GetObjectName().Compare( plSDL::kAgeSDLObjectName ) == 0 )
return true;
return false;
}
示例2: EatKey
virtual bool EatKey( const plKey& key )
{
if( key->GetUoid().IsValid() && key->GetUoid().GetClassType() == fClassType &&
key->GetUoid().GetObjectName().Find( fObjName ) >= 0 )
{
fFoundKeys.push_back( key );
}
return true;
}
示例3: EatKey
virtual bool EatKey( const plKey& key )
{
if( fCurrType != key->GetUoid().GetClassType() )
{
fCurrType = key->GetUoid().GetClassType();
const char *className = plFactory::GetNameOfClass( fCurrType );
fCurrTypeItem = AddLeaf( fTree, fCurrItem, className != nil ? className : "<unknown>", nil );
}
if( !fFilter )
AddLeaf( fTree, fCurrTypeItem, key->GetUoid().GetObjectName().c_str(), new plKeyInfo( key, fCurrPage ) );
return true;
}
示例4: SelectNetGroup
//
// Determine the net group for a given object (based on paging unit)
//
plNetGroupId plNetClientMgr::SelectNetGroup(plSynchedObject* objIn, plKey roomKey)
{
if( objIn->GetSynchFlags() & plSynchedObject::kHasConstantNetGroup )
return objIn->GetNetGroup();
return plNetGroupId(roomKey->GetUoid().GetLocation(), 0);
}
示例5: IsInteresting
virtual bool IsInteresting( const plKey &objectKey )
{
if( objectKey->GetUoid().GetClassType() == plCubicEnvironmap::Index() ||
objectKey->GetUoid().GetClassType() == plMipmap::Index() )
{
return true;
}
return false;
}
示例6: EatKey
virtual bool EatKey(const plKey& key)
{
if (key->GetUoid().GetClassType() == plSceneNode::Index())
{
plSceneNode* sn = plSceneNode::ConvertNoRef(key->ObjectIsLoaded());
if (sn != nil)
sn->OptimizeDrawables();
}
return true; // Always continue
}
示例7: KeyedObjectProc
void plPageOptimizer::KeyedObjectProc(plKey key)
{
plString keyName = key->GetName();
const char* className = plFactory::GetNameOfClass(key->GetUoid().GetClassType());
// For now, ignore any key that isn't in the location we're looking at. That means stuff like textures.
if (fInstance->fLoc != key->GetUoid().GetLocation())
return;
KeySet& loadedKeys = fInstance->fLoadedKeys;
KeyVec& loadOrder = fInstance->fKeyLoadOrder;
KeySet::iterator it = loadedKeys.lower_bound(key);
if (it != loadedKeys.end() && *it == key)
{
printf("Keyed object %s(%s) loaded more than once\n", keyName.c_str(), className);
}
else
{
loadedKeys.insert(it, key);
loadOrder.push_back(key);
}
}
示例8: ISendNetMsg
//
// write to net msg and send to server
//
void plSDLModifier::ISendNetMsg(plStateDataRecord*& state, plKey senderKey, uint32_t sendFlags)
{
hsAssert(senderKey, "nil senderKey?");
plSynchedObject* sobj = plSynchedObject::ConvertNoRef(senderKey->ObjectIsLoaded());
if (sobj && (sobj->IsInSDLVolatileList(GetSDLName())))
state->SetFlags(state->GetFlags() | plStateDataRecord::kVolatile);
bool dirtyOnly = (sendFlags & plSynchedObject::kForceFullSend) == 0;
bool broadcast = (sendFlags & plSynchedObject::kBCastToClients) != 0;
int writeOptions=0;
// if (dirtyOnly)
writeOptions |= plSDL::kDirtyOnly;
if (broadcast)
writeOptions |= plSDL::kBroadcast;
writeOptions |= plSDL::kTimeStampOnRead;
// send to server
plNetMsgSDLState* msg = state->PrepNetMsg(0, writeOptions);
msg->SetNetProtocol(kNetProtocolCli2Game);
msg->ObjectInfo()->SetUoid(senderKey->GetUoid());
if (sendFlags & plSynchedObject::kNewState)
msg->SetBit(plNetMessage::kNewSDLState);
if (sendFlags & plSynchedObject::kUseRelevanceRegions)
msg->SetBit(plNetMessage::kUseRelevanceRegions);
if (sendFlags & plSynchedObject::kDontPersistOnServer)
msg->SetPersistOnServer(false);
if (sendFlags & plSynchedObject::kIsAvatarState)
msg->SetIsAvatarState(true);
if (broadcast && plNetClientApp::GetInstance())
{
msg->SetPlayerID(plNetClientApp::GetInstance()->GetPlayerID());
}
plNetClientApp::GetInstance()->SendMsg(msg);
msg->UnRef();
fSentOrRecvdState = true;
}
示例9: ISaveOrLoad
//
// save or load a key. return the key.
//
const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, bool32 save, hsStream* stream, hsResMgr* mgr)
{
if (save)
{
if (key)
{
stream->WriteByte(1);
// I need to write a key to MY stream...
#if 0 // DEBUG
plStringBuffer<char> buf = key->GetName()->ToIso8859_1();
stream->WriteLE32(buf.GetSize());
stream->Write(buf.GetSize(), buf.GetData());
#endif
key->GetUoid().Write(stream);
}
else
{
stream->WriteByte(0);
}
return key;
}
else
{
int32_t has=stream->ReadByte();
if (has)
{
// read a key from MY stream
#if 0 // DEBUG
int32_t len = stream->ReadLE32();
char tmp[256];
hsAssert(len<256, "key name overflow");
stream->Read(len, tmp);
#endif
plUoid uoid;
uoid.Read(stream);
return mgr->FindKey(uoid);
}
else
return (nil);
}
return nil;
}
示例10: Capture
// plCaptureRender::Capture
bool plCaptureRender::Capture(const plKey& ack, uint16_t width, uint16_t height)
{
// Create our render target
const uint16_t flags = plRenderTarget::kIsOffscreen;
const uint8_t bitDepth(32);
const uint8_t zDepth(-1);
const uint8_t stencilDepth(-1);
plRenderTarget* rt = new plRenderTarget(flags, width, height, bitDepth, zDepth, stencilDepth);
static int idx=0;
ST::string buff = ST::format("tRT{}", idx++);
hsgResMgr::ResMgr()->NewKey(buff, rt, ack->GetUoid().GetLocation());
// Create a render request and render request message
plCaptureRenderRequest* req = new plCaptureRenderRequest;
const float pri(-100.f);
req->SetPriority(pri);
req->SetRenderTarget(rt);
const uint32_t renderState
= plPipeline::kRenderNormal
| plPipeline::kRenderClearColor
| plPipeline::kRenderClearDepth;
req->SetRenderState(renderState);
// Set the Ack to be our requestor
req->RequestAck(ack);
// Submit
plRenderRequestMsg* msg = new plRenderRequestMsg(ack, req);
hsRefCnt_SafeUnRef(req);
msg->Send();
return true;
}
示例11: AddRoom
void plNetMsgRoomsList::AddRoom(plKey rmKey)
{
fRooms.push_back(rmKey->GetUoid().GetLocation());
fRoomNames.push_back(rmKey->GetName());
}