本文整理汇总了C++中TIMER::ElapsedSeconds方法的典型用法代码示例。如果您正苦于以下问题:C++ TIMER::ElapsedSeconds方法的具体用法?C++ TIMER::ElapsedSeconds怎么用?C++ TIMER::ElapsedSeconds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TIMER
的用法示例。
在下文中一共展示了TIMER::ElapsedSeconds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GraphicsScene
void GraphicsScene(void) // this is created by shyeo, isolating the gl routines only from GraphicsDisplay
{
int attr;
static matrix posn;
// Display text.
strncpy(GraphicsString, StateText[StateGraphics], STRLEN);
GraphicsDisplayText();
// Display rotating teapot during rest period.
if (StateGraphics == STATE_REST)
{
glPushMatrix();
GRAPHICS_ColorSet(GREEN);
glRotated(ExperimentTimer.ElapsedSeconds() * 10.0 * PI, 1.0, 1.0, 1.0);
glutWireTeapot(10.0);
glPopMatrix();
return;
}
// Display home position at start of trial.
if ((StateGraphics >= STATE_SETUP) && (StateGraphics <= STATE_MOVING))
{
attr = RobotHome() ? HomeColor : NotHomeColor;
//GRAPHICS_Circle(&StartPosition, HomeRadius, attr);
GRAPHICS_Sphere(&StartPosition, HomeRadius, attr);
}
// Display target spheres when trial running.
if ((StateGraphics >= STATE_GO) && (StateGraphics <= STATE_FINISH))
{
// Display target for movement.
GRAPHICS_Sphere(&TargetPosition, TargetRadius, TargetColor);
// Display graphics sync target for phototransistor.
if (!GraphicsSyncPosition.iszero())
{
GRAPHICS_Sphere(&GraphicsSyncPosition, GraphicsSyncRadius, GraphicsSyncColor);
}
}
// Display finish position.
if ((StateGraphics > STATE_MOVING) && (StateGraphics <= STATE_INTERTRIAL))
{
attr = RobotHome() ? HomeColor : NotHomeColor;
GRAPHICS_Sphere(&FinishPosition, HomeRadius, attr);
}
// Display robot position cursor.
if ((StateGraphics != STATE_ERROR) && (VisualFeedback || RobotHome()))
{
posn = CursorPosition;
posn(3, 1) += 2.0*HomeRadius;
GRAPHICS_Sphere(&posn, CursorRadius, CursorColor);
}
}