Torus(float majorRadius, float minorRadius) :
     m_majorRadius(majorRadius),
     m_minorRadius(minorRadius)
 {
     ParametricInterval interval = { ivec2(20, 20), vec2(TwoPi, TwoPi), vec2(40, 10) };
     SetInterval(interval);
 }
示例#2
0
// Constructor
Kugel::Kugel(float radius) : radius(radius) {
	ParametricInterval interval = {
		ivec2(20, 20), // Divisions for u and v
		vec2(Pi, TwoPi) // Upper bound for u and v
	};
	SetInterval(interval);
}
示例#3
0
文件: Timer.cpp 项目: Jedzia/Humbug
//constructor
CTimer::CTimer(CMessageHandler* pmhParent,Uint32 interval):
CMessageHandler(pmhParent),
m_TimerID(0),
m_Interval(0)
{
	//set the interval
	SetInterval(interval);
}
示例#4
0
CGameFont::CGameFont(LPCSTR section, u32 flags)
{
	fCurrentHeight				= 0.0f;
	uFlags						= flags;
	Initialize	(pSettings->r_string(section,"shader"),pSettings->r_string(section,"texture"));
	if (pSettings->line_exist(section,"size")){
		float sz = pSettings->r_float(section,"size");
		if (uFlags&fsDeviceIndependent)	SetHeightI(sz);
		else							SetHeight(sz);
	}
	if (pSettings->line_exist(section,"interval"))
		SetInterval(pSettings->r_fvector2(section,"interval"));
}
示例#5
0
文件: antiidle.cpp 项目: jimloco/znc
	virtual void OnModCommand( const CString& sCommand )
	{
		CString sCmdName = sCommand.Token(0).AsLower();
		if(sCmdName == "set")
		{
			CString sInterval = sCommand.Token(1, true);
			SetInterval(sInterval.ToInt());

			if(m_uiInterval == 0)
				PutModule("AntiIdle is now turned off.");
			else
				PutModule("AntiIdle is now set to " + CString(m_uiInterval) + " seconds.");
		} else if(sCmdName == "off") {
			SetInterval(0);
			PutModule("AntiIdle is now turned off");
		} else if(sCmdName == "show") {
			if(m_uiInterval == 0)
				PutModule("AntiIdle is turned off.");
			else
				PutModule("AntiIdle is set to " + CString(m_uiInterval) + " seconds.");
		} else {
			PutModule("Commands: set, off, show");
		}
	}
示例#6
0
文件: GameFont.cpp 项目: 2asoft/xray
CGameFont::CGameFont(LPCSTR section, u32 flags)
{
	pFontRender					= RenderFactory->CreateFontRender();
	fCurrentHeight				= 0.0f;
	fXStep						= 0.0f;
	fYStep						= 0.0f;
	uFlags						= flags;
	nNumChars					= 0x100;
	TCMap						= NULL;
	Initialize	(pSettings->r_string(section,"shader"),pSettings->r_string(section,"texture"));
	if (pSettings->line_exist(section,"size")){
		float sz = pSettings->r_float(section,"size");
		if (uFlags&fsDeviceIndependent)	SetHeightI(sz);
		else							SetHeight(sz);
	}
	if (pSettings->line_exist(section,"interval"))
		SetInterval(pSettings->r_fvector2(section,"interval"));
}
示例#7
0
// Initializes the event class.
HRESULT CSampleEvents::Initialize(ISensorClassExtension *pSensorCXT, CSensorDdi* pDdi,
                                        ULONG ulCurrentInterval)
{
    HRESULT hr = S_OK;

    if(NULL == pSensorCXT || NULL == pDdi)
    {
        return E_POINTER;
    }

    SetInterval((DWORD) ulCurrentInterval);

    // Cache the pointers to the class extension and DDI callback class.
    m_spSensorCXT = pSensorCXT;
    m_pDdi = pDdi;

	// Create the event used to close the thread.
    m_hCloseThread = ::CreateEvent(NULL, FALSE, FALSE, TEXT("CloseThreadEvent"));

    if(NULL == m_hCloseThread)
    {
        hr = E_UNEXPECTED;
    }

    if(SUCCEEDED(hr))
    {
        m_hEventThread = ::CreateThread(NULL,                        // Cannot be inherited by child process
                            0,                                       // Default stack size
                            &CSampleEvents::_EventThreadProc,     // Thread proc
                            (LPVOID)this,                            // Thread proc argument
                            0,                                       // Starting state = running
                            NULL);                                   // No thread identifier
       
        if(NULL == m_hEventThread)
        {
            hr = E_UNEXPECTED;
        }
    }

    return hr;
};
示例#8
0
bool IdsSourceSink::StartAcquisition(QString dev)
{
    if (dev!="IDS") qDebug()<<"Different devices not yet implemented";

    is_SetExternalTrigger (hCam, IS_SET_TRIGGER_OFF); //This makes that calling freeze image creates a new image

#ifdef Q_OS_WIN32
    hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
    is_InitEvent(hCam, hEvent, IS_SET_EVENT_FRAME);
#endif

    is_EnableEvent(hCam, IS_SET_EVENT_FRAME);
    is_CaptureVideo(hCam, IS_WAIT);


    //this is to make it correspond to the default value in the gui
    SetInterval(100);
    SetShutter(100);

    return true;
}
示例#9
0
void TwitterWireMasterBegin() {
    WireBegin();
    TwitterWireMasterEnabled = 1;

    SetInterval(100/3, TwitterWireMasterRequestSlave);
}
示例#10
0
void Timer::SetTime(long sec, long nsec)
{
	SetValue(sec, nsec);
	SetInterval(sec, nsec);
	timer_settime(timer_id, 0, &timerspec, NULL);
}
示例#11
0
void LedCounterBegin() {
    TRISA = 0;
    
    SetInterval(200, CountUp);
}
示例#12
0
 TrefoilKnot(float scale) : m_scale(scale)
 {
     ParametricInterval interval = { ivec2(60, 15), vec2(TwoPi, TwoPi), vec2(100, 8) };
     SetInterval(interval);
 }
示例#13
0
 Sphere(float radius) : m_radius(radius)
 {
     ParametricInterval interval = { ivec2(20, 20), vec2(Pi, TwoPi), vec2(20, 35) };
     SetInterval(interval);
 }
示例#14
0
 Cone(float height, float radius) : m_height(height), m_radius(radius)
 {
     ParametricInterval interval = { ivec2(20, 20), vec2(TwoPi, 1), vec2(30, 20) };
     SetInterval(interval);
 }
示例#15
0
 MobiusStrip(float scale) : m_scale(scale)
 {
     ParametricInterval interval = { ivec2(40, 20), vec2(TwoPi, TwoPi), vec2(40, 15) };
     SetInterval(interval);
 }
示例#16
0
 KleinBottle(float scale) : m_scale(scale)
 {
     ParametricInterval interval = { ivec2(20, 20), vec2(TwoPi, TwoPi), vec2(15, 50) };
     SetInterval(interval);
 }
示例#17
0
CServerService::CServerService(const TcpHostInfo& tcpListen) : m_tcpListenInfo(tcpListen), m_tcpSocket()
{
	SetInterval(1000);
}
示例#18
0
 Quad(float width, float height) : m_size(width, height)
 {
     ParametricInterval interval = { ivec2(2, 2), vec2(1, 1), vec2(1, 1) };
     SetInterval(interval);
 }
void CASScheduler::SetInterval( const std::string& szFunctionName, float flRepeatTime, int iRepeatCount, asUINT uiStartIndex, asIScriptGeneric& arguments )
{
	SetInterval( nullptr, 0, szFunctionName, flRepeatTime, iRepeatCount, uiStartIndex, arguments );
}
示例#20
0
文件: timer.cpp 项目: vseryakov/lmbox
int TimerObject::pset_Interval(Variant value)
{
    SetInterval(value);
    return 0;
}
示例#21
0
文件: antiidle.cpp 项目: jimloco/znc
	virtual bool OnLoad(const CString& sArgs, CString& sErrorMsg)
	{
		if(!sArgs.Trim_n().empty())
			SetInterval(sArgs.ToInt());
		return true;
	}