73{
74 char *cname,*cname2,*ccomment;
75 int cname_len,cname_len1,ccomment_len;
76 int i,cpt_size;
77 float node[3];
78 H3D_ID node_id;
79 unsigned int elem_count = 1;
80
81 cname_len = *size1 + 1;
82 cname=(char*) malloc(sizeof(char)*cname_len);
83 for(i=0;i<*size1;i++) cname[i] = name1[i];
84
85 cpt_size = 0;
86 for(i=0;i<*size1;i++)
87 {
88 if(name1[i] != ' ') cpt_size = i;
89 }
90 cname[cpt_size+1]='\0';
91
92 ccomment_len = *s_comment + 1;
93 ccomment=(char*) malloc(sizeof(char)*ccomment_len);
94 for(i=0;i<*s_comment;i++) ccomment[i] = comment[i];
95 ccomment[*s_comment]='\0';
96
97 char * LAYERPOOL = new char [100];
98 LAYERPOOL[0] ='\0';
99 char * LAYER_STRING = new char [100];
100 LAYER_STRING[0] ='\0';
101 char * NUVAR_STRING = new char [100];
102 NUVAR_STRING[0] ='\0';
103 char * IR_STRING = new char [100];
104 IR_STRING[0] ='\0';
105 char * IS_STRING = new char [100];
106 IS_STRING[0] ='\0';
107 char * IT_STRING = new char [100];
108 IT_STRING[0] ='\0';
109 char * MID_STRING = new char [100];
110 MID_STRING[0] ='\0';
111 char * RES_STRING = new char [100];
112 RES_STRING[0] ='\0';
113
114 H3D_ID layer_pool_id = H3D_NULL_ID;
115
116
117#ifdef _WIN64
118 strcat_s(RES_STRING,100,cname);
119#else
120 RES_STRING = strcat(RES_STRING,cname);
121#endif
122 if(*nuvar > 0)
123 {
124 sprintf(NUVAR_STRING, " %d ",*nuvar);
125#ifdef _WIN64
126 strcat_s(RES_STRING,100,NUVAR_STRING);
127#else
128 RES_STRING = strcat(RES_STRING,NUVAR_STRING);
129#endif
130 }
131
132
134
135
136
137
138
139 try {
140
142
145
147
149 sprintf(
edata_type, RES_STRING, H3D_DT_DELIMITER);
150
154
155 if (strlen(ccomment) != 0)
156 {
159 }
160
164
168
171
172 }
173
174 catch(...) {
176 }
177 delete [] LAYERPOOL;
178 delete [] LAYER_STRING;
179 delete [] NUVAR_STRING;
180 delete [] IR_STRING;
181 delete [] IS_STRING;
182 delete [] IT_STRING;
183 delete [] MID_STRING;
184 delete [] RES_STRING;
185
186
187
188 free(cname);
189 free(ccomment);
190
191}
H3D_TENSOR_TYPE tensor_type
bool Hyper3DDatatypePools(H3DFileInfo *h3d_file, H3D_ID dt_id, H3D_ID poolname_id, unsigned int num_layers, H3D_ID *layername_ids, bool corners, H3D_TENSOR_TYPE tensor_type, float poisson)
bool Hyper3DDatatypeEnd(H3DFileInfo *h3d_file)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DDatatypeDescriptionWrite(H3DFileInfo *h3d_file, H3D_ID dt_id, const char *description)
bool Hyper3DDatatypeWrite(H3DFileInfo *h3d_file, const char *label, H3D_ID dt_id, H3D_DS_FORMAT format, H3D_DS_TYPE type, unsigned int num_pools)
bool Hyper3DDatatypeBegin(H3DFileInfo *h3d_file, unsigned int count)