本文整理汇总了C++中VMatrix::Transpose方法的典型用法代码示例。如果您正苦于以下问题:C++ VMatrix::Transpose方法的具体用法?C++ VMatrix::Transpose怎么用?C++ VMatrix::Transpose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMatrix
的用法示例。
在下文中一共展示了VMatrix::Transpose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MatrixInverseTranspose
void MatrixInverseTranspose( const VMatrix& src, VMatrix& dst )
{
src.InverseGeneral( dst );
dst = dst.Transpose();
}
示例2: EmitClipPortalGeometry
void EmitClipPortalGeometry( node_t *pHeadNode, portal_t *pPortal, int iSrcArea, dareaportal_t *dp )
{
// Build a list of all the points in portals from the same original face.
CUtlVector<portal_t*> portals;
FindPortalsLeadingToArea_R(
pHeadNode,
iSrcArea,
dp->otherarea,
&pPortal->plane,
portals );
CUtlVector<Vector> points;
for( int iPortal=0; iPortal < portals.Size(); iPortal++ )
{
portal_t *pPointPortal = portals[iPortal];
winding_t *pWinding = pPointPortal->winding;
for( int i=0; i < pWinding->numpoints; i++ )
{
points.AddToTail( pWinding->p[i] );
}
}
// Get the 2D convex hull.
//// First transform them into a plane.
QAngle vAngles;
Vector vecs[3];
VectorAngles( pPortal->plane.normal, vAngles );
AngleVectors( vAngles, &vecs[0], &vecs[1], &vecs[2] );
VMatrix mTransform;
mTransform.Identity();
mTransform.SetBasisVectors( vecs[0], vecs[1], vecs[2] );
VMatrix mInvTransform = mTransform.Transpose();
int i;
CUtlVector<Vector2D> points2D;
for( i=0; i < points.Size(); i++ )
{
Vector vTest = mTransform * points[i];
points2D.AddToTail( Vector2D( vTest.y, vTest.z ) );
}
// Build the hull.
int indices[512];
int nIndices = Convex2D( points2D.Base(), points2D.Size(), indices, 512 );
// Output the hull.
dp->m_FirstClipPortalVert = g_nClipPortalVerts;
dp->m_nClipPortalVerts = nIndices;
if ( nIndices >= 32 )
{
Warning( "Warning: area portal has %d verts. Could be a vbsp bug.\n", nIndices );
}
if( dp->m_FirstClipPortalVert + dp->m_nClipPortalVerts >= MAX_MAP_PORTALVERTS )
{
Vector *p = pPortal->winding->p;
Error( "MAX_MAP_PORTALVERTS (probably a broken areaportal near %.1f %.1f %.1f ", p->x, p->y, p->z );
}
for( i=0; i < nIndices; i++ )
{
g_ClipPortalVerts[g_nClipPortalVerts] = points[ indices[i] ];
++g_nClipPortalVerts;
}
}