Ogre3D Intermediate Tutorials / Промежуточные туториалы Ogre3D

→For example, if you are using the TerrainSceneManager, the origin of the Ray you fire must be over the Terrain or the intersection query will not register it as a hit.
0 Например, если вы используете TerrainSceneManager, начало луча должно быть над ландшафтом, иначе пересечение не будет зарегистрировано.
→Note that this can sometimes act in strange ways.
0 Обратите внимание, что иногда это может работать странным образом.
→This would print out the names of all MovableObjects that the ray intersects, and it would print the location of where it intersected the world geometry (if it did hit it).
0 Этот код выведет имена всех MovableObjects, которые пересечет луч, а также будут выведены местоположения этих пересечений на мировой геометрии (если они не будут удалены).
→(Assume that the fout object is of type ofstream, and that it has already been created using the open method.)
0 (Предполагается, что объект fout является типом ofstream, уже созданным с помощью метода open).
→The following code would do this.
0 Следующий код сделает это.
→Lets say we wanted to print out a list of results after a RaySceneQuery.
0 Допустим, мы хотим вывести список результатов после использования RaySceneQuery.
→Now lets look at an example.
0 Теперь давайте посмотрим на пример.
→Other types of world fragments are beyond the scope of this tutorial.
0 Другие типы мировых фрагментов выходят за рамки данного руководства.
→The singleIntersection variable is simply a Vector3 reporting the location of the intersection.
0 singleIntersection переменная является простым вектором Vector3, сообщающим о местоположении пересечения.
→Generally speaking, RaySceneQueries only return WFT_SINGLE_INTERSECTION WorldFragments.
0 В общем говоря, RaySceneQueries возвращает только WFT_SINGLE_INTERSECTION WorldFragments.
→Based on the fragmentType variable, one of the other variables will be set (singleIntersection, planes, geometry, or renderOp).
0 На основе переменной fragmentType устанавливаются другие переменные (singleIntersection, planes, geometry ил renderOp).
→The way this is implemented is WorldFragment struct contains the fragmentType variable which specifies the type of world fragment it contains.
0 Реализация WorldFragment структуры включает в себя fragmentType переменную, которая определяет тип мирового фрагмента.
→The type of world fragment that is returned is based on the SceneManager.
0 Тип мирового фрагмента, который возвращается, является базовым в SceneManager.
→The movable variable in a RaySceneQueryResultEntry will be equal to NULL if the result is not a MovableObject.
0 Переменная RaySceneQueryResultEntry будет равна NULL, если результат не является MovableObject (перемещаемый объект).
→To get the SceneNode (or Node) the object is attached to, call getParentSceneNode (or getParentNode).
0 Чтобы получить SceneNode (имя узла) или Node (узел), к которому присоединен объект, вызовите getParentSceneNode (получить родительский узел сцены) или getParentNode (получить родительский узел).
→To get the name of the MovableObject, call the getName method.
0 Чтобы получить имя MovableObject (Перемещаемый объект), вызовите метод getName (получить имя).
→Most normal applications of RaySceneQueries will involve selecting and manipulating either the MovableObject you have clicked on, or the SceneNodes they are attached to.
0 Обычно RaySceneQueries применяют для выбора и манипулирования либо MovableObject, по которому вы кликаете, либо SceneNode, к которому MovableObject присоединены.
→See the inheritance tree on this page to find out what type of objects would be returned.
0 Посмотрите на дерево наследования на этой странице, чтобы узнать, какой тип объектов будет возвращен.
→We also call the BaseApplication's keyPressed function within the return statement, that way we check everything programmed before, plus we get it's return value.
0 Также мы вызывает функцию BaseApplication keyPressed в операторе возврата, проверяя наш ранее написанный код, а также получая значения для возврата.
→You see, we check for the space bar and switch the mode we are in.
0 Как видите, мы проверили нажатие на пробел и переключили режим.
Резюме
Пол:
мужчина
Родной язык:
русский
С нами:
с 15 марта 2011 г. (5696 дней)
Не является членом клуба.
Деятельность:
50 версий перевода с общим рейтингом 0
Карма: 1 (оценок: 1)
Написать oYASo личное сообщение