Ejemplo n.º 1
0
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
}
Ejemplo n.º 3
0
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 "";
}
Ejemplo n.º 7
0
EventStates
HTMLSharedObjectElement::IntrinsicState() const
{
  return nsGenericHTMLElement::IntrinsicState() | ObjectState();
}
Ejemplo n.º 8
0
EventStates
HTMLObjectElement::IntrinsicState() const
{
  return nsGenericHTMLFormElement::IntrinsicState() | ObjectState();
}
Ejemplo n.º 9
0
ObjectState PointHelpObject::Eval(TimeValue t)
	{
	return ObjectState(this);
	}
Ejemplo n.º 10
0
ObjectState TriPatchObject::Eval(TimeValue time){
	return ObjectState(this);
	}
Ejemplo n.º 11
0
ObjectState BendManip::Eval(int t) {

    return ObjectState(this);
}
Ejemplo n.º 12
0
ObjectState
NavInfoObject::Eval(TimeValue time)
{
    return ObjectState(this);
}
Ejemplo n.º 13
0
ObjectState
Cal3DObject::Eval(TimeValue time)
{
    return ObjectState(this);
}
Ejemplo n.º 14
0
ObjectState SimpleWSMObject::Eval(TimeValue time) 
	{
	return ObjectState(this);
	}
Ejemplo n.º 15
0
ObjectState
BackgroundObject::Eval(TimeValue time)
{
    return ObjectState(this);
}
Ejemplo n.º 16
0
ObjectState TargetObject::Eval(TimeValue time) {
	return ObjectState(this);
	}
	//TODO: Evaluate the object and return the ObjectState
	virtual ObjectState Eval(TimeValue /*t*/) { return ObjectState(this); };
Ejemplo n.º 18
0
		//TODO: Evaluate the object and return the ObjectState
		ObjectState Eval(TimeValue t) { return ObjectState(this); };		
Ejemplo n.º 19
0
ObjectState
TouchSensorObject::Eval(TimeValue time)
{
    return ObjectState(this);
}
Ejemplo n.º 20
0
ObjectState
FogObject::Eval(TimeValue time)
{
    return ObjectState(this);
}
Ejemplo n.º 21
0
ObjectState TriObject::Eval(TimeValue time) {
	return(ObjectState(this));
	}
Ejemplo n.º 22
0
ObjectState ProtHelpObject::Eval(TimeValue time)
{
   return ObjectState(this);
}
Ejemplo n.º 23
0
ObjectState
BillboardObject::Eval(TimeValue time)
{
    return ObjectState(this);
}