本文整理汇总了C++中SpaceObjectReference::object方法的典型用法代码示例。如果您正苦于以下问题:C++ SpaceObjectReference::object方法的具体用法?C++ SpaceObjectReference::object怎么用?C++ SpaceObjectReference::object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpaceObjectReference
的用法示例。
在下文中一共展示了SpaceObjectReference::object方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addOrphanUpdate
void OrphanLocUpdateManager::addOrphanUpdate(const SpaceObjectReference& observed, const Sirikata::Protocol::Loc::LocationUpdate& update) {
assert( ObjectReference(update.object()) == observed.object() );
UpdateInfoList& info_list = mUpdates[observed];
info_list.push_back(
UpdateInfoPtr(new UpdateInfo(observed, new Sirikata::Protocol::Loc::LocationUpdate(update), mContext->simTime() + mTimeout))
);
}
示例2: getProxyObject
ProxyObjectPtr ProxyManager::getProxyObject(const SpaceObjectReference &id) const {
PROXYMAN_SERIALIZED();
assert(id.space() == mID.space());
ProxyMap::const_iterator iter = mProxyMap.find(id.object());
if (iter != mProxyMap.end())
return (*iter).second.ptr;
return ProxyObjectPtr();
}
示例3: wrappedStreamCreatedCallback
void ObjectHost::wrappedStreamCreatedCallback(HostedObjectWPtr ho_weak, const SpaceObjectReference& sporef, SessionManager::ConnectionEvent after, StreamCreatedCallback cb) {
if (mQueryProcessor != NULL) {
HostedObjectPtr ho(ho_weak);
if (ho) {
SSTStreamPtr strm = getSpaceStream(sporef.space(), sporef.object());
// This had better be OK here since we're just getting the callback
assert(strm);
mQueryProcessor->presenceConnectedStream(ho, sporef, strm);
}
}
cb(sporef, after);
}
示例4: populateSpaceObjRef
void PerPresenceData::populateSpaceObjRef(const SpaceObjectReference& sporef)
{
validSpaceObjRef = true;
space = sporef.space();
object = sporef.object();
}
示例5: space
bool operator<(const SpaceObjectReference& rhs) const {
if (space()==rhs.space()) return object()<rhs.object();
return space()<rhs.space();
}
示例6: handleObjectConnected
void ObjectHost::handleObjectConnected(const SpaceObjectReference& sporef_objid, ServerID server) {
ObjectNodeSessionProvider::notify(&ObjectNodeSessionListener::onObjectNodeSession, sporef_objid.space(), sporef_objid.object(), OHDP::NodeID(server));
}
示例7: createObject
ProxyObjectPtr ProxyManager::createObject(
const SpaceObjectReference& id,
const TimedMotionVector3f& tmv, const TimedMotionQuaternion& tmq, const AggregateBoundingInfo& bs,
const Transfer::URI& meshuri, const String& phy, bool isAggregate, uint64 seqNo
)
{
PROXYMAN_SERIALIZED();
ProxyObjectPtr newObj;
// Try to reuse an existing object, even if we only have a valid
// weak pointer to it.
assert(id.space() == mID.space());
ProxyMap::iterator iter = mProxyMap.find(id.object());
if (iter != mProxyMap.end()) {
// From strong ref
newObj = iter->second.ptr;
if (!newObj) {
// From weak ref
newObj = iter->second.wptr.lock();
// And either update the strong ref or clear out the entry
// if its not even valid anymore.
if (newObj)
iter->second.ptr = newObj;
else
mProxyMap.erase(iter);
}
}
// If we couldn't get a valid existing copy, create and insert a
// new one.
if (!newObj) {
newObj = ProxyObject::construct(getSharedPtr(), id);
std::pair<ProxyMap::iterator, bool> result = mProxyMap.insert(
ProxyMap::value_type(
newObj->getObjectReference().object(),
ProxyData(newObj)
)
);
iter = result.first;
}
assert(newObj);
assert(newObj->getObjectReference() == id);
assert(newObj->getOwner().get() == this);
// This makes things simpler elsewhere: For new objects, we ensure
// all the values are set properly so that when the notification
// happens below, the proxy passed to listeners (for
// onCreateProxy) will be completely setup, making it valid for
// use. We don't need this for old ProxyObjects since they were
// already initialized. The seqNo of 0 only updates something if it wasn't
// set yet.
newObj->setLocation(tmv, 0);
newObj->setOrientation(tmq, 0);
newObj->setBounds(bs, 0);
if(meshuri)
newObj->setMesh(meshuri, 0);
if(phy.size() > 0)
newObj->setPhysics(phy, 0);
newObj->setIsAggregate(isAggregate, 0);
// Notification of the proxy will have already occured, but
// updates via, e.g., PositionListener or MeshListener, will go
// out here, so the potentially invalid initial data automatically
// filled when the object was created by createObject() shouldn't
// matter.
newObj->setLocation(tmv, seqNo);
newObj->setOrientation(tmq, seqNo);
newObj->setBounds(bs, seqNo);
if(meshuri)
newObj->setMesh(meshuri, seqNo);
if(phy.size() > 0)
newObj->setPhysics(phy, seqNo);
newObj->setIsAggregate(isAggregate, seqNo);
// Notification has to happen either way
notify(&ProxyCreationListener::onCreateProxy, newObj);
return newObj;
}
示例8: handleObjectMigrated
void ObjectHost::handleObjectMigrated(const SpaceObjectReference& sporef_objid, ServerID from, ServerID to) {
ObjectNodeSessionProvider::notify(&ObjectNodeSessionListener::onObjectNodeSession, sporef_objid.space(), sporef_objid.object(), OHDP::NodeID(to));
}
示例9: handleObjectDisconnected
void ObjectHost::handleObjectDisconnected(const SpaceObjectReference& sporef_objid, Disconnect::Code) {
ObjectNodeSessionProvider::notify(&ObjectNodeSessionListener::onObjectNodeSession, sporef_objid.space(), sporef_objid.object(), OHDP::NodeID::null());
}
示例10: mSpace
Endpoint::Endpoint(const SpaceObjectReference& space_obj, const PortID& port)
: mSpace(space_obj.space()),
mObject(space_obj.object()),
mPort(port)
{
}