ObjectState SimpleParticle::Eval(TimeValue time) { // RB 10/26/2000: I added this in August to fix the off-screen // particle update bug however I'm pulling it now. Before the // August fix, particles were kind of different from other objects in // that they updated when Display() or GetBoundBox() was called on them // but not when they were evaluated. This cuased them not to update // when off-screen. My fix here was to update them from Eval(). However // it appears that particles have become dependent on not updating // from within Eval() because this change has destabalized things. // // My new fix involves forcing GetLocalBoundBox() to be called in the // BaseNode::Update() method. This allows particles to update outside // of normal evaluation. /* INode *node = FindObjectsNode(this, this); if (node) { Update(time,node); } */ // Clear the force fields fields.Resize(0); cobjs.Resize(0); return ObjectState(this); }
void ManualObjectQueryProcessor::onObjectNodeSession(const SpaceID& space, const ObjectReference& oref, const OHDP::NodeID& id) { QPLOG(detailed, "New object-space node session: " << oref << " connected to " << space << "-" << id); OHDP::SpaceNodeID snid(space, id); SpaceObjectReference sporef(space, oref); ObjectStateMap::iterator obj_it = mObjectState.find(sporef); // First, clear out old state. This needs to happen before any changes are // made so it can clear out all the old state if (obj_it != mObjectState.end() && obj_it->second.node != OHDP::NodeID::null()) { OHDP::SpaceNodeID old_snid(obj_it->first.space(), obj_it->second.node); mServerQueryHandler.decrementServerQuery(old_snid); if (obj_it->second.registered) unregisterObjectQuery(sporef); } // Update state // Object no longer has a session, it's no longer relevant if (id == OHDP::NodeID::null()) { if (obj_it != mObjectState.end()) mObjectState.erase(obj_it); return; } // Otherwise it's new/migrating if (obj_it == mObjectState.end()) obj_it = mObjectState.insert( ObjectStateMap::value_type(sporef, ObjectState()) ).first; obj_it->second.node = id; // Figure out if we need to do anything for registration. At a minimum, // hold onto the server query handler. mServerQueryHandler.incrementServerQuery(snid); // *Don't* try to register. Instead, we need to wait until we're really // fully connected, i.e. until we get an SST stream callback }
ObjectState SimpleParticle::Eval(TimeValue time) { // Clear the force fields fields.Resize(0); cobjs.Resize(0); return ObjectState(this); }
HTCamshift::HTCamshift() { rgbFrameSize = Size(0,0); rgbFrameType = 0; depthFrameSize = Size(0,0); depthFrameType = 0; useDepth = false; nElements = 3; state = ObjectState(false); frameCount = 0; term = TermCriteria( CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1 ); }
HTCamshift::HTCamshift(bool _useDepth) { rgbFrameSize = Size(0,0); rgbFrameType = 0; depthFrameSize = Size(0,0); depthFrameType = 0; useDepth = _useDepth; if(useDepth == true) nElements = 4; else nElements = 3; state = ObjectState(false); frameCount = 0; term = TermCriteria( CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 1 ); }
String ManualObjectQueryProcessor::connectRequest(HostedObjectPtr ho, const SpaceObjectReference& sporef, const String& query) { if (!query.empty()) { ObjectStateMap::iterator obj_it = mObjectState.find(sporef); // Very likely brand new here if (obj_it == mObjectState.end()) obj_it = mObjectState.insert( ObjectStateMap::value_type(sporef, ObjectState()) ).first; obj_it->second.who = ho; obj_it->second.query = query; } // Return an empty query -- we don't want any query passed on to the // serve. We aggregate and register the OH query separately. return ""; }
EventStates HTMLSharedObjectElement::IntrinsicState() const { return nsGenericHTMLElement::IntrinsicState() | ObjectState(); }
EventStates HTMLObjectElement::IntrinsicState() const { return nsGenericHTMLFormElement::IntrinsicState() | ObjectState(); }
ObjectState PointHelpObject::Eval(TimeValue t) { return ObjectState(this); }
ObjectState TriPatchObject::Eval(TimeValue time){ return ObjectState(this); }
ObjectState BendManip::Eval(int t) { return ObjectState(this); }
ObjectState NavInfoObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState Cal3DObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState SimpleWSMObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState BackgroundObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState TargetObject::Eval(TimeValue time) { return ObjectState(this); }
//TODO: Evaluate the object and return the ObjectState virtual ObjectState Eval(TimeValue /*t*/) { return ObjectState(this); };
//TODO: Evaluate the object and return the ObjectState ObjectState Eval(TimeValue t) { return ObjectState(this); };
ObjectState TouchSensorObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState FogObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState TriObject::Eval(TimeValue time) { return(ObjectState(this)); }
ObjectState ProtHelpObject::Eval(TimeValue time) { return ObjectState(this); }
ObjectState BillboardObject::Eval(TimeValue time) { return ObjectState(this); }