Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

ExNihilo Namespace Reference


Data Structures

struct  ExObjectInfo

Typedefs

typedef long ExId
typedef std::pair< ExId, std::string > IdName

Functions

void InitBasicObjectList (void)
void InitString (void)
void RenderBitmapString (float x, float y, void *font, std::string string)
void EnterOrthoMode (void)
void LeaveOrthoMode (void)
std::string ExtracValueFromSring (std::string buffstring, std::string start, std::string end)
int ExtractIntValueFromSring (std::string buffstring, std::string start, std::string end)
float ExtractFloatValueFromSring (std::string buffstring, std::string start, std::string end)
std::string ExtracStringValueFromFile (std::string FileName, std::string start, std::string end)
int ExtractIntValueFromFile (std::string FileName, std::string start, std::string end)
float ExtractFloatValueFromFile (std::string FileName, std::string start, std::string end)
int ExtracStringCommandFromString (std::string FileName, std::string command, std::string &TargetString)
int ExtracStringCommandFromFile (std::string FileName, std::string command, std::string &TargetString)
void WriteToScreen (float x, float y, std::string String)
void WriteToScreen (float x, float y, float r, float g, float b, std::string String)
void WriteToScreen24 (float x, float y, float r, float g, float b, std::string String)
void DrawCadre (float x, float y, float lx, float ly, float r, float g, float b, float blend)


Typedef Documentation

typedef long ExId
 

Definition at line 41 of file include/Object/ExNihiloNameSpace.h.

Referenced by ExManagerCam::GetIdByName().

typedef std::pair< ExId, std::string > IdName
 

Definition at line 42 of file include/Object/ExNihiloNameSpace.h.


Function Documentation

void DrawCadre float    x,
float    y,
float    lx,
float    ly,
float    r,
float    g,
float    b,
float    blend
 

Definition at line 134 of file src/Object/ExNihiloNameSpace.cpp.

References EnterOrthoMode(), and LeaveOrthoMode().

Referenced by ExCMenu::Draw(), and ExManagerWindow::ShowFps().

00135 {
00136         ExNihilo::EnterOrthoMode();
00137         glPushAttrib(GL_ALL_ATTRIB_BITS);
00138         glDisable(GL_LIGHTING);
00139         glEnable(GL_BLEND);
00140         glEnable(GL_ALPHA);
00141         glBlendFunc(GL_ONE,GL_ONE);
00142         glEnable(GL_ALPHA_TEST);
00143         glAlphaFunc(GL_GREATER,0);
00144         glDisable(GL_DEPTH_TEST);
00145         glColor4f(r,g,b,blend);
00146         glBegin(GL_QUADS);
00147                 glVertex2f(x,y);
00148                 glVertex2f(x,y+ly);
00149                 glVertex2f(x+lx,y+ly);
00150                 glVertex2f(x+lx,y);
00151         glEnd();
00152         glDisable(GL_BLEND);
00153         glDisable(GL_ALPHA);
00154         glEnable(GL_DEPTH_TEST);
00155         glBegin(GL_LINE_STRIP);
00156                 glVertex2f(x,y);
00157                 glVertex2f(x,y+ly);
00158                 glVertex2f(x+lx,y+ly);
00159                 glVertex2f(x+lx,y);
00160                 glVertex2f(x,y);
00161         glEnd();
00162         glPopAttrib();
00163         ExNihilo::LeaveOrthoMode();
00164 }

void EnterOrthoMode void   
 

Definition at line 74 of file ExPredefinedObject.cpp.

Referenced by ExManagerNetwork::Draw(), ExManagerConsole::Draw(), ExCInterface::Draw(), DrawCadre(), WriteToScreen(), and WriteToScreen24().

00075 {
00076         glMatrixMode(GL_PROJECTION);                                            
00077         glPushMatrix();                                                                 
00078         glLoadIdentity();
00079         glOrtho( 0,glutGet(GLUT_WINDOW_WIDTH),glutGet(GLUT_WINDOW_HEIGHT),0,0,1);       
00080         glMatrixMode(GL_MODELVIEW);                                                             
00081         glLoadIdentity();                                                                               
00082 }

int ExtracStringCommandFromFile std::string    FileName,
std::string    command,
std::string &    TargetString
 

Definition at line 162 of file SDKInterface/ExNihiloNameSpace.cpp.

00164 {
00165         char buffer[255],b[256];memset(buffer,0,255);
00166         std::ifstream fin;
00167         std::string buffstring;
00168         fin.open(FileName.data(),std::ios::in);
00169         if(fin.is_open())
00170         {
00171                 try
00172                 {
00173                         do
00174                         {
00175                                 memset(b,0,255);
00176                                 fin.getline(b,256,'\n');
00177                                 buffstring=buffstring+b;
00178                         }while(!fin.eof());
00179                         fin.close();
00180                 }catch(...){throw ExCExpFileReadError();}
00181         }else throw   ExCExpFileNotFound();
00182 //      buffstring.copy(buffer,buffstring.find(end,buffstring.find(start)+start.size())-buffstring.find(start)-start.size(),buffstring.find(start)+start.size());
00183         TargetString=buffer;
00184         return 1;

int ExtracStringCommandFromString std::string    FileName,
std::string    command,
std::string &    TargetString
 

Definition at line 157 of file SDKInterface/ExNihiloNameSpace.cpp.

00159 {
00160         return 1;

std::string ExtracStringValueFromFile std::string    FileName,
std::string    start,
std::string    end
 

Definition at line 124 of file SDKInterface/ExNihiloNameSpace.cpp.

00126 {
00127         char buffer[255],b[256];memset(buffer,0,255);
00128         std::ifstream fin;
00129         std::string buffstring;
00130         fin.open(FileName.data(),std::ios::in);
00131         if(fin.is_open())
00132         {
00133                 try
00134                 {
00135                         do
00136                         {
00137                                 memset(b,0,255);
00138                                 fin.getline(b,256,'\n');
00139                                 buffstring=buffstring+b;
00140                         }while(!fin.eof());
00141                         fin.close();
00142                 }catch(...){throw ExCExpFileReadError();}
00143         }else throw   ExCExpFileNotFound();
00144         buffstring.copy(buffer,buffstring.find(end,buffstring.find(start)+start.size())-buffstring.find(start)-start.size(),buffstring.find(start)+start.size());
00145         return buffer;

float ExtractFloatValueFromFile std::string    FileName,
std::string    start,
std::string    end
 

Definition at line 152 of file SDKInterface/ExNihiloNameSpace.cpp.

References data.

Referenced by ExCSystemeParticule::Load().

00154 {
00155         return atof(ExNihilo::ExtracStringValueFromFile(FileName,start,end).data());

float ExtractFloatValueFromSring std::string    buffstring,
std::string    start,
std::string    end
 

Definition at line 115 of file SDKInterface/ExNihiloNameSpace.cpp.

00117 {
00118         char buffer[255];
00119         memset(buffer,0,255);
00120         try{buffstring.copy(buffer,buffstring.find(end,buffstring.find(start)+start.size())-buffstring.find(start)-start.size(),buffstring.find(start)+start.size());}
00121         catch(...){throw ExCExpStringNotFound();}
00122         return atof(buffer);

int ExtractIntValueFromFile std::string    FileName,
std::string    start,
std::string    end
 

Definition at line 147 of file SDKInterface/ExNihiloNameSpace.cpp.

References data.

Referenced by ExCSystemeParticule::Load().

00149 {
00150         return atoi(ExNihilo::ExtracStringValueFromFile(FileName,start,end).data());

int ExtractIntValueFromSring std::string    buffstring,
std::string    start,
std::string    end
 

Definition at line 106 of file SDKInterface/ExNihiloNameSpace.cpp.

Referenced by ExManagerCommand::LoadExecFile(), ExCMenu::LoadFile(), ExCInterface::LoadFile(), and ExCMap::LoadMap().

00108 {
00109         char buffer[255];
00110         memset(buffer,0,255);
00111         try{buffstring.copy(buffer,buffstring.find(end,buffstring.find(start)+start.size())-buffstring.find(start)-start.size(),buffstring.find(start)+start.size());}
00112         catch(...){throw ExCExpStringNotFound();}
00113         return atoi(buffer);

std::string ExtracValueFromSring std::string    buffstring,
std::string    start,
std::string    end
 

Definition at line 97 of file SDKInterface/ExNihiloNameSpace.cpp.

Referenced by ExCModelMD2::Load(), ExManagerCommand::LoadExecFile(), ExCMenu::LoadFile(), ExCInterface::LoadFile(), ExCMap::LoadMap(), ExManagerConsole::LoadStringActionFile(), and ExCModelASC::ProcessLine().

00099 {
00100         char buffer[255];
00101         memset(buffer,0,255);
00102         try{buffstring.copy(buffer,buffstring.find(end,buffstring.find(start)+start.size())-buffstring.find(start)-start.size(),buffstring.find(start)+start.size());}
00103         catch(...){throw ExCExpStringNotFound();}
00104         return buffer;

void InitBasicObjectList void   
 

Definition at line 26 of file ExPredefinedObject.cpp.

Referenced by SetGlutCallBack().

00027 {
00028         float i;        
00029         glNewList(GRILLE,GL_COMPILE);
00030         glDisable(GL_LIGHTING);
00031         glBegin(GL_LINES);
00032                 glColor3f(1.0f,0.0f,0.0f);
00033                 for ( i=-100;i<101;i++)
00034                 {       
00035                         glVertex3f(0.0f,      i, 100.0f);
00036                         glVertex3f(0.0f,      i,-100.0f);
00037                         glVertex3f(0.0f, 100.0f,      i);
00038                         glVertex3f(0.0f,-100.0f,      i);
00039                 }
00040                 glColor3f(0.0,1.0f,0.0f);
00041                 
00042                 for ( i=-100;i<101;i++)
00043                 {
00044                         glVertex3f( 100.0f,     i,0.0f);
00045                         glVertex3f(-100.0f,     i,0.0f);
00046                         glVertex3f(     i, 100.0f,0.0f);
00047                         glVertex3f(     i,-100.0f,0.0f);
00048                 }
00049                 glColor3f(0.0,0.0f,1.0f);
00050                 for (i=-100;i<101;i++)
00051                 {
00052                         glVertex3f( 100.0f,0.0f,      i);
00053                         glVertex3f(-100.0f,0.0f,      i);
00054                         glVertex3f(      i,0.0f, 100.0f);
00055                         glVertex3f(      i,0.0f,-100.0f);
00056                 }
00057         glEnd();
00058         glEnable(GL_LIGHTING);
00059         glEndList();
00060 
00061 
00062 }

void InitString void   
 

void LeaveOrthoMode void   
 

Definition at line 84 of file ExPredefinedObject.cpp.

Referenced by ExManagerNetwork::Draw(), ExManagerConsole::Draw(), ExCInterface::Draw(), DrawCadre(), WriteToScreen(), and WriteToScreen24().

00085 {
00086         glMatrixMode( GL_PROJECTION );                                                  
00087         glPopMatrix();                                                                                  
00088         glMatrixMode( GL_MODELVIEW );                                                   
00089 }

void RenderBitmapString float    x,
float    y,
void *    font,
std::string    string
 

Definition at line 63 of file SDKInterface/ExNihiloNameSpace.cpp.

Referenced by ExManagerNetwork::Draw(), ExManagerConsole::Draw(), WriteToScreen(), and WriteToScreen24().

00065 {
00066         const char *c;
00067         glRasterPos2f(x, y);
00068         for (c=string.data(); *c != '\0'; c++)
00069         {
00070            glutBitmapCharacter(font, *c);
00071         }

void WriteToScreen float    x,
float    y,
float    r,
float    g,
float    b,
std::string    String
 

Definition at line 98 of file src/Object/ExNihiloNameSpace.cpp.

References EnterOrthoMode(), LeaveOrthoMode(), and RenderBitmapString().

00099 {
00100         ExNihilo::EnterOrthoMode();
00101         glPushAttrib(GL_ALL_ATTRIB_BITS);
00102         glDisable(GL_LIGHTING);
00103         glEnable(GL_BLEND);
00104         glEnable(GL_ALPHA);
00105         glBlendFunc(GL_ONE,GL_ONE);
00106         glEnable(GL_ALPHA_TEST);
00107         glAlphaFunc(GL_GREATER,0);
00108         glDisable(GL_DEPTH_TEST);
00109         glColor4f(r,g,b,1.0f);
00110         ExNihilo::RenderBitmapString(x,y,(void *)GLUT_BITMAP_HELVETICA_12,String);
00111         glPopAttrib();
00112         ExNihilo::LeaveOrthoMode();
00113         
00114 }

void WriteToScreen float    x,
float    y,
std::string    String
 

Definition at line 90 of file SDKInterface/ExNihiloNameSpace.cpp.

References EnterOrthoMode(), LeaveOrthoMode(), and RenderBitmapString().

Referenced by ExCCameraChase::Draw(), and ExManagerWindow::ShowFps().

00092 {
00093         ExNihilo::EnterOrthoMode();
00094         ExNihilo::RenderBitmapString(x,y,(void *)GLUT_BITMAP_HELVETICA_12,String);
00095         ExNihilo::LeaveOrthoMode();

void WriteToScreen24 float    x,
float    y,
float    r,
float    g,
float    b,
std::string    String
 

Definition at line 116 of file src/Object/ExNihiloNameSpace.cpp.

References EnterOrthoMode(), LeaveOrthoMode(), and RenderBitmapString().

Referenced by ExCMenu::Draw().

00117 {
00118         ExNihilo::EnterOrthoMode();
00119         glPushAttrib(GL_ALL_ATTRIB_BITS);
00120         glDisable(GL_LIGHTING);
00121         glEnable(GL_BLEND);
00122         glEnable(GL_ALPHA);
00123         glBlendFunc(GL_ONE,GL_ONE);
00124         glEnable(GL_ALPHA_TEST);
00125         glAlphaFunc(GL_GREATER,0);
00126         glDisable(GL_DEPTH_TEST);
00127         glColor4f(r,g,b,1.0f);
00128         ExNihilo::RenderBitmapString(x,y,(void *)GLUT_BITMAP_TIMES_ROMAN_24,String);
00129         glPopAttrib();
00130         ExNihilo::LeaveOrthoMode();
00131         
00132 }


Generated on Tue Dec 10 18:20:51 2002 for ExNihilo by doxygen1.3-rc1