rViewportConfiguration Class Reference

#include <rViewport.h>

Collaboration diagram for rViewportConfiguration:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 rViewportConfiguration (rViewport *first)
 rViewportConfiguration (rViewport *first, rViewport *second)
 rViewportConfiguration (rViewport *first, rViewport *second, rViewport *third)
 rViewportConfiguration (rViewport *first, rViewport *second, rViewport *third, rViewport *forth)
void Select (int i)
rViewportPort (int i)

Static Public Member Functions

static void DemonstrateViewport (tString *titles)
static rViewportConfigurationCurrentViewportConfiguration ()
static rViewportCurrentViewport (int i)
static void UpdateConf ()

Public Attributes

const int num_viewports

Static Public Attributes

static int next_conf_num = 0
static rViewportConfigurations_viewportConfigurations []
static const int s_viewportNumConfigurations = 6
static char const * s_viewportConfigurationNames []

Private Attributes

rViewportviewports [MAX_VIEWPORTS]


Detailed Description

Definition at line 85 of file rViewport.h.


Constructor & Destructor Documentation

rViewportConfiguration::rViewportConfiguration ( rViewport first  ) 

Definition at line 115 of file rViewport.cpp.

References viewports.

00116         :num_viewports(1){
00117     viewports[0]=first;
00118 }

rViewportConfiguration::rViewportConfiguration ( rViewport first,
rViewport second 
)

Definition at line 120 of file rViewport.cpp.

References viewports.

00122         :num_viewports(2){
00123     viewports[0]=first;
00124     viewports[1]=second;
00125 }

rViewportConfiguration::rViewportConfiguration ( rViewport first,
rViewport second,
rViewport third 
)

Definition at line 127 of file rViewport.cpp.

References viewports.

00130         :num_viewports(3){
00131     viewports[0]=first;
00132     viewports[1]=second;
00133     viewports[2]=third;
00134 }

rViewportConfiguration::rViewportConfiguration ( rViewport first,
rViewport second,
rViewport third,
rViewport forth 
)

Definition at line 136 of file rViewport.cpp.

References viewports.

00140         :num_viewports(4){
00141     viewports[0]=first;
00142     viewports[1]=second;
00143     viewports[2]=third;
00144     viewports[3]=forth;
00145 }


Member Function Documentation

void rViewportConfiguration::Select ( int  i  ) 

Definition at line 148 of file rViewport.cpp.

References num_viewports, rViewport::Select(), and viewports.

Referenced by RenderAllViewports().

00148                                         {
00149     if (i>=0 && i <num_viewports)
00150         viewports[i]->Select();
00151 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rViewportConfiguration::DemonstrateViewport ( tString titles  )  [static]

Definition at line 211 of file rViewport.cpp.

References DisplayText(), glBegin, glEnd, next_conf_num, num_viewports, Port(), s_viewportConfigurations, rViewport::s_viewportDemonstation, rViewport::s_viewportFullscreen, rViewport::Select(), sr_fontMenu, and sr_glOut.

Referenced by ArmageTronPlayer_to_viewport_menuitem::RenderBackground(), and ArmageTron_viewport_menuitem::RenderBackground().

00211                                                                {
00212     if (!sr_glOut)
00213         return;
00214 
00215     for(int i=s_viewportConfigurations[next_conf_num]->num_viewports-1;i>=0;i--){
00216         rViewport sub(rViewport::s_viewportDemonstation,*(s_viewportConfigurations[next_conf_num]->Port(i)));
00217         sub.Select();
00218 
00219         glDisable(GL_TEXTURE_2D);
00220         glDisable(GL_DEPTH_TEST);
00221 
00222         glColor3f(.1,.1,.4);
00223         glRectf(-.9,-.9,.9,.9);
00224 
00225         glColor3f(.6,.6,.6);
00226         glBegin(GL_LINE_LOOP);
00227         glVertex2f(-1,-1);
00228         glVertex2f(-1,1);
00229         glVertex2f(1,1);
00230         glVertex2f(1,-1);
00231         glEnd();
00232 
00233         glColor3f(1,1,1);
00234         DisplayText(0,0,.5,titles[i], sr_fontMenu);
00235     }
00236 
00237     rViewport::s_viewportFullscreen.Select();
00238 }

Here is the call graph for this function:

Here is the caller graph for this function:

rViewport * rViewportConfiguration::Port ( int  i  ) 

Definition at line 154 of file rViewport.cpp.

References NULL, num_viewports, and viewports.

Referenced by CurrentViewport(), DemonstrateViewport(), display_cockpit_lucifer(), and RenderAllViewports().

00154                                              {
00155     if (i>=0 && i <num_viewports)
00156         return viewports[i];
00157     else
00158         return NULL;
00159 }

Here is the caller graph for this function:

rViewportConfiguration * rViewportConfiguration::CurrentViewportConfiguration (  )  [static]

Definition at line 202 of file rViewport.cpp.

References conf_num, s_viewportConfigurations, and s_viewportNumConfigurations.

Referenced by CurrentViewport(), display_cockpit_lucifer(), RenderAllViewports(), and se_DisplayChatLocallyClient().

00202                                                                             {
00203     if (conf_num<0) conf_num=0;
00204     if (conf_num>=s_viewportNumConfigurations)
00205         conf_num=s_viewportNumConfigurations-1;
00206 
00207     return s_viewportConfigurations[conf_num];
00208 }

Here is the caller graph for this function:

rViewport * rViewportConfiguration::CurrentViewport ( int  i  )  [static]

Definition at line 242 of file rViewport.cpp.

References CurrentViewportConfiguration(), and Port().

00242                                                         {
00243     return CurrentViewportConfiguration()->Port(i);
00244 }

Here is the call graph for this function:

void rViewportConfiguration::UpdateConf (  )  [static]

Definition at line 246 of file rViewport.cpp.

References conf_num, and next_conf_num.

Referenced by rViewport::Update().

00246                                        {
00247     conf_num = next_conf_num;
00248 }

Here is the caller graph for this function:


Member Data Documentation

rViewport* rViewportConfiguration::viewports[MAX_VIEWPORTS] [private]

Definition at line 86 of file rViewport.h.

Referenced by Port(), rViewportConfiguration(), and Select().

const int rViewportConfiguration::num_viewports

Definition at line 88 of file rViewport.h.

Referenced by rViewport::CorrectViewport(), DemonstrateViewport(), display_cockpit_lucifer(), Port(), se_DisplayChatLocallyClient(), and Select().

int rViewportConfiguration::next_conf_num = 0 [static]

Definition at line 90 of file rViewport.h.

Referenced by rViewport::CorrectViewport(), DemonstrateViewport(), ArmageTron_viewport_menuitem::Render(), ArmageTron_viewport_menuitem::RenderBackground(), UpdateConf(), and viewport_menu_x().

rViewportConfiguration * rViewportConfiguration::s_viewportConfigurations [static]

Initial value:

{
            &single_vp,&two_vp,&two_b,&three_a,&three_b,&four_vp}

Definition at line 103 of file rViewport.h.

Referenced by CurrentViewportConfiguration(), DemonstrateViewport(), and viewport_menu_x().

const int rViewportConfiguration::s_viewportNumConfigurations = 6 [static]

Definition at line 104 of file rViewport.h.

Referenced by CurrentViewportConfiguration(), ArmageTron_viewport_menuitem::Render(), and ArmageTron_viewport_menuitem::RenderBackground().

char const * rViewportConfiguration::s_viewportConfigurationNames [static]

Initial value:

    {"$viewport_conf_name_0",
     "$viewport_conf_name_1",
     "$viewport_conf_name_2",
     "$viewport_conf_name_3",
     "$viewport_conf_name_4",
     "$viewport_conf_name_5"}

Definition at line 105 of file rViewport.h.

Referenced by ArmageTron_viewport_menuitem::Render().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:54:44 2008 for Armagetron Advanced by  doxygen 1.5.4