Package edu.cmu.cs.stage3.util

Examples of edu.cmu.cs.stage3.util.Criterion


  public long m_clickTimeThreshold = 300;
  public int m_clickDistanceThresholdSquared = 100;

  public void manufactureAnyNecessaryDetails() {
    if( details.size()==2 ) {
      Question what = new PickQuestion();
      what.name.set( "what" );
      what.setParent( this );
      details.add( what );
    }
    for( int i=0; i<details.size(); i++ ) {
      Object o = details.get( i );
      if( o instanceof PickQuestion ) {
View Full Code Here


public abstract class QueueBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  protected abstract boolean getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            if( getValue( queueValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

  protected abstract Object getValue( Queue queue );
    public Class getValueClass() {
        return queue.getQueueValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return getValue( queueValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class QueueNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  //protected abstract double getValue( Queue queue );
  protected abstract int getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return new Integer( getValue( queueValue ) );
    } else {
      return null;
    }
View Full Code Here

  public Class getValueClass() {
    return Number.class;
  }
  protected abstract SpatialRelation getSpatialRelation();
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return new Double( subjectValue.getSpatialRelationDistance( getSpatialRelation(), objectValue, asSeenByValue ) );
  }
View Full Code Here

public abstract class SubjectAsSeenByQuestion extends SubjectQuestion {
  public final ReferenceFrameProperty asSeenBy = new ReferenceFrameProperty( this, "asSeenBy", null );
  protected abstract Object getValue( Transformable subjectValue, ReferenceFrame asSeenByValue );
  protected Object getValue( Transformable subjectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return getValue( subjectValue, asSeenByValue );
  }
View Full Code Here

  protected abstract SpatialRelation getSpatialRelation();
  public Class getValueClass() {
    return Boolean.class;
  }
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    if( subjectValue.isInSpatialRelationTo( getSpatialRelation(), objectValue, asSeenByValue ) ) {
      return Boolean.TRUE;
    } else {
      return Boolean.FALSE;
    }
View Full Code Here

    if( m_runtimeResponses.size() > 0 ) {
      if( multipleRuntimeResponsePolicy.getValue()==MultipleRuntimeResponsePolicy.IGNORE_MULTIPLE ) {
        return;
      }
    }
    Response response = triggerResponse.getResponseValue();
    if( response != null ) {
      Response.RuntimeResponse runtimeResponse = response.manufactureRuntimeResponse();
      m_runtimeResponses.addElement( runtimeResponse );
            m_runtimeResponseArray = null;
    }
  }
View Full Code Here

  }
  protected void internalSchedule( double t, double dt ) {
  }
  public void scheduled( edu.cmu.cs.stage3.alice.core.event.ScheduleEvent scheduleEvent ) {
    double t = scheduleEvent.getTime();
    Response responseValue = response.getResponseValue();
    if( responseValue != null && responseValue.isCommentedOut.booleanValue() ) {
      responseValue = null;
    }
    if( responseValue != null ) {
      if( m_runtimeResponse==null ) {
        m_runtimeResponse = responseValue.manufactureRuntimeResponse();
        m_runtimeResponse.prologue( t );
      }
      m_runtimeResponse.update( t );
      double timeRemaining = m_runtimeResponse.getTimeRemaining( t );
      if( timeRemaining<=0 ) {
View Full Code Here

    public Object getValue() {
        UserDefinedQuestion userDefinedQuestionValue = userDefinedQuestion.getUserDefinedQuestionValue();
        Behavior currentBehavior = null;
        World world = getWorld();
        if( world != null ) {
            Sandbox sandbox = world.getCurrentSandbox();
            if( sandbox!=null ) {
                currentBehavior = sandbox.getCurrentBehavior();
            } else {
                //System.err.println( "current sandbox is null" );
            }
        } else {
            //System.err.println( "world is null" );
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.util.Criterion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.