本文整理汇总了C++中DisplaySkeleton::RenderShadow方法的典型用法代码示例。如果您正苦于以下问题:C++ DisplaySkeleton::RenderShadow方法的具体用法?C++ DisplaySkeleton::RenderShadow怎么用?C++ DisplaySkeleton::RenderShadow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DisplaySkeleton
的用法示例。
在下文中一共展示了DisplaySkeleton::RenderShadow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Redisplay
/*
* Redisplay() is called by Player_Gl_Window::draw().
*
* The display is double buffered, and FLTK swap buffers when
* Player_Gl_Window::draw() returns. The GL context associated with this
* instance of Player_Gl_Window is set to be the current context by FLTK
* when it calls draw().
*/
void Redisplay()
{
/* clear image buffer to black */
glClearColor(1.0, 1.0, 1.0, 0);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); /* clear image, zbuf */
glPushMatrix(); /* save current transform matrix */
cameraView();
glLineWidth(2.0); /* we'll draw background with thick lines */
if (renderWorldAxes == ON)
{
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glDisable(GL_FOG);
RenderWorldAxes(); /* draw a triad in the origin of the world coordinate */
}
if (groundPlane == ON)
{
if (useFog == ON)
{
glEnable(GL_FOG);
GLfloat fogColor[4] = {1.0, 1.0, 1.0, 1.0};
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_START, (float)fogStart);
glFogf(GL_FOG_END, (float)fogEnd);
glFogf(GL_FOG_DENSITY, (float)fogDensity);
glFogi(GL_FOG_MODE, GL_LINEAR);
}
// draw_ground();
glEnable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glCallList(displayListGround);
glDisable(GL_LIGHTING);
glDisable(GL_FOG);
glLineWidth(1.0);
glColor3f(0.1f, 0.1f, 0.1f);
double ground[4] = {0,1,0,0};
double light[4] = {0,groundPlaneLightHeight,0,1};
displayer.RenderShadow(ground, light);
}
// render the skeletons
if (displayer.GetNumSkeletons())
{
glEnable(GL_LIGHTING);
glDisable(GL_FOG);
displayer.Render(DisplaySkeleton::BONES_AND_LOCAL_FRAMES);
}
glPopMatrix(); // restore current transformation matrix
}