COVISE Core
coDoPoints.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_POINTS_H
9#define CO_DO_POINTS_H
10
11#include "coDoCoordinates.h"
12
13/*
14 $Log: covise_unstr.h,v $
15 * Revision 1.1 1993/09/25 20:52:42 zrhk0125
16 * Initial revision
17 *
18*/
19
20/***********************************************************************\
21 ** **
22 ** Untructured class Version: 1.0 **
23 ** **
24 ** **
25 ** Description : Classes for the handling of an unstructured grid **
26 ** and the data on it in a distributed manner. **
27 ** **
28 ** Classes : **
29 ** **
30 ** Copyright (C) 1993 by University of Stuttgart **
31 ** Computer Center (RUS) **
32 ** Allmandring 30 **
33 ** 7000 Stuttgart 80 **
34 ** **
35 ** **
36 ** Author : A. Wierse (RUS) **
37 ** **
38 ** History : **
39 ** 23.06.93 Ver 1.0 **
40 ** **
41 ** **
42\***********************************************************************/
43
44namespace covise
45{
46
48{
49 friend class coDoInitializer;
50 static coDistributedObject *virtualCtor(coShmArray *arr);
51
52private:
57
58protected:
59 int rebuildFromShm();
60 int getObjInfo(int, coDoInfo **) const;
61 coDoPoints *cloneObject(const coObjInfo &newinfo) const;
62
63public:
64 coDoPoints(const coObjInfo &info)
65 : coDoCoordinates(info, "POINTS")
66 {
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 coDoPoints(const coObjInfo &info, coShmArray *arr);
84 coDoPoints(const coObjInfo &info, int no);
85 coDoPoints(const coObjInfo &info, int no,
86 float *x, float *y, float *z);
87 int getNumPoints() const
88 {
89 return no_of_points;
90 }
91 int getNumElements() const
92 {
93 return no_of_points;
94 }
95 void getPointCoordinates(int no, float *xc, float *yc, float *zc) const
96 {
97 *xc = vx[no];
98 *yc = vy[no];
99 *zc = vz[no];
100 };
101 void getAddresses(float **x_c, float **y_c, float **z_c) const
102 {
103 *x_c = (float *)vx.getDataPtr();
104 *y_c = (float *)vy.getDataPtr();
105 *z_c = (float *)vz.getDataPtr();
106 };
107
108 int setSize(int numElem);
109};
110}
111#endif
#define DOEXPORT
Definition: coExport.h:331
GLdouble GLdouble z
Definition: khronos-glext.h:6565
GLint GLint GLint GLint GLint GLint y
Definition: khronos-glext.h:6346
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLint GLint GLint GLint GLint x
Definition: khronos-glext.h:6346
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: coDoCoordinates.h:48
Definition: coDoPoints.h:48
coFloatShmArray vz
Definition: coDoPoints.h:56
coFloatShmArray vy
Definition: coDoPoints.h:55
int getNumPoints() const
Definition: coDoPoints.h:87
coIntShm no_of_points
Definition: coDoPoints.h:53
int getNumElements() const
Definition: coDoPoints.h:91
void getPointCoordinates(int no, float *xc, float *yc, float *zc) const
Definition: coDoPoints.h:95
void getAddresses(float **x_c, float **y_c, float **z_c) const
Definition: coDoPoints.h:101
coDoPoints(const coObjInfo &info)
Definition: coDoPoints.h:64
coFloatShmArray vx
Definition: coDoPoints.h:54
Definition: covise_statics.cpp:55