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


C++ Mat4x4::affineTransformation方法代码示例

本文整理汇总了C++中Mat4x4::affineTransformation方法的典型用法代码示例。如果您正苦于以下问题:C++ Mat4x4::affineTransformation方法的具体用法?C++ Mat4x4::affineTransformation怎么用?C++ Mat4x4::affineTransformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mat4x4的用法示例。


在下文中一共展示了Mat4x4::affineTransformation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnCreate

	void SquareObject::OnCreate() {

		CreateBuffers(m_Scale.x, m_Scale.y);

		//行列の定義
		Mat4x4 World;
		World.affineTransformation(
			m_Scale,
			Vec3(0, 0, 0),
			m_Qt,
			m_Pos
		);

		auto TexPtr = App::GetApp()->GetResource<TextureResource>(m_TextureResName);
		auto NormTexPtr = App::GetApp()->GetResource<TextureResource>(m_NormalTextureResName);

		m_PtrObj = make_shared<BcDrawObject>();
		m_PtrObj->m_MeshRes = m_SquareMesh;
		m_PtrObj->m_TextureRes = TexPtr;
		m_PtrObj->m_NormalTextureRes = NormTexPtr;
		m_PtrObj->m_WorldMatrix = World;
		m_PtrObj->m_Camera = GetStage<Stage>()->GetCamera();
		m_PtrObj->m_OwnShadowmapActive = true;
		m_PtrObj->m_SamplerState = SamplerState::LinearWrap;
		m_PtrObj->m_ShadowmapUse = false;
		m_PtrObj->m_FogEnabled = true;
		//フォグはきつめに
		m_PtrObj->m_FogColor = Col4(0.3f, 0.3f, 0.3f, 1.0f);
		m_PtrObj->m_FogStart = -10.0f;
		m_PtrObj->m_FogEnd = -30.0f;


	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:33,代码来源:Character.cpp

示例2: OnDrawShadowmap

	void Player::OnDrawShadowmap() {
		auto PtrGameStage = GetStage<GameStage>();
		//ワールド行列の決定
		Mat4x4 World;
		World.affineTransformation(m_Scale, Vec3(0, 0, 0),
			m_Qt, m_Pos);
		auto shptr = PtrGameStage->FindTagGameObject<ShadowmapDrawObject>(L"ShadowmapDrawObject");
		shptr->AddDrawMesh(
			m_SphereMesh,
			World
		);
	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:12,代码来源:Player.cpp

示例3: OnDraw

	void Player::OnDraw() {
		auto TexPtr = App::GetApp()->GetResource<TextureResource>(m_TextureResName);
		auto PtrGameStage = GetStage<GameStage>();
		//ワールド行列の決定
		Mat4x4 World;
		World.affineTransformation(m_Scale, Vec3(0, 0, 0),
			m_Qt, m_Pos);
		auto shptr = PtrGameStage->FindTagGameObject<PNTDrawObject>(L"PNTDrawObject");
		shptr->AddDrawMesh(
			m_SphereMesh,
			TexPtr,
			World,
			true
		);
	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:15,代码来源:Player.cpp

示例4: OnDraw

	void SimpleSquare::OnDraw() {
		//行列の定義
		Mat4x4 World;
		World.affineTransformation(
			m_Scale,
			Vec3(0, 0, 0),
			m_Qt,
			m_Pos
		);
		m_PtrObj->m_WorldMatrix = World;
		m_PtrObj->m_Camera = GetStage<Stage>()->GetCamera();
		auto shptr = m_Renderer.lock();
		if (!shptr) {
			shptr = GetStage<Stage>()->FindTagGameObject<SimplePCTStaticRenderer>(L"SimplePCTStaticRenderer");
			m_Renderer = shptr;
		}
		shptr->AddDrawObject(m_PtrObj);
	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:18,代码来源:Character.cpp


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