COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coDoTriangleStrips.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef CO_DO_TRIANGLESTRIPS_H
9 #define CO_DO_TRIANGLESTRIPS_H
10 
11 #include "coDoGrid.h"
12 #include "coDoLines.h"
13 
14 /*
15  $Log: covise_unstr.h,v $
16  * Revision 1.1 1993/09/25 20:52:42 zrhk0125
17  * Initial revision
18  *
19 */
20 
21 /***********************************************************************\
22  ** **
23  ** Untructured class Version: 1.0 **
24  ** **
25  ** **
26  ** Description : Classes for the handling of an unstructured grid **
27  ** and the data on it in a distributed manner. **
28  ** **
29  ** Classes : **
30  ** **
31  ** Copyright (C) 1993 by University of Stuttgart **
32  ** Computer Center (RUS) **
33  ** Allmandring 30 **
34  ** 7000 Stuttgart 80 **
35  ** **
36  ** **
37  ** Author : A. Wierse (RUS) **
38  ** **
39  ** History : **
40  ** 23.06.93 Ver 1.0 **
41  ** **
42  ** **
43 \***********************************************************************/
44 namespace covise
45 {
46 
48 {
49  friend class coDoInitializer;
50  static coDistributedObject *virtualCtor(coShmArray *arr);
51 
52 protected:
54  int rebuildFromShm();
55  int getObjInfo(int, coDoInfo **) const;
56  coDoTriangleStrips *cloneObject(const coObjInfo &info) const;
57 
58 public:
60  : coDoGrid(info, "TRIANG")
61  {
62  lines = new coDoLines(coObjInfo());
63  if (name)
64  {
65  if (getShmArray() != 0)
66  {
67  if (rebuildFromShm() == 0)
68  {
69  print_comment(__LINE__, __FILE__, "rebuildFromShm == 0");
70  }
71  }
72  else
73  {
74  print_comment(__LINE__, __FILE__, "object %s doesn't exist", name);
75  new_ok = 0;
76  }
77  }
78  };
79  coDoTriangleStrips(const coObjInfo &info, coShmArray *arr);
80  coDoTriangleStrips(const coObjInfo &info, int no_p, int no_v, int no_l);
81  coDoTriangleStrips(const coObjInfo &info, int no_p, float *x_c,
82  float *y_c, float *z_c, int no_v, int *v_l, int no_pol, int *pol_l);
83  int getNumStrips() const
84  {
85  return lines->getNumLines();
86  }
87  int setNumStrips(int num)
88  {
89  return lines->setNumLines(num);
90  }
91  int getNumVertices() const
92  {
93  return lines->getNumVertices();
94  }
96  {
97  return lines->setNumVertices(num);
98  }
99  int getNumPoints() const
100  {
101  return lines->getNumPoints();
102  }
103  int setNumPoints(int num)
104  {
105  return lines->setNumPoints(num);
106  }
107  void getAddresses(float **x_c, float **y_c, float **z_c, int **v_l, int **l_l) const
108  {
109  lines->getAddresses(x_c, y_c, z_c, v_l, l_l);
110  }
111 };
112 }
113 #endif
int getNumPoints() const
Definition: coDoTriangleStrips.h:99
Definition: coDoGrid.h:16
GLuint const GLchar * name
Definition: khronos-glext.h:6722
Definition: covise_shm.h:481
int setNumPoints(int num)
Definition: coDoTriangleStrips.h:103
Definition: covise_statics.cpp:54
Definition: coObjID.h:230
coDoTriangleStrips(const coObjInfo &info)
Definition: coDoTriangleStrips.h:59
int getNumStrips() const
Definition: coDoTriangleStrips.h:83
Definition: coDistributedObject.h:266
int setNumStrips(int num)
Definition: coDoTriangleStrips.h:87
#define DOEXPORT
Definition: coExport.h:307
coDoLines * lines
Definition: coDoTriangleStrips.h:53
void print_comment(int line, const char *filename, const char *fmt,...)
Definition: coLog.cpp:25
Definition: coDoLines.h:47
int setNumVertices(int num)
Definition: coDoTriangleStrips.h:95
Definition: coDistributedObject.h:295
static coShmArray * getShmArray(const char *name)
Definition: coDistributedObject.cpp:60
int getNumVertices() const
Definition: coDoTriangleStrips.h:91
Definition: coDoTriangleStrips.h:47
GLuint GLuint num
Definition: khronos-glext.h:10593
void getAddresses(float **x_c, float **y_c, float **z_c, int **v_l, int **l_l) const
Definition: coDoTriangleStrips.h:107