From: Daniel S. <dsc...@ht...> - 2008-05-09 07:54:25
|
Hi, thxs for your answer. Now I have an error: tof_driver.cc:434: error: ‘struct player_pointcloud3d_element’ has no member named ‘px’ tof_driver.cc:435: error: ‘struct player_pointcloud3d_element’ has no member named ‘py’ tof_driver.cc:436: error: ‘struct player_pointcloud3d_element’ has no member named ‘pz’ Where are the decleration for those structs? What can I do instead? Thxs Daniel Am Freitag, 9. Mai 2008 09:10:54 schrieb Stefan Stiene: > Sorry, > of course: > > cloud_data.points[i].px = (double)value*delta_x; > > cloud_data.points[i].py = (double)(buffer_vert-rows)*delta_y; > > cloud_data.points[i].pz = (double) Buffer[buffer_hori*rows+value]; > > > Stefan > > Stefan Stiene schrieb: > > Hi, > > try something like this: > > > > player_pointcloud3d_data_t cloud_data; > > > > cloud_data.points_count = value; > > > > cloud_data.points=(player_pointcloud3d_element_t*)calloc(sizeof(cloud_dat > >a.points[0]),cloud_data.points_count); > > > > for(unsigned int i = 0; i < cloud_data.points_count; i++) { > > > > cloud_data.points->at(i).px = (double)value*delta_x; > > cloud_data.points->at(i).py = (double)(buffer_vert-rows)*delta_y; > > cloud_data.points->at(i).pz = (double) Buffer[buffer_hori*rows+value]; > > } > > int cloud_size = sizeof(player_pointcloud3d_data_t) + > > cloud_data.points_count * sizeof(player_pointcloud3d_element_t); > > //because sizeof can't deal with pointer > > > > Publish (device_addr, PLAYER_MSGTYPE_DATA, > > PLAYER_POINTCLOUD3D_DATA_STATE, &cloud_data, cloud_size, NULL); > > > > Stefan > > > > Daniel Schauer schrieb: > >> Am Donnerstag, 8. Mai 2008 09:08:11 schrieb Stefan Stiene: > >>> if (cloudProxy->IsFresh()) { > >> > >> Thx for your answer. Now the Problem is the Data I get are always zero > >> but they shouldn't! Maybe their is something wrong in the way I Publish > >> them?!? > >> > >> //*********** Code which is for Proxy I > >> thing**************************** player_point_3d_t* points; > >> > >> player_pointcloud3d_data_t cloud_data; > >> player_pointcloud3d_element_t element[buffer_vert*buffer_hori]; > >> > >> for(i=0........){ > >> player_point_3d_t p3d; > >> p3d.px = (float)value*delta_x; > >> p3d.py = (float)(buffer_vert-rows)*delta_y; > >> p3d.pz = (float)Buffer[buffer_hori*rows+value]; > >> value++; > >> } > >> cloud_data.points_count = value; > >> > >> cloud_data.points=(player_pointcloud3d_element_t*)calloc(sizeof(cloud_da > >>ta.points[0]),cloud_data.points_count); for (int j=0; j < value; j++) > >> cloud_data.points[j] = element[j]; > >> > >> Publish (device_addr, PLAYER_MSGTYPE_DATA, > >> PLAYER_POINTCLOUD3D_DATA_STATE, &cloud_data, > >> sizeof (player_pointcloud3d_data_t), NULL); > >> > >> //*********** Code which is for Proxy I > >> thing**************************** > >> > >> This is of course not the whole Code but I thing thats the Important > >> fragments. > >> Maybe somebody has an idea. > >> Thx for help. > >> > >> Daniel > >> > >> ------------------------------------------------------------------------ > >>- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't > >> miss this year's exciting event. There's still time to save $100. Use > >> priority code J8TL2D2. > >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j > >>avaone _______________________________________________ > >> Playerstage-users mailing list > >> Pla...@li... > >> https://lists.sourceforge.net/lists/listinfo/playerstage-users > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/ja > >vaone _______________________________________________ > > Playerstage-users mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java >one _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users |