本文整理汇总了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;
}
示例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
);
}
示例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
);
}
示例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);
}