ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:392.14KB ,
资源ID:8536371      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/8536371.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(新版Vega+Prime全面教程240汇总doc.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

新版Vega+Prime全面教程240汇总doc.docx

1、新版Vega+Prime全面教程240汇总doc运动模型 运动模型就是一种位置策略,使我们用标准输入能实现模型的动态定位。Vega Prime用vpMotion定义抽象的运动模型。运动模型可以应用在observer上,也可以应用在object上。所有具体的运动模型,比如drive、fly、UFO等等,都是从vpMotion这个抽象基类派生的。对于vpMotion可以指定任意的输入设备来控制运动,如vpInputKeyboard(键盘),vpInputMouse(鼠标)或者vpInputComposite(由几个设备合成的输入设备)。如果没有自定义输入设备,各个运动模型将启用自己的默认输入设备,

2、默认设备在各运动模型中自行定义。运动模型将所需要的输入分为三种类型:SourceBoolean、SourceFloat和SourceInteger,每种类型控制一种运动方式,比如在drive模型中,SourceBoolean控制加速减速,SourceFloat控制左转右转。每个运动模型会自动调用compute()方法,将输入设备的第一个SourceBoolean键值对应于所需要的第一个SourceBoolean,第一个SourceFloat键值对应于所需要的第一个SourceFloat,以此类推,这样就能用定义的输入设备控制运动模型了。 Vega Prime中定义了七种运动模型,分别是:vpM

3、otionDrive,vpMotionFly,vpMotionUFO,vpMotionWalk,vpMotionWrap,vpMotionGame和vpMotionSpin。VpMotionDrive是一个drive模型,用户可以控制其运动速度和转向;vpMotionFly是一个简单的飞行模拟模型,这个模型的效果和空气动力学的响应、推动力以及飞机模型的质量有关,这三个参数是可以在.acf文件或者程序中设置的。飞行模型能够模拟质点六个自由度的变化;vpMotionUFO是一个无重力的运动模型,它使质点能够高速运动,并能够在任意位置盘旋;vpMotionWalk模拟基本的步行运动;vpMotion

4、Game模拟第一人称射击游戏中主角的运动方式;vpMotionSpin模拟站在一个球体表面随球体转动的运动模型。每个运动模型运动方式的具体实现方法(前进、后退、左转、右转)是封装起来的,用户看不见。用户只能通过API修改速度、转向等等的渐增值。 10.000000 50.000000 5.000000 40.000000 20.000000 环境构成 Vega Prime用vpEnv类描述了应用所需要的环境。要想环境中具有太阳、月亮、天际线和云层,需要将vpEnvSun、vpEnvMoon、vpEnvSkyDom、vpEnvCloudLayer加入到vpEnv中。环境具有诸如日期和时间等基本参

5、数,并且能够根据模拟的时间流逝计算出当前时间,从而使太阳和月亮的亮度发生变化,模拟出白天和晚上。同时环境还提供了一个对应于地球真实位置的参考位置,根据观察者位置的不同,确定太阳和月亮合适的位置。环境还允许动态的设置观察者所在的时区。 Vega Prime用vpEnvSun描述太阳,用vpEnvMoon描述月亮。vpEnvSun和vpEnvMoon都是靠定义lightsource和圆盘形状的几何图形来模拟太阳和月亮的。Lightsource和圆盘的位置能够通过环境的时间模型自动动态改变。太阳和月亮的亮度由它们在天空中的高度决定。 true -18.000000 sun.inta 0.992156

6、 1.000000 0.949019 1.000000 1.000000 0.545098 0.239216 1.000000 vpEnvSkyDome描述天际线,它定义了一个以observer为中心的,延伸到far clipping plane的椭圆形几何图形。 true 0.211765 0.286275 0.149020 1.000000 vpEnvCloudLayer描述云层,它是环绕在球形天空顶部,以observer为中心,起始高度可以由API函数设定,并延伸到far clipping plane。 true 0.956863 0.976471 0.984314 1.000000 3

7、000.000000 5000.000000 500.000000 500.000000 false cloud_scattered.inta 3.000000 3.000000 云层的纹理和颜色可以用API函数设定。如果在环境中有风,云层的纹理坐标会随风向移动,模拟出云运动的效果。云层的结构如下图所示。环境所提供雾化效果,也是可以通过API直接修改的。雾化效果是通过能见度体现的,可以直接将能见范围作为参数传给API函数。能够通过降低能见度模拟雾天气。 环境的灯光分为lightsource和lightpoint两种,可以在Creator里面直接创建,也可以在程序中用底层的两个类:vrLight

8、Source和vrLightPoint创建。在Lynx中可以直接创建lightsource。在Creator里面创建的lightpoint是以节点方式存在的,可以为其命名,加入场景后就成为名字节点,可以通过方法findNamed()找到,转化成vsLightPoint节点类型后就可以进行控制了。灯光的动画效果是用TYPE枚举变量定义的,有SEQUENCE.ROTATION和STROBE三种类型。动画效果要附在vrLightPoint上。TOM如是说:VP使用XML构件ACF文件,这一全新的概念极大地优化VP的性能和简便了VP的使用。通过ACF文件把握VP程序的基本框架,更能感受到创新带来的效果

9、。参考用vega prime开发三维视景概要一文,受益良多,特此感谢!第二章 创建场景 介绍:The scene in your application that you will be creating will include a countryside with a farmhouse, a moving car, and a grain storage unit.目标:This tutorial leads you through the development of Prime Junction, USA基础概念:􀂄 Creating and saving an A

10、CF file in LynX Prime􀂄 Getting familiar with the LynX Prime user interface and thedifferent views􀂄 Adding OpenFlight models to your simulation as objects􀂄 Adding new objects to a scene􀂄 Changing values of instances in the API view􀂄 Using the Active Previe

11、w tool to preview and refine yourapplication步骤:Add the TerrainAdd the Classic FarmhouseAdd the CarAdd a Grain Storage Unit第三章 运动和观察点 介绍:Motion models simulate different positioning methods, such as flying, driving, walking, or hovering. When you associate a moving model with an object, that object a

12、ppears to move through the scene. You can also position your eyepoint (observer) on or near the moving object so that you feel like youre controlling its movement with the mouse.In this chapter, you will set observers at different locations, add motion, and define channels to view different areas of

13、 your scene at one time.目标:This tutorial takes you through the process of defining and positioning cameras (observers) in LynX Prime to view the scene from different vantage points.基础概念:􀂄 Defining the location and orientation of observers(定义观察点的位置和方向)􀂄 Using transforms to place obs

14、ervers(用变化式代替观察点)􀂄 Adding motion to objects using motion models(使用运动模型给对象附加运动)􀂄 Adding collision detectors (isectors) to objects(给对象附加碰撞检测)􀂄 Setting different views of the scene for the Active Preview(设置不同的场景观察方向)步骤:观察点设置方位角,俯仰角,滚动角定义如下:Heading is rotation about the Z axis

15、:+H is looking to the left􀂄 -H is looking to the rightPitch is rotation about the X axis:􀂄 +P is looking up􀂄 -P is looking downRoll is rotation about the Y axis:+R is tilting your head to the right􀂄 -R is tilting your head to the left(Y为观察方向,方位角,俯仰角,滚动角的概念应该很容易掌握了

16、)建立转换式转换式是动态坐标系统,值相对于父类。 转换式的位置是(0, -30, 5),即车后30单位,车上5单位。添加运动模型运动模型是位置方案,这个方案允许通过输入设备实现位置的改变。MotionUFO是零重力运动模型。改变运动模型MotionDrive 是一个drive模型,用户可以控制其运动速度和转向。添加碰撞检测碰撞检测类型:􀂄 Tripod - Three vertical line segments that collect data to ground clamp users to the designated target. Tripod is design

17、ed for driving at ground level.(三条垂直线段,地面驾驶检测)􀂄 Bump - Six line segments that collect collisions along the positive and negative X,Y, and Z axes.(六条线段收集正负方向上的碰撞信息)􀂄 LOS - Line of Sight single line segment that radiates along the positive Y axis. It collects data that is in front of

18、 you.(收集Y前方的信息)􀂄 HAT - Single line segment that radiates along the Z axis as it calculates the Height Above Terrain.(海拔信息)􀂄 XYZPR - Computes the point of collision as well as the pitch and roll.(俯仰和滚装时计算碰撞点信息)􀂄 ZPR - Computes the Z pitch and roll at the point of collision.

19、(俯仰和滚装时计算碰撞点高度信息)􀂄 Z - Computes the Z point of collision(计算高度信息).Vege Prime定义了抽象类vpIsector来描述检测器,并且派生出了多个具体的检测器,比如检测海拔高度的vpIscetorHAT,检测瞄准线的vpIsectorLOS等等。每种检测器都是依靠线段来进行检测。检测器自其中心向周围延伸出一些线段(line segment),当这些线段和目标物体发生相交时就认为碰撞发生。VpIsectorBump自中心出发,沿x、y、z正负半轴定义六条线段; vpIsectorHAT在z轴方向上定义一条线段,给出

20、z方向上的起点和终点即可;vpIsectorLOS自中心沿y正半轴定义一条线段;vpIsectorXYZPR在z轴方向上定义一条线段,它能够通过检测器的heading计算出pitch和roll值;vpIsectorZ自中心出发,沿z轴定义一条线;vpIsectorZ在z轴方向上定义一条线段,它能够通过检测器的z值计算出pitch和roll值。 进行碰撞检测需要设置isector mask。每个检测器都可以设置一个mask,进行检测的目标物体也可以设置一个mask。以检测飞机坠地为例,将检测器安放在飞机模型上,地面是检测目标,如果飞机接触地面就算发生碰撞。检测器和地面都需要设置mask。进行检测

21、时,系统将检测器的mask和场景内所有物体的mask做与运算,结果不为0的才进行检测。所以设置mask时要保证检测器和地面的mask做了与运算后结果不为0。 检测还引入了消息机制。Vega Prime在vpIsector中定义了Event枚举变量来描述碰撞事件。碰撞发生时消息订阅者会收到vpIsector:EVENT_HIT事件通知,碰撞消失时消息订阅者会收到vpIsector:EVENT_CLEAR_HIT事件通知。因此,程序中要订阅事件消息,随时捕获此消息,以便知道什么时候碰撞发生,什么时候碰撞消失。定义通道一个窗口里可有多个通道,通道相当于视口(Viewport)。更改窗口标题第四章 环

22、境 介绍:You can set many environmental effects for your application in LynX Prime, including sunlight, moonlight, fog, and wind. You can also control the speed that a day elapses. Dawn can change to day, dusk, and night in a few minutes of real time.In this chapter, you will experiment with time of day

23、 settings, change the sky and cloud texture, and add and position light sources.(这一章将练习一天时间的设置,改变天空和云的纹理以及添加放置光源)目标:In this tutorial, you will learn how to create environmental effects for your application, like sun and moon light according to the time of day, and a cloudy, stormy sky. You will also

24、 add headlights to the car so that you can drive in the dark.基础概念:􀂄 Controlling the time of day(控制一天时间的变化)􀂄 Changing the sky color(改变太空的颜色)􀂄 Changing the cloud texture(改变云的纹理)􀂄 Adding and positioning light sources on an object(在对象上添加和放置光源)步骤:定义环境1.改变一天的时间。默认设置为中午1

25、2点,可以改变时间流逝的速度,multiplier为60,相当于时间流逝加快60倍。2.改变天空的颜色3.改变云的纹理添加光源光源有三种:􀂄 Directional Light - Unidirectional light that points in a specified orientation(定向光)􀂄 Positional Light - Omnidirectional light with a position(定位光)􀂄 Spot Light - Unidirectional light with both a directi

26、on and a position(聚光灯光)1.添加车灯2.建立第二个车灯第五章 特殊效果 介绍:Special effects add a great deal of realism, variety, and excitement to your application. You can add fire, explosions,and debris, to name a few. You can also create your own special effects using particle systems, which are collections of polygons u

27、sed to model natural phenomena such as fire and smoke. Objects in the scene can be added as targets to hit and destroy, and special effects can be used as after-effects. All of these special effects and their characteristics can be easily defined in LynX Prime.In this chapter, you will start with adding a simple special effect to the farmhouse. When the car hits the house,debris will fall around it. Then you will have some fun building a tornado using a series o

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1