本文整理汇总了C++中LLMessageSystem::getU8方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::getU8方法的具体用法?C++ LLMessageSystem::getU8怎么用?C++ LLMessageSystem::getU8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::getU8方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unpackRegionHandshake
void LLViewerRegion::unpackRegionHandshake()
{
LLMessageSystem *msg = gMessageSystem;
U32 region_flags;
U8 sim_access;
std::string sim_name;
LLUUID sim_owner;
BOOL is_estate_manager;
F32 water_height;
F32 billable_factor;
LLUUID cache_id;
msg->getU32 ("RegionInfo", "RegionFlags", region_flags);
msg->getU8 ("RegionInfo", "SimAccess", sim_access);
msg->getString ("RegionInfo", "SimName", sim_name);
msg->getUUID ("RegionInfo", "SimOwner", sim_owner);
msg->getBOOL ("RegionInfo", "IsEstateManager", is_estate_manager);
msg->getF32 ("RegionInfo", "WaterHeight", water_height);
msg->getF32 ("RegionInfo", "BillableFactor", billable_factor);
msg->getUUID ("RegionInfo", "CacheID", cache_id );
#if 0
setRegionFlags(region_flags);
setSimAccess(sim_access);
setOwner(sim_owner);
setIsEstateManager(is_estate_manager);
setWaterHeight(water_height);
setBillableFactor(billable_factor);
setCacheID(cache_id);
#endif
setRegionNameAndZone(sim_name);
LLUUID region_id;
msg->getUUID("RegionInfo2", "RegionID", region_id);
// setRegionID(region_id);
#if 0
LLVLComposition *compp = getComposition();
if (compp)
{
LLUUID tmp_id;
msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);
compp->setDetailTextureID(0, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id);
compp->setDetailTextureID(1, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id);
compp->setDetailTextureID(2, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);
compp->setDetailTextureID(3, tmp_id);
F32 tmp_f32;
msg->getF32("RegionInfo", "TerrainStartHeight00", tmp_f32);
compp->setStartHeight(0, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight01", tmp_f32);
compp->setStartHeight(1, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight10", tmp_f32);
compp->setStartHeight(2, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight11", tmp_f32);
compp->setStartHeight(3, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange00", tmp_f32);
compp->setHeightRange(0, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange01", tmp_f32);
compp->setHeightRange(1, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange10", tmp_f32);
compp->setHeightRange(2, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange11", tmp_f32);
compp->setHeightRange(3, tmp_f32);
// If this is an UPDATE (params already ready, we need to regenerate
// all of our terrain stuff, by
if (compp->getParamsReady())
{
//getLand().dirtyAllPatches();
}
else
{
compp->setParamsReady();
}
}
#endif
// Now that we have the name, we can load the cache file
// off disk.
//loadCache();
// After loading cache, signal that simulator can start
// sending data.
// TODO: Send all upstream viewer->sim handshake info here.
LLHost host = msg->getSender();
msg->newMessageFast( _PREHASH_RegionHandshakeReply );
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, LLC::ManagerImpl::GetInstance()->GetAgentId());
msg->addUUIDFast(_PREHASH_SessionID, LLC::ManagerImpl::GetInstance()->GetSessionId());
msg->nextBlockFast(_PREHASH_RegionInfo);
msg->addU32Fast(_PREHASH_Flags, 0x0 );
msg->sendReliable(host);
//.........这里部分代码省略.........
示例2: unpackRegionHandshake
void LLViewerRegion::unpackRegionHandshake()
{
LLMessageSystem *msg = gMessageSystem;
U32 region_flags;
U8 sim_access;
std::string sim_name;
LLUUID sim_owner;
BOOL is_estate_manager;
F32 water_height;
F32 billable_factor;
LLUUID cache_id;
msg->getU32 ("RegionInfo", "RegionFlags", region_flags);
msg->getU8 ("RegionInfo", "SimAccess", sim_access);
msg->getString ("RegionInfo", "SimName", sim_name);
msg->getUUID ("RegionInfo", "SimOwner", sim_owner);
msg->getBOOL ("RegionInfo", "IsEstateManager", is_estate_manager);
msg->getF32 ("RegionInfo", "WaterHeight", water_height);
msg->getF32 ("RegionInfo", "BillableFactor", billable_factor);
msg->getUUID ("RegionInfo", "CacheID", cache_id );
setRegionFlags(region_flags);
setSimAccess(sim_access);
setRegionNameAndZone(sim_name);
setOwner(sim_owner);
setIsEstateManager(is_estate_manager);
setWaterHeight(water_height);
setBillableFactor(billable_factor);
setCacheID(cache_id);
LLUUID region_id;
msg->getUUID("RegionInfo2", "RegionID", region_id);
setRegionID(region_id);
// Retrieve the CR-53 (Homestead/Land SKU) information
S32 classID = 0;
S32 cpuRatio = 0;
std::string coloName;
std::string productSKU;
std::string productName;
// the only reasonable way to decide if we actually have any data is to
// check to see if any of these fields have positive sizes
if (msg->getSize("RegionInfo3", "ColoName") > 0 ||
msg->getSize("RegionInfo3", "ProductSKU") > 0 ||
msg->getSize("RegionInfo3", "ProductName") > 0)
{
msg->getS32 ("RegionInfo3", "CPUClassID", classID);
msg->getS32 ("RegionInfo3", "CPURatio", cpuRatio);
msg->getString ("RegionInfo3", "ColoName", coloName);
msg->getString ("RegionInfo3", "ProductSKU", productSKU);
msg->getString ("RegionInfo3", "ProductName", productName);
mClassID = classID;
mCPURatio = cpuRatio;
mColoName = coloName;
mProductSKU = productSKU;
mProductName = productName;
}
LLVLComposition *compp = getComposition();
if (compp)
{
LLUUID tmp_id;
msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id);
compp->setDetailTextureID(0, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id);
compp->setDetailTextureID(1, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id);
compp->setDetailTextureID(2, tmp_id);
msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id);
compp->setDetailTextureID(3, tmp_id);
F32 tmp_f32;
msg->getF32("RegionInfo", "TerrainStartHeight00", tmp_f32);
compp->setStartHeight(0, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight01", tmp_f32);
compp->setStartHeight(1, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight10", tmp_f32);
compp->setStartHeight(2, tmp_f32);
msg->getF32("RegionInfo", "TerrainStartHeight11", tmp_f32);
compp->setStartHeight(3, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange00", tmp_f32);
compp->setHeightRange(0, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange01", tmp_f32);
compp->setHeightRange(1, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange10", tmp_f32);
compp->setHeightRange(2, tmp_f32);
msg->getF32("RegionInfo", "TerrainHeightRange11", tmp_f32);
compp->setHeightRange(3, tmp_f32);
// If this is an UPDATE (params already ready, we need to regenerate
// all of our terrain stuff, by
if (compp->getParamsReady())
{
getLand().dirtyAllPatches();
}
//.........这里部分代码省略.........