yaw angle中文翻譯,yaw angle是什么意思,yaw angle發(fā)音、用法及例句
- 內容導航:
- 1、yaw angle
- 2、opengl中 gllookat參數可以為變量嗎
1、yaw angle
yaw angle發(fā)音
英: 美:
yaw angle中文意思翻譯
常見(jiàn)釋義:
[航]偏航角
yaw angle雙語(yǔ)使用場(chǎng)景
1、Analysis of Requirement to the Yaw Angle Error in Stripmap SAR Imaging───條帶SAR成像對偏航角最大誤差要求的理論分析
2、This article focuses on the drift probability distribution model due to the yaw angle.───本文重點(diǎn)討論偏航角導致的漂移量分布概率。
3、and 3. measuring an elevation angle and a yaw angle of an optical path of the probe and detecting the installation angle of the probe.───測量探頭光路的仰角和偏航角,進(jìn)行探頭安裝角度的檢測。
4、This article focuses on the drift probability distribution model due to the yaw Angle.───本文重點(diǎn)討論偏航角導致的漂移量分布概率。
5、Analysis of Trains Aerodynamic Performance with Different Yaw Angle and Ground Condition───不同風(fēng)向角和地面條件下的列車(chē)空氣動(dòng)力性能分析
6、The results show that this type of inlet has high total pressure recovery coefficients at a wide range of yaw angle.───研究表明,該類(lèi)進(jìn)氣道在各種側滑狀態(tài)下總壓恢復系數較高。
7、But the regions of local flow separation and distortion factor of the flow at the exit section are relevant closely to the yaw angle.───但是進(jìn)氣道內氣流分離的區域和出口截面流場(chǎng)畸變指數卻與側滑角的大小密切相關(guān)。
yaw angle相似詞語(yǔ)短語(yǔ)
1、healing angle───愈合角
2、repose angle───靜止角;安定角;休止角
3、angle───n.角,角度;視角;立場(chǎng);角鐵;(古)魚(yú)鉤;v.斜移;從……角度提供信息;釣魚(yú);謀取
4、intercepted angle───截獲角
5、angle baby───天使寶寶
6、face angle───齒面角;[數]面角
7、yaw system───調向系統
8、proverse yaw───proverse偏航
9、azimuthal angle───[計] 方位角;[測]方位角
2、opengl中 gllookat參數可以為變量嗎
可以啊,通過(guò)設置相機移動(dòng),對gllookat中的參數進(jìn)行修改。這有個(gè)相機類(lèi)。
#ifndef __CAMERA_H__
#define __CAMERA_H__
#include "Vector.h"
#include "stdafx.h"
/**< 包含向量類(lèi)頭文件 */
/** 攝像機類(lèi) */
class Camera
{
public:
/** 構造函數和析構函數 */
Camera();
~Camera();
/** 獲得攝像機狀態(tài)方法 */
Vector3 getPosition() { return m_Position; }
Vector3 getView() { return m_View; }
Vector3 getUpVector() { return m_UpVector; }
float getSpeed() { return m_Speed; }
/** 設置速度 */
void setSpeed(float speed)
{
m_Speed = speed;
}
/** 設置攝像機的位置, 觀(guān)察點(diǎn)和向上向量 */
void setCamera(float positionX, float positionY, float positionZ,
float viewX, float viewY, float viewZ,
float upVectorX, float upVectorY, float upVectorZ);
/** 旋轉攝像機方向 */
void rotateView(float angle, float X, float Y, float Z);
/** 根據鼠標設置攝像機觀(guān)察方向 */
void setViewByMouse(POINT mypoint1,POINT mypoint2);
/** 左右攝像機移動(dòng) */
void yawCamera(float speed);
/** 前后移動(dòng)攝像機 */
void moveCamera(float speed);
/** 放置攝像機 */
void setLook();
private:
/** 攝像機屬性 */
Vector3 m_Position; /**< 位置 */
Vector3 m_View; /**< 朝向 */
Vector3 m_UpVector; /**< 向上向量 */
float m_Speed; /**< 速度 */
};
#endif //__CAMERA_H__
#include "Camera.h" /**< 包含攝像機頭文件 */
#include "Vector.h" /**< 包含向量類(lèi) */
/** 構造函數 */
Camera::Camera()
{
/** 初始化向量值 */
Vector3 zero = Vector3(0.0, 0.0, 0.0);
Vector3 view = Vector3(0.0, 1.0, 0.5);
Vector3 up = Vector3(0.0, 0.0, 1.0);
/** 初始化攝像機 */
m_Position = zero;
m_View = view;
m_UpVector = up;
m_Speed = 0.2f;
}
Camera::~Camera()
{
}
/** 設置攝像機的位置,朝向和向上向量 */
void Camera::setCamera( float positionX, float positionY, float positionZ,
float viewX, float viewY, float viewZ,
float upVectorX, float upVectorY, float upVectorZ)
{
/** 構造向量 */
Vector3 Position = Vector3(positionX, positionY, positionZ);
Vector3 View = Vector3(viewX, viewY, viewZ);
Vector3 UpVector = Vector3(upVectorX, upVectorY, upVectorZ);
/** 設置攝像機 */
m_Position = Position;
m_View = View;
m_UpVector = UpVector;
}
/** 旋轉攝像機方向 */
void Camera::rotateView(float angle, float x, float y, float z)
{
Vector3 newView;
/** 計算方向向量 */
Vector3 view = m_View - m_Position;
/** 計算 sin 和cos值 */
float cosTheta = (float)cos(angle);
float sinTheta = (float)sin(angle);
/** 計算旋轉向量的x值 */
newView.x = (cosTheta + (1 - cosTheta) * x * x) * view.x;
newView.x += ((1 - cosTheta) * x * y - z * sinTheta) * view.y;
newView.x += ((1 - cosTheta) * x * z + y * sinTheta) * view.z;
/** 計算旋轉向量的y值 */
newView.y = ((1 - cosTheta) * x * y + z * sinTheta) * view.x;
newView.y += (cosTheta + (1 - cosTheta) * y * y) * view.y;
newView.y += ((1 - cosTheta) * y * z - x * sinTheta) * view.z;
/** 計算旋轉向量的z值 */
newView.z = ((1 - cosTheta) * x * z - y * sinTheta) * view.x;
newView.z += ((1 - cosTheta) * y * z + x * sinTheta) * view.y;
newView.z += (cosTheta + (1 - cosTheta) * z * z) * view.z;
/** 更新攝像機的方向 */
m_View = m_Position + newView;
}
/** 用鼠標旋轉攝像機 */
void Camera::setViewByMouse(POINT mpoint1,POINT mpoint2)
{
/* POINT mousePos; */ /**< 保存當前鼠標位置 */
int middleX = GetSystemMetrics(SM_CXSCREEN) >> 1; /**< 得到屏幕寬度的一半 */
int middleY = GetSystemMetrics(SM_CYSCREEN) >> 1; /**< 得到屏幕高度的一半 */
float angleY = 0.0f; /**< 攝像機左右旋轉角度 */
float angleZ = 0.0f; /**< 攝像機上下旋轉角度 */
static float currentRotX = 0.0f;
/** 得到當前鼠標位置 */
/* GetCursorPos(&mousePos); */
ShowCursor(TRUE);
///** 如果鼠標沒(méi)有移動(dòng),則不用更新 */
//if( (mousePos.x == middleX) && (mousePos.y == middleY) )
// return;
///** 設置鼠標位置在屏幕中心 */
//SetCursorPos(middleX, middleY);
/**< 得到鼠標移動(dòng)方向 */
angleY = (float)( (mpoint2.x - mpoint1.x) ) / 14000.0f;
angleZ = (float)( (mpoint2.y - mpoint1.y) ) / 14000.0f;
static float lastRotX = 0.0f; /**< 用于保存旋轉角度 */
lastRotX = currentRotX;
/** 跟蹤攝像機上下旋轉角度 */
currentRotX += angleZ;
/** 如果上下旋轉弧度大于1.0,我們截取到1.0并旋轉 */
if(currentRotX > 1.0f)
{
currentRotX = 1.0f;
/** 根據保存的角度旋轉方向 */
if(lastRotX != 1.0f)
{
/** 通過(guò)叉積找到與旋轉方向垂直的向量 */
Vector3 vAxis = m_View - m_Position;
vAxis = vAxis.crossProduct(m_UpVector);
vAxis = vAxis.normalize();
///旋轉
rotateView( 1.0f - lastRotX, vAxis.x, vAxis.y, vAxis.z);
}
}
/** 如果旋轉弧度小于-1.0,則也截取到-1.0并旋轉 */
else if(currentRotX < -1.0f)
{
currentRotX = -1.0f;
if(lastRotX != -1.0f)
{
/** 通過(guò)叉積找到與旋轉方向垂直的向量 */
Vector3 vAxis = m_View - m_Position;
vAxis = vAxis.crossProduct(m_UpVector);
vAxis = vAxis.normalize();
///旋轉
rotateView( -1.0f - lastRotX, vAxis.x, vAxis.y, vAxis.z);
}
}
/** 否則就旋轉angleZ度 */
else
{
/** 找到與旋轉方向垂直向量 */
Vector3 vAxis = m_View - m_Position;
vAxis = vAxis.crossProduct(m_UpVector);
vAxis = vAxis.normalize();
///旋轉
rotateView(angleZ, vAxis.x, vAxis.y, vAxis.z);
}
/** 總是左右旋轉攝像機 */
rotateView(angleY, 0, 1, 0);
}
/** 左右移動(dòng)攝像機 */
void Camera::yawCamera(float speed)
{
Vector3 yaw;
Vector3 cross = m_View - m_Position;
cross = cross.crossProduct(m_UpVector);
// Normalize the strafe vector
yaw = cross.normalize();
m_Position.x += yaw.x * speed;
m_Position.z += yaw.z * speed;
// Add the strafe vector to our view
m_View.x += yaw.x * speed;
m_View.z += yaw.z * speed;
}
/** 前后移動(dòng)攝像機 */
void Camera::moveCamera(float speed)
{
/** 計算方向向量 */
Vector3 vector = m_View - m_Position;
vector = vector.normalize(); /**< 單位化 */
/** 更新攝像機 */
m_Position.x += vector.x * speed; /**< 根據速度更新位置 */
m_Position.z += vector.z * speed;
m_View.x += vector.x * speed; /**< 根據速度更新方向 */
m_View.z += vector.z * speed;
}
/** 設置視點(diǎn) */
void Camera::setLook()
{
/** 設置視口 */
gluLookAt(m_Position.x, m_Position.y, m_Position.z,
m_View.x, m_View.y, m_View.z,
m_UpVector.x, m_UpVector.y, m_UpVector.z);
}
版權聲明: 本站僅提供信息存儲空間服務(wù),旨在傳遞更多信息,不擁有所有權,不承擔相關(guān)法律責任,不代表本網(wǎng)贊同其觀(guān)點(diǎn)和對其真實(shí)性負責。如因作品內容、版權和其它問(wèn)題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報,一經(jīng)查實(shí),本站將立刻刪除。