当前位置: 首页>>代码示例>>C++>>正文


C++ Matrix4::TransformVector方法代码示例

本文整理汇总了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);
}
开发者ID:iancarnation,项目名称:AIE_Projects,代码行数:7,代码来源:Matrix4UTests.cpp

示例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 );
}
开发者ID:S-V,项目名称:Lollipop,代码行数:17,代码来源:BatchRenderer.cpp

示例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 );
		}
	}
开发者ID:S-V,项目名称:Lollipop,代码行数:22,代码来源:manipulator.cpp


注:本文中的Matrix4::TransformVector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。