本文整理汇总了C++中Pnt3f::getValues方法的典型用法代码示例。如果您正苦于以下问题:C++ Pnt3f::getValues方法的具体用法?C++ Pnt3f::getValues怎么用?C++ Pnt3f::getValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pnt3f
的用法示例。
在下文中一共展示了Pnt3f::getValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawFace
void SkyBackground::drawFace( DrawEnv * pEnv,
TextureBaseChunk * tex,
StateChunk *&oldtex,
const Pnt3f &p1,
const Pnt3f &p2,
const Pnt3f &p3,
const Pnt3f &p4,
const Vec3f * texCoord)
{
#if !defined(OSG_OGL_COREONLY) || defined(OSG_CHECK_COREONLY)
if(tex != NULL)
{
if(oldtex != NULL)
{
tex->changeFrom(pEnv, oldtex);
}
else
{
tex->activate(pEnv);
}
if(tex->isTransparent())
{
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
}
// ENRICO: this part holds the informations about
// custom texture coordinates
// Mess with the best, die like the rest
glBegin(GL_QUADS);
{
#if 0 // strange crash with par drawers.
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[0].getValues()));
glVertex3fv (static_cast<const GLfloat *>(p1.getValues()));
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[1].getValues()));
glVertex3fv (static_cast<const GLfloat *>(p2.getValues()));
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[2].getValues()));
glVertex3fv (static_cast<const GLfloat *>(p3.getValues()));
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[3].getValues()));
glVertex3fv (static_cast<const GLfloat *>(p4.getValues()));
#else
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[0].getValues()));
glVertex3f (p1[0], p1[1], p1[2]);
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[1].getValues()));
glVertex3f (p2[0], p2[1], p2[2]);
glTexCoord3fv(static_cast<const GLfloat *>(
texCoord[2].getValues()));
glVertex3f (p3[0], p3[1], p3[2]);
glTexCoord3fv(texCoord[3].getValues());
glVertex3f (p4[0], p4[1], p4[2]);
#endif
}
glEnd();
if(tex->isTransparent())
{
glDisable(GL_BLEND);
}
oldtex = tex;
}
#endif
}