Package javax.media.j3d

Examples of javax.media.j3d.WakeupCriterion


  public void processStimulus(Enumeration criteria)
  {
    //Here we define what happens when a collision occurs.
    while (criteria.hasMoreElements())
    {
      WakeupCriterion theCriterion = (WakeupCriterion) criteria.nextElement();
      if (theCriterion instanceof WakeupOnCollisionEntry) //-> switch to the red sphere
      {
        collidingShape.setWhichChild(1);
      }
      else
View Full Code Here


  public void processStimulus(Enumeration criteria)
  {
    while (criteria.hasMoreElements())
    {
      WakeupCriterion theCriterion = (WakeupCriterion) criteria.nextElement();
      if (theCriterion instanceof WakeupOnCollisionEntry)
      {
        //Select the correct movement.
        if (toRight) whichAlpha = 0; else whichAlpha = 1;
View Full Code Here

        public void initialize() {
            this.wakeupOn(new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED));
        }

        public void processStimulus(Enumeration criteria) {
            WakeupCriterion wakeup;
            int eventId;
            AWTEvent[] event;

            while (criteria.hasMoreElements()) {
                wakeup = (WakeupCriterion) criteria.nextElement();
View Full Code Here

      // Process mouse move event
    }
  }
 
  public void processStimulus (Enumeration criteria) {
    WakeupCriterion wakeup;
    AWTEvent[] evt = null;
    int xpos = 0, ypos = 0;

    while(criteria.hasMoreElements()) {
      wakeup = (WakeupCriterion)criteria.nextElement();
View Full Code Here

/*     */   {
/* 115 */     AWTEvent[] evt = null;
/* 116 */     int xpos = 0; int ypos = 0;
/*     */
/* 118 */     while (criteria.hasMoreElements()) {
/* 119 */       WakeupCriterion wakeup = (WakeupCriterion)criteria.nextElement();
/* 120 */       if ((wakeup instanceof WakeupOnAWTEvent)) {
/* 121 */         evt = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
/*     */       }
/*     */     }
/* 124 */     if ((evt[0] instanceof MouseEvent)) {
View Full Code Here

/*     */   {
/* 140 */     AWTEvent[] evt = null;
/* 141 */     int xpos = 0; int ypos = 0;
/*     */
/* 143 */     while (criteria.hasMoreElements()) {
/* 144 */       WakeupCriterion wakeup = (WakeupCriterion)criteria.nextElement();
/* 145 */       if ((wakeup instanceof WakeupOnAWTEvent)) {
/* 146 */         evt = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
/*     */       }
/*     */     }
/* 149 */     if ((evt[0] instanceof MouseEvent)) {
View Full Code Here

/*     */   }
/*     */
/*     */   public void processStimulus(Enumeration criteria)
/*     */   {
/* 180 */     while (criteria.hasMoreElements()) {
/* 181 */       WakeupCriterion wakeup = (WakeupCriterion)criteria.nextElement();
/*     */
/* 183 */       if ((wakeup instanceof WakeupOnAWTEvent)) {
/* 184 */         AWTEvent[] events = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
/* 185 */         if (events.length > 0) {
/* 186 */           MouseEvent evt = (MouseEvent)events[(events.length - 1)];
View Full Code Here

/*     */   }
/*     */
/*     */   public void processStimulus(Enumeration criteria)
/*     */   {
/* 163 */     while (criteria.hasMoreElements()) {
/* 164 */       WakeupCriterion wakeup = (WakeupCriterion)criteria.nextElement();
/* 165 */       if ((wakeup instanceof WakeupOnAWTEvent)) {
/* 166 */         AWTEvent[] events = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
/* 167 */         if (events.length > 0) {
/* 168 */           MouseEvent evt = (MouseEvent)events[(events.length - 1)];
/* 169 */           doProcess(evt);
View Full Code Here

/*     */   }
/*     */
/*     */   public void processStimulus(Enumeration criteria)
/*     */   {
/* 194 */     while (criteria.hasMoreElements()) {
/* 195 */       WakeupCriterion wakeup = (WakeupCriterion)criteria.nextElement();
/* 196 */       if ((wakeup instanceof WakeupOnAWTEvent)) {
/* 197 */         AWTEvent[] events = ((WakeupOnAWTEvent)wakeup).getAWTEvent();
/* 198 */         if (events.length > 0) {
/* 199 */           MouseEvent evt = (MouseEvent)events[(events.length - 1)];
/* 200 */           doProcess(evt);
View Full Code Here

/*     */   public void processStimulus(Enumeration criteria)
/*     */   {
/*  91 */     boolean sawFrame = false;
/*     */
/*  93 */     while (criteria.hasMoreElements()) {
/*  94 */       WakeupCriterion genericEvt = (WakeupCriterion)criteria.nextElement();
/*  95 */       if ((genericEvt instanceof WakeupOnAWTEvent)) {
/*  96 */         WakeupOnAWTEvent ev = (WakeupOnAWTEvent)genericEvt;
/*  97 */         AWTEvent[] events = ev.getAWTEvent();
/*  98 */         processAWTEvent(events);
/*  99 */       } else if (((genericEvt instanceof WakeupOnElapsedFrames)) && (this.eventKey != null))
View Full Code Here

TOP

Related Classes of javax.media.j3d.WakeupCriterion

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.