天气

西昌.何雨锋

 

天气

1、其他
           建立一个大气,不用从常景中建立
                  CTVAtmosphere* atmos1;
                  atmos1=new CTVAtmosphere();                 
 void Atmosphere_Render(void);
                   //渲染天气

2、雾
 void Fog_Enable(bool bEnable);
                    //允许雾
 void Fog_GetColor(float* fRed, float* fGreen, float* fBlue);
                     //得到雾的颜色RGB
 void Fog_SetColor(float fRed, float fGreen, float fBlue);
                  //设置雾的颜色
 void Fog_SetParameters(float fStartFog = 1.0f, float fEndFog = 1000.0f, float fDensity = 0.01f);
                    //设置雾的参数(起,完,密度)
 void Fog_GetParameters(float* fStartFog, float* fEndFog, float* fDensity);
                   //得到雾的参数(&起,&完,&密度)
 void Fog_SetType(cCONST_TV_FOG eFogAlgo, cCONST_TV_FOGTYPE eFogType);
                  设置雾的类型(参数1)
                  cTV_FOG_LINEAR = 3,       直雾
                  cTV_FOG_EXP = 1,       扩展雾
                  cTV_FOG_EXP2 = 2    扩展2
                 设置雾粒子类型:(参数2)
                 cTV_FOGTYPE_PIXEL = 0,         点雾
                 cTV_FOGTYPE_RANGE = 1,      范围
                 cTV_FOGTYPE_VERTEX = 2      顶点雾
 void Fog_GetType(cCONST_TV_FOG* eFogAlgo, cCONST_TV_FOGTYPE* eFogType);
                     //得到雾的类型
 bool Fog_IsEnabled();
                     //返回是否允许雾

3、光晕
 void LensFlare_Enable(bool bEnable);
                     //光晕允许否
 void LensFlare_SetLensNumber(int lNumber);
                     //设置光晕数量
 void LensFlare_SetLensParams(int lLensIndex, int lTexture, float fSize, float fLinePosition, int lNormalColor, int lSpecularColor = 0xffffffff);
                     //设置光晕参数(第几个,纹理,大小,位置,普通颜色,特殊颜色)

4、雨
 void Rain_Enable(bool bEnable);
                     //是否允许下雨
 void Rain_Init(float fDensity, int iRainTexture, float fFallSpeed = 1.0f, float fWindX = 0.0f, float fWindZ = 0.0f, float fRandomValue = 0.1f, float fDistRain = 20.0f, float fRainParticleSize = 1.0f, float fRainRadius = 20.0f, int iRainGeneratorSpeed = 20, float fRainSpeed = 1.0f);
     //雨的初始化(密度,纹理,落速,风x,风z,随机因子,明显的雨,雨粒子大小,雨范围半径,雨生成器速度,雨速度)
                  void Rain_Render();
                      //雨渲染
 CTVParticleSystem* Rain_GetParticleSystem();
                        //得到雨的粒子系统
5、天空盒
 void SkyBox_Enable(bool bEnable);
                      //允许天空盒
 void SkyBox_SetRotation(float fRotationX, float fRotationY, float fRotationZ);
                      //天空盒旋转(x,y,z)
 void SkyBox_SetColor(float r, float g, float b, float a);
                       //天空盒设置颜色(R,g,b,a)
 void SkyBox_SetTexture(int iFront, int iBack, int iLeft, int iRight, int iTop, int iBottom);
                       //设置天空盒各方向的纹理
 void SkyBox_SetScale(float x, float y, float z);
                        //天空盒放缩
 void SkyBox_GetColor(float* ret_fRed, float* ret_fGreen, float* ret_fBlue, float* ret_fAlpha);
                          //得到天空盒颜色(r,g,b,a)----只对设置单一颜色的天空盒有效
 void SkyBox_GetScale(float* ret_fX, float* ret_fY, float* ret_fZ);
                          //得到天空盒放缩
 void SkyBox_GetTexture(int* iFront, int* iBack, int* iLeft, int* iRight, int* iTop, int* iBottom);
                         //得到天空盒各方向的纹理
 void SkyBox_SetDepthWrite(bool bEnableDepthWrite);
                         //设置天空盒的深度允许
 bool SkyBox_IsEnabled();
                        //返回是否允许天空盒
                   cTV_3DVECTOR SkyBox_GetRotation();
                        //得到天空盒旋转的3d
 void SkyBox_Render();
                        //渲染天空盒
6、天空球
 void SkySphere_Enable(bool bEnable);
                        //设置是否允许天空球
 void SkySphere_SetRotation(float fRotationX, float fRotationY, float fRotationZ);
                        //天空球设置旋转
 void SkySphere_SetColor(float fRed, float fGreen, float fBlue, float fAlpha);
                       //天空球设置颜色
 void SkySphere_SetRadius(float fRadius);
                       //天空球设置半径
 void SkySphere_SetTexture(int iTexture);
                        //天空球设置纹理
 void SkySphere_SetParameters(bool bUseHemisphere);
                        //天空球设置参数(是否允许半球)
 void SkySphere_SetScale(float fX, float fY ,float fZ);
                        //天空球设置放缩
 void SkySphere_SetPolyCount(int iNumRings);
                       //
 void SkySphere_SetDepthWrite(bool bEnableDepthWrite);
                      //天空球设置深写允许
 bool SkySphere_IsEnabled();
                       //返回天空球是否允许
 void SkySphere_GetColor(float* ret_fRed, float* ret_fGreen, float* ret_fBlue, float* ret_fAlpha);
                        //得到天空球颜色
 int SkySphere_GetTexture();
                         //得到天空球纹理
 void SkySphere_GetScale(float* ret_fX, float* ret_fY, float* ret_fZ);
                        //得到天空球放缩
 
 cTV_3DVECTOR SkySphere_GetRotation();
                        //得到天空球
 bool SkySphere_IsHemiSphere();
                          //得到天空球是否是半球
 int SkySphere_GetPolyCount();
                 void SkySphere_Render();
                 //渲染天空球
7、太阳
 void Sun_Enable(bool bEnable);
                  //设置是否允许太阳          
 void Sun_SetColor(float fRed, float fGreen, float fBlue, float fAlpha);
                  //设置太阳颜色           (r,g,b,a)
 void Sun_SetPosition(float fPositionX, float fPositionY, float fPositionZ);
                   //设置太阳位置
 void Sun_SetTexture(int iTexture);
                   //设置太阳纹理(纹理)
 void Sun_SetBillboardSize(float fSize);
                  //设置太阳板的大小(大小)
 void Sun_SetBlendingMode(cCONST_TV_BLENDINGMODE eBlendMode);
                    //设置太阳的混合模式
                     
8、云 

 void Clouds_Create(int iNumCloudLayers, float fCoverageWidth, float fCoverageHeight);
                   //建立云(几层,覆盖宽度,覆盖高度)
 void Clouds_SetLayerParameters(int iCloudLayer, float fAltitude, int iTexture, float fTextureScaleU  = 1.0f , float fTextureScaleV = 1.0f, float fTextureOffsetU = 0.0f, float fTextureOffsetV = 0.0f);
                   //设置某层的云的参数(层,海拔,纹理,纹理放缩U,纹理放缩V,0,0)
 void Clouds_SetLayerBlendMode(int iCloudLayer, cCONST_TV_BLENDINGMODE eMode = cTV_BLEND_ALPHA);
                  //设置云层混合模式(层,混合模式--默认为alpha模式)
                       cTV_BLEND_NO = 0,
                       cTV_BLEND_ALPHA = 1,
                       cTV_BLEND_ADD = 2,
                       cTV_BLEND_COLOR = 3,
                       cTV_BLEND_ADDALPHA = 4,
      cTV_BLEND_MULTIPLY = 5
 void Clouds_SetLayerAnimation(int iCloudLayer, bool bEnable, float fAnimationSpeedU = 0.0f, float fAnimationSpeedV = 0.0f );
                     //设置某层云的运动(层,是否允许,U速度,V速度)
 void Clouds_Enable(bool bEnable, int iLayer = -1);
                    //是否允许某层云(允许,层次)
 void Clouds_SetLayerColor(int iCloudLayer, float fRed, float fGreen, float fBlue, float fAlpha);
                      //设置某层云的颜色(层,r,g,b,a)
 void Clouds_GetLayerColor(int iCloudLayer, float* fRed, float* fGreen, float* fBlue, float* fAlpha);
                      //得到某层云的颜色(层,r,g,b,a)
 void Clouds_Render();
                      //云渲染
 void Clouds_SetAlphaTest(int iCloudLayer, bool bAlphaTest = true, int iAlphaRef = 8, bool bWriteDepthBuffer = true);
 
 

 void SkyBox_SetVerticalOffset(float fOffset = 0.0f);
 void SkySphere_SetVerticalOffset(float fOffset = 0.0f);
 float SkyBox_GetVerticalOffset();
 float SkySphere_GetVerticalOffset();

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值