本文整理汇总了C++中Matrix4::TransformVector方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4::TransformVector方法的具体用法?C++ Matrix4::TransformVector怎么用?C++ Matrix4::TransformVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix4
的用法示例。
在下文中一共展示了Matrix4::TransformVector方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool M4TransformVectorTest::DoTest()
{
Matrix4 Dummy;
Dummy.TransformVector(m_oVector, m_fAngle, m_cAxis, m_fScale);
cout<< "\n---------------M4TransformVectorTest---------------\n";
return (m_oVector == m_oResult);
}
示例2: DrawArrow
void BatchRenderer::DrawArrow( const Matrix4& arrowTransform, const FColor& color, FLOAT arrowLength, FLOAT headSize )
{
mxSWIPED("Unreal Engine 3");
const Vec3D origin = arrowTransform.GetTranslation();
const Vec3D endPoint = arrowTransform.TransformVector(Vec3D( arrowLength, 0.0f, 0.0f ));
const FLOAT headScale = 0.5f;
const FColor& startColor = FColor::WHITE;
const FColor& endColor = color;
this->DrawLine3D( origin, endPoint, startColor, endColor );
this->DrawLine3D( endPoint, arrowTransform.TransformVector(Vec3D( arrowLength-headSize, +headSize*headScale, +headSize*headScale )), startColor, endColor );
this->DrawLine3D( endPoint, arrowTransform.TransformVector(Vec3D( arrowLength-headSize, +headSize*headScale, -headSize*headScale )), startColor, endColor );
this->DrawLine3D( endPoint, arrowTransform.TransformVector(Vec3D( arrowLength-headSize, -headSize*headScale, +headSize*headScale )), startColor, endColor );
this->DrawLine3D( endPoint, arrowTransform.TransformVector(Vec3D( arrowLength-headSize, -headSize*headScale, -headSize*headScale )), startColor, endColor );
}
示例3: Draw
void Draw( BatchRenderer & batchRenderer, const Matrix4& transform, const FColor& color )
{
const Vec3D apex = transform.TransformVector( arrowHeadVertex );
// draw the 'stem'
batchRenderer.DrawLine3D( transform.GetTranslation(), apex, FColor::WHITE, color );
// draw the arrow head
for( UINT iSegment = 0 ; iSegment < AXIS_ARROW_SEGMENTS ; iSegment++ )
{
const Vec3D& p0 = transform.TransformVector( arrowVertices[ iSegment ] );
const Vec3D& p1 = transform.TransformVector( arrowVertices[ iSegment + 1 ] );
// Draw the base triangle of the cone.
// NOTE: no need because we disabled backface culling
//batchRenderer.DrawSolidTriangle3D( p0,p1,arrowBaseVertex,color );
// Draw the top triangle of the cone.
batchRenderer.DrawSolidTriangle3D( p0, p1, apex, color );
}
}