Package edu.cmu.cs.stage3.math

Examples of edu.cmu.cs.stage3.math.Quaternion


public abstract class ListNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final ListProperty list = new ListProperty( this, "list", null );
  //protected abstract double getValue( List list );
  protected abstract int getValue( List list );
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            return new Integer( getValue( listValue ) );
    } else {
      return null;
    }
View Full Code Here


public abstract class ListObjectQuestion extends edu.cmu.cs.stage3.alice.core.Question {
  public final ListProperty list = new ListProperty( this, "list", null );
  protected abstract Object getValue( List list );
    public Class getValueClass() {
     List listValue = list.getListValue();
    if( listValue!=null ) {
            return listValue.valueClass.getClassValue();
    } else {
            //todo?
      return Object.class;
View Full Code Here

            //todo?
      return Object.class;
    }
    }
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            return getValue( listValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class ListBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final ListProperty list = new ListProperty( this, "list", null );
  protected abstract boolean getValue( List list );
  public Object getValue() {
    List listValue = list.getListValue();
    if( listValue!=null ) {
            if( getValue( listValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

            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 {
View Full Code Here

  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 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 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

        // 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

TOP

Related Classes of edu.cmu.cs.stage3.math.Quaternion

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.