Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > IT форум > Помощь студентам
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 06.04.2019, 14:26   #1
илья123456
Пользователь
 
Регистрация: 14.05.2014
Сообщений: 29
По умолчанию работа с анимацией в x3d

В общем есть код как простую в одну сторону анимацию сделать знаю, но как сделать последовательную анимацию, даже через Interpolator не понимаю, т.е. сначала выполнилось одно движение, далее после него другое и т.д.
Суть в чем у меня программа имитирует работу роботизированного технического комплекса(РТК), взял для обучения с литейного производства.
Код:
<X3D version="3.2">
 <Scene>
  <background skyColor="1 1 1"/>
  <Viewpoint position="0 0 0"/>
     		      <Transform DEF="тело0" translation="0 0 0" rotation="1 0 0 0">
                  <Inline url="тело0.x3d" render="true"/>
              </Transform>       

              <Transform DEF="тело1.1" translation="-5.5 0.5 1.4" rotation="1 0 0 0">
                  <Inline url="тело1.1.x3d" render="true"/>
              <Transform DEF="тело1.2" translation="0 0.55 0" rotation="0 0 1 0">
                  <Inline url="тело1.2.x3d" render="true"/>
              <Transform DEF="тело1.3" translation="-0.19 1.4 0" rotation="0 1 0 0">
                  <Inline url="тело1.3.x3d" render="true"/>
              <Transform DEF="тело1.4" translation="-0.21 1.5 0" rotation="0 1 0 0">
                  <Inline url="тело1.4.x3d" render="true"/>
              <Transform DEF="тело1.5" translation="-0.04 0.1 0"  rotation="0 1 0 1.5">
                  <Inline url="тело1.5.x3d" render="true"/>
                      <Transform DEF="тело1.5.121" translation="-0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело1.5.121.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело1.5.212" translation="0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело1.5.212.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело1.5.311"  translation="-0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело1.5.311.x3d" render="true"/>
                      </Transform>
                       <Transform DEF="тело1.5.422" translation="0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело1.5.422.x3d" render="true"/>
                      </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
        
              <Transform DEF="тело2.1" translation="2.5 0.5 1.4" rotation="1 0 0 0">
                   <Inline url="тело2.1.x3d" render="true"/>
              <Transform DEF="тело2.2" translation="0 0.55 0" rotation="0 0 1 0">
                   <Inline url="тело2.2.x3d" render="true"/>
              <Transform DEF="тело2.3" translation="-0.19 1.4 0" rotation="0 1 0 0">
                   <Inline url="тело2.3.x3d" render="true"/>
              <Transform DEF="тело2.4" translation="-0.21 1.5 0" rotation="0 1 0 0">
                   <Inline url="тело2.4.x3d" render="true"/>
              <Transform DEF="тело2.5" translation="-0.04 0.1 0"  rotation="0 1 0 1.5">
                   <Inline url="тело2.5.x3d" render="true"/>
                       <Transform DEF="тело2.5.121" translation="-0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело2.5.121.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело2.5.212" translation="0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело2.5.212.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело2.5.311"  translation="-0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело2.5.311.x3d" render="true"/>
                      </Transform>
                       <Transform DEF="тело2.5.422" translation="0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело2.5.422.x3d" render="true"/>
                      </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
                        
              <Transform DEF="тело3.1" translation="11 0.5 1.4" rotation="1 0 0 0">
                  <Inline url="тело3.1.x3d" render="true"/>
              <Transform DEF="тело3.2" translation="0 0.55 0" rotation="0 0 1 0">
                  <Inline url="тело3.2.x3d" render="true"/>
              <Transform DEF="тело3.3" translation="-0.19 1.4 0" rotation="0 1 0 0">
                  <Inline url="тело3.3.x3d" render="true"/>
              <Transform DEF="тело3.4" translation="-0.21 1.5 0" rotation="0 1 0 0">
                  <Inline url="тело3.4.x3d" render="true"/>
              <Transform DEF="тело3.5" translation="-0.04 0.1 0"  rotation="0 1 0 1.5">
                  <Inline url="тело3.5.x3d" render="true"/>
                       <Transform DEF="тело3.5.121" translation="-0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело3.5.121.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело3.5.212" translation="0.08 0.5 0.3"  rotation="0 1 0 0">
                         <Inline url="тело3.5.212.x3d" render="true"/>
                      </Transform>
                      <Transform DEF="тело3.5.311"  translation="-0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело3.5.311.x3d" render="true"/>
                      </Transform>
                       <Transform DEF="тело3.5.422" translation="0.08 0.5 -0.3"  rotation="0 1 0 0">
                         <Inline url="тело3.5.422.x3d" render="true"/>
                      </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
              </Transform>
                        
  <Transform DEF="пресс1" translation="-1.7 2.3 1.391" rotation="1 0 0 0">
          <Inline url="пресс1.x3d" render="true"/>
  </Transform>   

  <Transform DEF="пресс2"  translation="-1.7 0.33 1.388" rotation="1 0 0 -0.03">   <!-- 0 -2.18 -0.02-->
          <Inline url="пресс2.x3d" render="true"/>      
  </Transform>    
  


  <Transform DEF="деталь1" translation="-8 0.8 -1.5" >
          <Inline url="деталь1.x3d"/>

  </Transform> 

    <Transform DEF="деталь2"  translation="-1.7 0.6 1.4" rotation="1 0 0 0">
          <Inline url="деталь2.x3d" render="true"/>
  </Transform>    


     <PositionChaser DEF="q1" duration="8" initialValue="-7.979 0.64 -1.9" initialDestination="-7.97 0.64 1.68 " ></PositionChaser >
  <ROUTE fromNode="q1" fromField ="value_changed" toNode="деталь1" toField="set_translation"></ROUTE>


  <OrientationChaser DEF="q2" duration="5" initialValue="0 0 0 0" initialDestination="0 1 0 1.51 " ></OrientationChaser>
   <ROUTE fromNode="q2" fromField ="value_changed" toNode="тело1.1" toField="set_rotation"></ROUTE>

     <OrientationChaser DEF="q3" duration="5" initialValue="0 0 0 0" initialDestination="1 0 0 -0.9 " ></OrientationChaser>
   <ROUTE fromNode="q3" fromField ="value_changed" toNode="тело1.2" toField="set_rotation"></ROUTE>

  <OrientationChaser DEF="q4" duration="10" initialValue="0 0 0 0" initialDestination="1 0 0 -1.1 " ></OrientationChaser>
   <ROUTE fromNode="q4" fromField ="value_changed" toNode="тело1.3" toField="set_rotation"></ROUTE>


     <OrientationChaser DEF="q5" duration="10" initialValue="0 0 0 0" initialDestination="1 0 0 -1.15 " ></OrientationChaser>
   <ROUTE fromNode="q5" fromField ="value_changed" toNode="тело1.4" toField="set_rotation"></ROUTE>
            
  
 </Scene>
</X3D>
илья123456 вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Задача с анимацией Heng Помощь студентам 4 28.09.2013 22:23
проблема с анимацией Terrance! Помощь студентам 0 26.05.2010 13:51
Проблема с анимацией Манжосов Денис :) Gamedev - cоздание игр: Unity, OpenGL, DirectX 30 17.11.2009 20:57
Работа с анимацией в ACCESS kuk132 Microsoft Office Access 1 17.07.2008 14:07
Задача с анимацией KpeHDeJIb Помощь студентам 1 04.07.2008 20:23