COVISE Core
coDoLines.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_LINES_H
9#define CO_DO_LINES_H
10
11#include "coDoGrid.h"
12#include "coDoPoints.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\***********************************************************************/
44namespace covise
45{
46
48{
49 friend class coDoInitializer;
50 static coDistributedObject *virtualCtor(coShmArray *arr);
55
56protected:
58 int rebuildFromShm();
59 int getObjInfo(int, coDoInfo **) const;
60 coDoLines *cloneObject(const coObjInfo &newinfo) const;
61
62public:
63 coDoLines(const coObjInfo &info)
64 : coDoGrid(info, "LINES")
65 {
67 if (name)
68 {
69 if (getShmArray() != 0)
70 {
71 if (rebuildFromShm() == 0)
72 {
73 print_comment(__LINE__, __FILE__, "rebuildFromShm == 0");
74 }
75 }
76 else
77 {
78 print_comment(__LINE__, __FILE__, "object %s doesn't exist", name);
79 new_ok = 0;
80 }
81 }
82 };
83 coDoLines(const coObjInfo &info, coShmArray *arr);
84 coDoLines(const coObjInfo &info, int no_p, int no_v, int no_l);
85 coDoLines(const coObjInfo &info, int no_p,
86 float *x_c, float *y_c, float *z_c, int no_v, int *v_l,
87 int no_l, int *l_l);
88 int getNumLines() const
89 {
90 return no_of_lines;
91 }
92 int setNumLines(int num_elem);
93 int getNumVertices() const
94 {
95 return no_of_vertices;
96 }
97 int setNumVertices(int num_elem);
98 int getNumPoints() const
99 {
100 return points->getNumPoints();
101 }
103 {
104 return points->setSize(num);
105 };
106 void getAddresses(float **x_c, float **y_c, float **z_c, int **v_l, int **l_l) const
107 {
108 points->getAddresses(x_c, y_c, z_c);
109 *v_l = (int *)vertex_list.getDataPtr();
110 *l_l = (int *)line_list.getDataPtr();
111 };
112};
113}
114#endif
#define DOEXPORT
Definition: coExport.h:331
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLuint GLuint num
Definition: khronos-glext.h:10593
GLsizei const GLfloat * points
Definition: khronos-glext.h:9066
list of all chemical elements
Definition: coConfig.h:27
static coShmArray * getShmArray(const char *name)
Definition: coDistributedObject.cpp:60
void print_comment(int line, const char *filename, const char *fmt,...)
Definition: coLog.cpp:25
Definition: coObjID.h:231
Definition: covise_shm.h:482
void * getDataPtr() const
Definition: covise_shm.h:543
Definition: coDistributedObject.h:267
Definition: coDistributedObject.h:296
Definition: coDoGrid.h:17
Definition: coDoLines.h:48
int getNumPoints() const
Definition: coDoLines.h:98
coIntShmArray vertex_list
Definition: coDoLines.h:52
coIntShm no_of_vertices
Definition: coDoLines.h:51
int getNumLines() const
Definition: coDoLines.h:88
coIntShmArray line_list
Definition: coDoLines.h:54
coDoPoints * points
Definition: coDoLines.h:57
int setNumPoints(int num)
Definition: coDoLines.h:102
coIntShm no_of_lines
Definition: coDoLines.h:53
void getAddresses(float **x_c, float **y_c, float **z_c, int **v_l, int **l_l) const
Definition: coDoLines.h:106
coDoLines(const coObjInfo &info)
Definition: coDoLines.h:63
int getNumVertices() const
Definition: coDoLines.h:93
Definition: coDoPoints.h:48
Definition: covise_statics.cpp:55