📄 cvconvrt.cpp
字号:
/*----------------------------------------------------------------------------
_ _ _
/\ | | | (_)
/ \ _ __ __| |_ __ ___ _ __ ___ ___ __| |_ __ _
/ /\ \ | '_ \ / _` | '__/ _ \| '_ ` _ \ / _ \/ _` | |/ _` |
/ ____ \| | | | (_| | | | (_) | | | | | | __/ (_| | | (_| |
/_/ \_\_| |_|\__,_|_| \___/|_| |_| |_|\___|\__,_|_|\__,_|
The contents of this file are subject to the Andromedia Public
License Version 1.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.andromedia.com/APL/
Software distributed under the License is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Pueblo client code, released November 4, 1998.
The Initial Developer of the Original Code is Andromedia Incorporated.
Portions created by Andromedia are Copyright (C) 1998 Andromedia
Incorporated. All Rights Reserved.
Andromedia Incorporated 415.365.6700
818 Mission Street - 2nd Floor 415.365.6701 fax
San Francisco, CA 94103
Contributor(s):
--------------------------------------------------------------------------
Chaco team: Dan Greening, Glenn Crocker, Jim Doubek,
Coyote Lussier, Pritham Shetty.
Wrote and designed original codebase.
------------------------------------------------------------------------------
Chaco/Qv conversion inlines.
----------------------------------------------------------------------------*/
// $Header: /home/cvs/chaco/modules/client/msw/ChGraphx/CvConvrt.cpp,v 2.2 1996/06/27 03:43:58 jimd Exp $
#include "grheader.h"
#include "CvConvrt.h"
void Qv2Native( QvSFMatrix& matrix, GxTransformF_t& mat)
{
#if defined(CH_USE_3DR)
for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 4; j++)
{
mat[i][j] = matrix.value[j][i]; // assume righthanded functions
}
}
#elif (defined(CH_USE_RLAB) || defined(CH_USE_D3D))
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 3; j++)
{
mat[i][j] = matrix.value[i][j]; // assume lhs graphics; transpose rotation ?????
}
}
for(int j = 0; j < 3; j++)
{
mat[3][j] = matrix.value[3][j];
mat[j][3] = 0; // don't trust anybody
}
for( j = 0; j < 4; j++)
{
//mat[j][2] = -mat[j][2]; // negate for lhs?
//mat[2][j] = -mat[2][j]; // negate for lhs?
}
#if 0
mat[2][0] = -matrix.value[0][2]; // flip x-z direction - ????
mat[0][2] = matrix.value[2][0];
#endif
mat[3][3] = 1.0; // still don't trust anybody
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -