本文整理汇总了C++中Position::GetMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ Position::GetMatrix方法的具体用法?C++ Position::GetMatrix怎么用?C++ Position::GetMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Position
的用法示例。
在下文中一共展示了Position::GetMatrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void Screen3D::DrawAlphaPrimitive( VertexBuffer* VB, Position& camera, Position& CentralLocation, IndexBuffer* IB )
{
RenderBlock block;
block.VB = VB;
block.IB = IB;
block.m = (CentralLocation.GetMatrix()).Mat ;
Vector3D DistVector;
DistVector.x = camera.x - CentralLocation.x;
DistVector.y = camera.y - CentralLocation.y;
DistVector.z = camera.z - CentralLocation.z;
block.DistFromCamera = DistVector.Mag();
//sort it in now
if(DrawList.size())
{
std::list<RenderBlock>::iterator i;
i = DrawList.begin();
bool Inserted=false;
while(!Inserted )
{
if(block.DistFromCamera >= (*i).DistFromCamera )
{
DrawList.insert(i, block);
Inserted = true;
}
else if(i == DrawList.end())
{
DrawList.push_back(block);
Inserted = true;
}
else
++i;
}
}
else
{
DrawList.push_back(block);
}
}
示例2: Draw
void Character::Draw( Screen3D& Screen, MeshManager& MM, Camera& Viewer, GameTimer& Timer )
{
//set the transformation
Position DrawLocation;
DrawLocation = Location;
DrawLocation.Pitch = 0;
MeshA.Draw( Screen, DrawLocation.GetMatrix() );
for(int i=0; i<EquipmentList.size(); i++)
{
if(EquipmentList[i])
EquipmentList[i]->Draw( Screen, MM, Viewer, Timer );
}
}