本文整理汇总了C++中TransformNode::render方法的典型用法代码示例。如果您正苦于以下问题:C++ TransformNode::render方法的具体用法?C++ TransformNode::render怎么用?C++ TransformNode::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransformNode
的用法示例。
在下文中一共展示了TransformNode::render方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: render
void Scene::render(Pixel* px, Vertex *eyePoint, double attenuation)
{
//create the zbuffer matrix
int width = px->getWidth();
int height = px->getHeight();
Matrix* zbuffer = new Matrix(height, width); //rows come first
//populate zbuffer with -1
for (int i = 1; i <= height; i++)
{
for (int j = 1; j <= width; j++)
{
zbuffer->setElement(i, j, -1.0);
}
}
//loop over all the Instance instances in the Scene and render them
ListIterator<TransformNode>* ioIter = transformNodes->iterator();
while (ioIter->hasNext())
{
TransformNode* tn = ioIter->next();
tn->render(px, sceneTransform, zbuffer, ambientLight, pointLight, eyePoint, attenuation);
}
delete ioIter;
delete zbuffer;
}
示例2: render
void Scene::render(Pixel* px)
{
//Create zbuffer
Matrix *zBuffer = new Matrix(px->getHeight(), px->getWidth());
for(int i=0 ; i<px->getHeight() ; i++)
{
for(int j=0 ; j<px->getWidth() ; j++)
{
zBuffer->setElement(i, j, -1);
}
}
//loop over all the Instance instances in the Scene and render them
ListIterator<TransformNode>* ioIter = transformNodes->iterator();
while (ioIter->hasNext())
{
TransformNode* tn = ioIter->next();
tn->render(px, sceneTransform, zBuffer);
}
delete ioIter;
}