本文整理汇总了C++中Matrix4d::postMult方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4d::postMult方法的具体用法?C++ Matrix4d::postMult怎么用?C++ Matrix4d::postMult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4d
的用法示例。
在下文中一共展示了Matrix4d::postMult方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTotalTransMat
//==== Get Total Transformation Matrix from Original Points ====//
Matrix4d PtCloudGeom::GetTotalTransMat()
{
Matrix4d retMat;
retMat.initMat( m_ScaleMatrix.data() );
retMat.postMult( m_ModelMatrix.data() );
return retMat;
}
示例2: UpdateDrawObj
void WingGeom::UpdateDrawObj()
{
Geom::UpdateDrawObj();
Matrix4d attachMat;
Matrix4d relTrans;
attachMat = ComposeAttachMatrix();
relTrans = attachMat;
relTrans.affineInverse();
relTrans.matMult( m_ModelMatrix.data() );
relTrans.postMult( attachMat.data() );
int nxsec = m_XSecSurf.NumXSec();
m_XSecDrawObj_vec.resize( nxsec, DrawObj() );
//==== Tesselate Surface ====//
for ( int i = 0 ; i < nxsec ; i++ )
{
m_XSecDrawObj_vec[i].m_PntVec = m_XSecSurf.FindXSec( i )->GetDrawLines( m_TessW(), relTrans );
m_XSecDrawObj_vec[i].m_GeomChanged = true;
}
m_HighlightXSecDrawObj.m_PntVec = m_XSecSurf.FindXSec( m_ActiveAirfoil )->GetDrawLines( m_TessW(), relTrans );
m_HighlightXSecDrawObj.m_GeomChanged = true;
double w = m_XSecSurf.FindXSec( m_ActiveAirfoil )->GetXSecCurve()->GetWidth();
Matrix4d mat;
m_XSecSurf.GetBasicTransformation( Z_DIR, X_DIR, XS_SHIFT_MID, false, 1.0, mat );
mat.scale( 1.0/w );
VspCurve crv = m_XSecSurf.FindXSec( m_ActiveAirfoil )->GetUntransformedCurve();
crv.Transform( mat );
vector< vec3d > pts;
crv.Tesselate( m_TessW(), pts );
m_CurrentXSecDrawObj.m_PntVec = pts;
m_CurrentXSecDrawObj.m_LineWidth = 1.0;
m_CurrentXSecDrawObj.m_LineColor = vec3d( 0.0, 0.0, 0.0 );
m_CurrentXSecDrawObj.m_Type = DrawObj::VSP_LINES;
m_CurrentXSecDrawObj.m_GeomChanged = true;
VspCurve inbd = m_XSecSurf.FindXSec( m_ActiveXSec - 1 )->GetCurve();
inbd.Transform( relTrans );
VspCurve outbd = m_XSecSurf.FindXSec( m_ActiveXSec )->GetCurve();
outbd.Transform( relTrans );
BndBox iBBox, oBBox;
inbd.GetBoundingBox( iBBox );
outbd.GetBoundingBox( oBBox );
oBBox.Update( iBBox );
m_HighlightWingSecDrawObj.m_PntVec = oBBox.GetBBoxDrawLines();
}
示例3: UpdateDrawObj
void PropGeom::UpdateDrawObj()
{
GeomXSec::UpdateDrawObj();
double axlen = 1.0;
Vehicle *veh = VehicleMgr.GetVehicle();
if ( veh )
{
axlen = veh->m_AxisLength();
}
double rev = 1.0;
if ( m_ReverseFlag() )
{
rev = -1.0;
}
double data[16];
m_ModelMatrix.getMat( data );
vec3d cen( 0, 0, 0 );
vec3d rotdir( -1, 0, 0 );
vec3d thrustdir( -1, 0, 0 );
rotdir = rotdir * rev;
cen = m_ModelMatrix.xform( cen );
rotdir = m_ModelMatrix.xform( rotdir ) - cen;
thrustdir = m_ModelMatrix.xform( thrustdir ) - cen;
Matrix4d mat;
mat.loadIdentity();
mat.rotateX( -rev * m_Rotate() );
mat.postMult( data );
vec3d pmid = mat.xform( m_FoldAxOrigin );
vec3d ptstart = mat.xform( m_FoldAxOrigin + m_FoldAxDirection * axlen / 2.0 );
vec3d ptend = mat.xform( m_FoldAxOrigin - m_FoldAxDirection * axlen / 2.0 );
vec3d dir = ptend - ptstart;
dir.normalize();
m_ArrowLinesDO.m_PntVec.clear();
m_ArrowHeadDO.m_PntVec.clear();
m_ArrowLinesDO.m_PntVec.push_back( ptstart );
m_ArrowLinesDO.m_PntVec.push_back( ptend );
m_ArrowLinesDO.m_PntVec.push_back( cen );
m_ArrowLinesDO.m_PntVec.push_back( cen + thrustdir * axlen );
MakeArrowhead( cen + thrustdir * axlen, thrustdir, 0.25 * axlen, m_ArrowHeadDO.m_PntVec );
MakeCircleArrow( pmid, dir, 0.5 * axlen, m_ArrowLinesDO, m_ArrowHeadDO );
MakeCircleArrow( cen, rotdir, 0.5 * axlen, m_ArrowLinesDO, m_ArrowHeadDO );
}