/*** Client Constructors ** ** Synopsis: This will constuct a Client Class pointed to by a URL and port number. ** This is a Digilent extension as the URL will use DNS to discover the target IP address ** ** Parameters: ** szip - pointer to a URL or string form of an IP address. ** port - the port to connect to. ** ** Description: ** See http://arduino.cc/en/Reference/ClientConstructor */ Client::Client(const char *szip, uint16_t port) { PrivateInit(); _szURL = (char *) malloc(strlen(szip) + 1); strcpy(_szURL, szip); _port = port; }
void ZenFWRenderer::InitForEditor(WindowHandle_t windowHandle) { #ifdef WIN32 extern WindowHandle_t GEditorWindowHandle; GEditorWindowHandle = windowHandle; #endif #ifdef MAC_OS GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #else #ifdef LINUX GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #else GDD = (IDisplayDevice*)_New(ZDisplayDeviceDX9); //GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #endif #endif INITPARAMS RendererInitParams; GConfig->BuildInitParams(&RendererInitParams); RendererInitParams.fullscreen = false; GDD->Create(&RendererInitParams); mRenderProfile = RendererInitParams.RenderProfile; PrivateInit(RendererInitParams); }
////////////////////////////////////////////////////////////////////////// // Directed Position ////////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////////// void CDirectedInterpolator::Init(void) { PrivateInit(); msDir1 = msDir2 = SFloat3(0,0,0); mfDir1Length = 1.0f; mfDir2Length = -1.0f; }
//====================================================================== //====================================================================== NvUIGraphic::NvUIGraphic(const std::string& texname, float dstw/*==0*/, float dsth/*==0*/) { StaticInit(); PrivateInit(); LoadTexture(texname); if (dstw!=0) SetDimensions(dstw, dsth); }
//====================================================================== //====================================================================== NvUIGraphic::NvUIGraphic(uint32_t texId, bool alpha, uint32_t srcw, uint32_t srch, float dstw/*==0*/, float dsth/*==0*/) { StaticInit(); PrivateInit(); SetTextureID(texId, alpha, srcw, srch); if (dstw!=0) SetDimensions(dstw, dsth); }
/*** void PrivateReset(void) ** ** Synopsis: This is a private method used to safely clean up ** an exiting client so that a copy can be done to it. ** in particular, freeing the string ** ** Parameters: ** None ** ** Return Values: ** None ** ** Errors: ** ** Description: ** */ void Client::PrivateReset(void) { if(_szURL != NULL) { free(_szURL); _szURL = NULL; } PrivateInit(); }
//====================================================================== //====================================================================== NvUIButton::NvUIButton(NvUIButtonType::Enum btntype, uint32_t actionCode, NvUIRect &size, const char *title, float pt, bool shadowed/*==false*/) { PrivateInit(btntype, actionCode); m_rect = size; if (title!=NULL) SetTitle(title, pt, shadowed); }
//====================================================================== //====================================================================== NvUIGraphic::NvUIGraphic(NvUITexture *uiTex, float dstw/*==0*/, float dsth/*==0*/) { StaticInit(); PrivateInit(); m_tex = uiTex; m_tex->AddRef(); if (dstw!=0) SetDimensions(dstw, dsth); else SetDimensions((float)m_tex->GetWidth(), (float)m_tex->GetHeight()); }
//====================================================================== //====================================================================== NvUIButton::NvUIButton(NvUIButtonType::Enum btntype, uint32_t actionCode, NvUIElement *visrep, const char *title/*==NULL*/, float ptsize/*==0*/, bool shadowed/*==false*/) { PrivateInit(btntype, actionCode); m_visrep[0] = visrep; if (m_visrep[0]) // grab the active visrep's rectangle. m_visrep[0]->GetScreenRect(m_rect); if (title!=NULL) SetTitle(title, ptsize, shadowed); }
void ZenFWRenderer::Init() { #ifdef MAC_OS GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #else #ifdef LINUX GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #else GDD = (IDisplayDevice*)_New(ZDisplayDeviceDX9); //GDD = (IDisplayDevice*)_New(ZDisplayDeviceOGL); #endif #endif INITPARAMS RendererInitParams; GConfig->BuildInitParams(&RendererInitParams); GDD->Create(&RendererInitParams); mRenderProfile = RendererInitParams.RenderProfile; PrivateInit(RendererInitParams); }
//====================================================================== //====================================================================== NvUIButton::NvUIButton(NvUIButtonType::Enum btntype, uint32_t actionCode, NvUIElement *states[NvUIButtonState::MAX], const char *title/*==NULL*/, float pt/*==0*/, bool shadowed/*==false*/) { PrivateInit(btntype, actionCode); for (int32_t c=0; c<NvUIButtonState::MAX; c++) m_visrep[c] = states[c]; if (m_visrep[1] == NULL) SetMaxDrawState(0); // just base else if (m_visrep[2] == NULL) SetMaxDrawState(1); // just base+pressed else SetMaxDrawState(2); // if all three. if (m_visrep[0]) // grab the active visrep's rectangle. m_visrep[0]->GetScreenRect(m_rect); if (title!=NULL) SetTitle(title, pt, shadowed); }
////////////////////////////////////////////////////////////////////////// // Linear Position ////////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////////// void CLinearPositionInterpolator::Init(void) { PrivateInit(); }
////////////////////////////////////////////////////////////////////////// // Rotation Animation ////////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////////// void CRotationInterpolator::Init(void) { PrivateInit(); }
/*** Client Constructors ** ** Synopsis: This will construct a Client Class to represent a TCPIP connection on a specific socket. ** This is a private constructor. ** ** Parameters: ** hTCP - socket to use. ** ** Description: ** */ Client::Client(TCP_SOCKET hTCP) { PrivateInit(); _hTCP = hTCP; }
/*** Client Constructors ** ** Synopsis: This will construct a Client Class to represent an invalid socket ** ** Parameters: ** None ** ** Description: ** */ Client::Client() { PrivateInit(); }
/*** Copy Constructor ** ** Synopsis: Uses the assignment operator to copy to another instance of the client ** ** Parameters: ** otherClient - the existing instance of the client ** ** Return Values: ** None ** ** Errors: ** ** Description: ** */ Client::Client(const Client& otherClient) { PrivateInit(); // must be called as the this does not call the default constructor to init. *this = otherClient; // use the assigment operator to do the copy. }
void CMesh::Init(void) { PrivateInit(); }
/*** Client Constructors ** ** Synopsis: This will constuct a Client Class pointed to 4 byte IP address and port number ** ** Parameters: ** ip - pointer to a 4 byte target IP address ** port - the port to connect to. ** ** Description: ** See http://arduino.cc/en/Reference/ClientConstructor */ Client::Client(uint8_t *ip, uint16_t port) { PrivateInit(); _ip = *((unsigned int *) ip); _port = port; }