Package edu.cmu.cs.stage3.util

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


    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

public abstract class SetNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final SetProperty set = new SetProperty( this, "set", null );
  //protected abstract double getValue( Set set );
  protected abstract int getValue( Set set );
  public Object getValue() {
    Set setValue = set.getSetValue();
    if( setValue!=null ) {
            return new Integer( getValue( setValue ) );
    } else {
      return null;
    }
View Full Code Here

public abstract class SetBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final SetProperty set = new SetProperty( this, "set", null );
  protected abstract boolean getValue( Set set );
  public Object getValue() {
    Set setValue = set.getSetValue();
    if( setValue!=null ) {
            if( getValue( setValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

public abstract class StackNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final StackProperty stack = new StackProperty( this, "stack", null );
  //protected abstract double getValue( Stack stack );
  protected abstract int getValue( Stack stack );
  public Object getValue() {
    Stack stackValue = stack.getStackValue();
    if( stackValue!=null ) {
            return new Integer( getValue( stackValue ) );
    } else {
      return null;
    }
View Full Code Here

  protected abstract Object getValue( Stack stack );
    public Class getValueClass() {
        return stack.getStackValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Stack stackValue = stack.getStackValue();
    if( stackValue!=null ) {
            return getValue( stackValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class StackBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final StackProperty stack = new StackProperty( this, "stack", null );
  protected abstract boolean getValue( Stack stack );
  public Object getValue() {
    Stack stackValue = stack.getStackValue();
    if( stackValue!=null ) {
            if( getValue( stackValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

        // look

        subject.getTransformableValue().turnRightNow(Direction.FORWARD,turning.x*dt);


        Transformable t = new Transformable();
        t.setPositionRightNow(subject.getTransformableValue().getPosition());
        t.setOrientationRightNow(subject.getTransformableValue().vehicle.getReferenceFrameValue().getOrientationAsQuaternion());

        subject.getTransformableValue().turnRightNow(Direction.RIGHT,turning.y*dt,t);

        // move

View Full Code Here

    long dt = mouseEvent.getWhen() - m_pressedEvent.getWhen();
    if( dt < m_clickTimeThreshold ) {
      if( dx*dx + dy*dy < m_clickDistanceThresholdSquared ) {
        if( isEnabled.booleanValue() ) {
          if( checkModifierMask( mouseEvent ) ) {
            Transformable onWhatValue = onWhat.getTransformableValue();
            boolean success;
            if( onWhatValue!=null ) {
              edu.cmu.cs.stage3.alice.scenegraph.renderer.PickInfo pickInfo = RenderTarget.pick( mouseEvent );
              if( pickInfo.getCount()>0 ) {
                Model model = (Model)( pickInfo.getVisualAt( 0 ).getBonus() );
                success = onWhatValue == model || onWhatValue.isAncestorOf( model );
              } else {
                success = false;
              }
            } else {
              success = true;
View Full Code Here

TOP

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

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.