Package edu.cmu.cs.stage3.math

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


    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


    keyChar.valueClass.set( Character.class );
    details.add( keyChar );
  }
  private void updateDetails( java.awt.event.KeyEvent keyEvent ) {
    for( int i=0; i<details.size(); i++ ) {
      Variable detail = (Variable)details.get( i );
      if( detail.name.getStringValue().equals( "keyChar" ) ) {
        detail.value.set( new Character( keyEvent.getKeyChar() ) );
      }
    }
  }
View Full Code Here

    }
  }
  public void manufactureDetails() {
    super.manufactureDetails();

    Variable x = new Variable();
    x.name.set( "x" );
    x.setParent( this );
    x.valueClass.set( Number.class );
    details.add( x );

    Variable y = new Variable();
    y.name.set( "y" );
    y.setParent( this );
    y.valueClass.set( Number.class );
    details.add( y );

    manufactureAnyNecessaryDetails();
  }
View Full Code Here

    }
    }

  private void onItemChanging( Object item, int changeType, int oldIndex, int newIndex ) {
    if( !m_objectArrayPropertyListeners.isEmpty() ) {
      ObjectArrayPropertyEvent objectArrayPropertyEvent = new ObjectArrayPropertyEvent( this, item, changeType, oldIndex, newIndex );
      ObjectArrayPropertyListener[] objectArrayPropertyListeners = getObjectArrayPropertyListeners();
            for( int i=0; i<objectArrayPropertyListeners.length; i++ ) {
                objectArrayPropertyListeners[ i ].objectArrayPropertyChanging( objectArrayPropertyEvent );
            }
            /*
 
View Full Code Here

            */
    }
  }
  private void onItemChanged( Object item, int changeType, int oldIndex, int newIndex ) {
    if( !m_objectArrayPropertyListeners.isEmpty() ) {
      ObjectArrayPropertyEvent objectArrayPropertyEvent = new ObjectArrayPropertyEvent( this, item, changeType, oldIndex, newIndex );
      ObjectArrayPropertyListener[] objectArrayPropertyListeners = getObjectArrayPropertyListeners();
            for( int i=0; i<objectArrayPropertyListeners.length; i++ ) {
                objectArrayPropertyListeners[ i ].objectArrayPropertyChanged( objectArrayPropertyEvent );
            }
            /*
 
View Full Code Here

                    if (cameras.length>0)
                        subject.set(cameras[0]);
                }
            }
            if (keyMap.get()==null)
                keyMap.set(new KeyMapping());
            ((KeyMapping)keyMap.get()).cleanState();


            enable();
View Full Code Here

            disable();
    }
  }

  public void internalSchedule( double time, double dt ) {
    KeyMapping keyMapping = (KeyMapping)keyMap.getElementValue();
    int actions;
    if( keyMapping != null ) {
      actions = keyMapping.getActions();
    } else {
      actions = 0;
    }
        // accelerate if keys are pressed
        // decelerate otherwise
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

                        } else if( criterionType.isAssignableFrom( edu.cmu.cs.stage3.alice.core.criterion.ExternalReferenceKeyedCriterion.class ) ) {
                            criterion = new edu.cmu.cs.stage3.alice.core.criterion.ExternalReferenceKeyedCriterion( text );
                        } else {
                            criterion = (edu.cmu.cs.stage3.util.Criterion)getValueOf( criterionType, text );
                        }
                        referencesToBeResolved.addElement( new ObjectArrayPropertyReference( this, criterion, i, precedingReferenceTotal++ ) );
                    } catch( ClassNotFoundException cnfe ) {
                        throw new RuntimeException( criterionTypeName );
                    }
                } else {
                    String itemTypeName = itemNode.getAttribute( "class" );
View Full Code Here

    public void buildPoses(Model rootMod, Pose startPose, Pose endPose) {
        Key positionKey;
        Key quaternionKey;
        Vector3 position;
        Quaternion orientation;


        if (realMod!=null) {
            position=realMod.getPosition();
            if (dof.contains(ASFBone.DOF_TX) || dof.contains(ASFBone.DOF_TY) || dof.contains(ASFBone.DOF_TZ)) {
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.