本文整理汇总了C++中mat4::RotateY方法的典型用法代码示例。如果您正苦于以下问题:C++ mat4::RotateY方法的具体用法?C++ mat4::RotateY怎么用?C++ mat4::RotateY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mat4
的用法示例。
在下文中一共展示了mat4::RotateY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
void Update()
{
float fDeltaTime = GetDeltaTime();
// update movement of the camera's world transform
FreeMovement(fDeltaTime,g_CameraMatrix,10);
// example rotated world transform for the crate plane
static float sfTimer = 0;
sfTimer += fDeltaTime;
g_ModelMatrix.RotateY(sfTimer);
// clear the visualiser so we can add shapes this frame
Visualiser::Get()->Clear();
//////////////////////////////////////////////////////////////////////////
// example visualiser use
// line shapes
Visualiser::Get()->AddDisk(vec4(-4,-1,4,1),2,8,vec4(0,1,0,0));
Visualiser::Get()->AddHermiteSpline(vec4(-2,0,-3,1),vec4(2,0,-3,1),vec4(0,5,0,0),vec4(2,0,0,0),10,vec4(1,1,0,1));
// tri shapes
Visualiser::Get()->AddArc(vec4(0,0.5f,0,1),0,2,PI*0.25f,4,vec4(1,0,0,1),&g_ModelMatrix);
Visualiser::Get()->AddRing(vec4(4,0,4,1),2,2.5f,8,vec4(1,0,0,1),&g_ModelMatrix);
Visualiser::Get()->AddArcRing(vec4(0,0,0,1),PI,2,2.5f,PI*0.25f,4,vec4(1,0,1,0.5f),&g_ModelMatrix);
Visualiser::Get()->AddSphere(vec4(-4,0,0,1),8,8,2,vec4(1,0,0,0.5f),&g_ModelMatrix);
Visualiser::Get()->AddCylinderFilled(vec4(0,0,0,1),1,4,8,vec4(0,0,1,0.5f),&g_ModelMatrix);
Visualiser::Get()->AddAABBFilled(vec4(0,0,0,1),vec4(1,1,1,0),vec4(1,0,0,0.5f),&g_ModelMatrix);
// transform lines
Visualiser::Get()->AddTransform(g_ModelMatrix,2);
g_ModelMatrix.row3 = vec4(4,0,0,1);
Visualiser::Get()->AddTransform(g_ModelMatrix,2);
g_ModelMatrix.row3 = vec4(0,0,0,1);
}