ReactOS 0.4.16-dev-106-g10b08aa
rectBlock Class Reference

#include <rectBlock.h>

Public Member Functions

 rectBlock (gridBoundaryChain *left, gridBoundaryChain *right, Int beginVline, Int endVline)
 
 ~rectBlock ()
 
Int get_upGridLineIndex ()
 
Int get_lowGridLineIndex ()
 
Intget_leftIndices ()
 
Intget_rightIndices ()
 
Int num_quads ()
 
void print ()
 
void draw (Real *u_values, Real *v_values)
 

Private Attributes

Int upGridLineIndex
 
Int lowGridLineIndex
 
IntleftIndices
 
IntrightIndices
 

Detailed Description

Definition at line 39 of file rectBlock.h.

Constructor & Destructor Documentation

◆ rectBlock()

rectBlock::rectBlock ( gridBoundaryChain left,
gridBoundaryChain right,
Int  beginVline,
Int  endVline 
)

Definition at line 47 of file rectBlock.cc.

48{
49 Int i;
50
51
52 upGridLineIndex = left->getVlineIndex(beginVline);
53
54 lowGridLineIndex = left->getVlineIndex(endVline);
55
56 Int n = upGridLineIndex-lowGridLineIndex+1; //number of grid lines
57 leftIndices = (Int*) malloc(sizeof(Int) * n);
59 rightIndices = (Int*) malloc(sizeof(Int) * n);
61 for(i=0; i<n; i++)
62 {
63
64 leftIndices[i] = left->getInnerIndex(i+beginVline);
65 rightIndices[i] = right->getInnerIndex(i+beginVline);
66 }
67}
Int * leftIndices
Definition: rectBlock.h:42
Int lowGridLineIndex
Definition: rectBlock.h:41
Int upGridLineIndex
Definition: rectBlock.h:40
Int * rightIndices
Definition: rectBlock.h:43
#define malloc
Definition: debug_ros.c:4
int Int
Definition: definitions.h:37
#define assert(x)
Definition: debug.h:53
GLdouble n
Definition: glext.h:7729
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

◆ ~rectBlock()

rectBlock::~rectBlock ( )

Definition at line 70 of file rectBlock.cc.

71{
74}
#define free
Definition: debug_ros.c:5

Member Function Documentation

◆ draw()

void rectBlock::draw ( Real u_values,
Real v_values 
)

Definition at line 88 of file rectBlock.cc.

89{
90 Int i,j,k;
91 //upgrid line to bot grid line
92#ifdef DEBUG
93printf("upGridLineIndex=%i, lowGridLineIndex=%i\n", upGridLineIndex, lowGridLineIndex);
94#endif
95 for(k=0, i=upGridLineIndex; i > lowGridLineIndex; i--, k++)
96 {
98
99 for(j=leftIndices[k+1]; j<= rightIndices[k+1]; j++)
100 {
101 glVertex2f(u_values[j], v_values[i]);
102 glVertex2f(u_values[j], v_values[i-1]);
103 }
104 glEnd();
105 }
106}
#define printf
Definition: freeldr.h:97
GLAPI void GLAPIENTRY glVertex2f(GLfloat x, GLfloat y)
GLAPI void GLAPIENTRY glBegin(GLenum mode)
GLAPI void GLAPIENTRY glEnd(void)
#define GL_QUAD_STRIP
Definition: gl.h:198
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
int k
Definition: mpi.c:3369

◆ get_leftIndices()

Int * rectBlock::get_leftIndices ( )
inline

Definition at line 51 of file rectBlock.h.

51{return leftIndices;}

◆ get_lowGridLineIndex()

Int rectBlock::get_lowGridLineIndex ( )
inline

Definition at line 50 of file rectBlock.h.

50{return lowGridLineIndex;}

◆ get_rightIndices()

Int * rectBlock::get_rightIndices ( )
inline

Definition at line 52 of file rectBlock.h.

52{return rightIndices;}

◆ get_upGridLineIndex()

Int rectBlock::get_upGridLineIndex ( )
inline

Definition at line 49 of file rectBlock.h.

49{return upGridLineIndex;}

◆ num_quads()

Int rectBlock::num_quads ( )

Definition at line 109 of file rectBlock.cc.

110{
111 Int ret=0;
112 Int k,i;
113 for(k=0, i=upGridLineIndex; i>lowGridLineIndex; i--, k++)
114 {
115 ret += (rightIndices[k+1]-leftIndices[k+1]);
116 }
117 return ret;
118}
int ret

◆ print()

void rectBlock::print ( )

Definition at line 76 of file rectBlock.cc.

77{
78 Int i;
79 printf("block:\n");
81 {
82 printf("gridline %i, (%i,%i)\n", i, leftIndices[upGridLineIndex-i], rightIndices[upGridLineIndex-i]);
83 }
84}

Member Data Documentation

◆ leftIndices

Int* rectBlock::leftIndices
private

Definition at line 42 of file rectBlock.h.

Referenced by draw(), get_leftIndices(), num_quads(), print(), rectBlock(), and ~rectBlock().

◆ lowGridLineIndex

Int rectBlock::lowGridLineIndex
private

Definition at line 41 of file rectBlock.h.

Referenced by draw(), get_lowGridLineIndex(), num_quads(), print(), and rectBlock().

◆ rightIndices

Int* rectBlock::rightIndices
private

Definition at line 43 of file rectBlock.h.

Referenced by draw(), get_rightIndices(), num_quads(), print(), rectBlock(), and ~rectBlock().

◆ upGridLineIndex

Int rectBlock::upGridLineIndex
private

Definition at line 40 of file rectBlock.h.

Referenced by draw(), get_upGridLineIndex(), num_quads(), print(), and rectBlock().


The documentation for this class was generated from the following files: