linelist.cpp
来自「这个是symbian下的一个蛮庞大的3D游戏源代码!对于学习3D开发的人有很大的」· C++ 代码 · 共 31 行
CPP
31 行
#include "LineList.h"
LineList::LineList() :
m_count(0),
m_ptr(0)
{
}
void LineList::add( const FixVec2& a, const FixVec2& b, int c )
{
m_ptr = (m_ptr+1) & (MAX_LINES-1);
m_lines[m_ptr] = Line(a,b,c);
if ( m_count < MAX_LINES )
++m_count;
}
void LineList::drawViewport( Surface& dst )
{
for ( int i = 0 ; i < m_count ; ++i )
m_lines[i].drawViewport( dst );
}
void LineList::remove()
{
m_count = 0;
m_ptr = 0;
}
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?