JunkBox_Lib++ (for Windows) 1.10.1
Loading...
Searching...
No Matches
OpenNiDevice.cpp
Go to the documentation of this file.
1
5#include "OpenNiDevice.h"
6#include "tools++.h"
7
8using namespace jbxl;
9
10
11#ifdef ENABLE_OPENNI
12
13
14COpenNiDevice::COpenNiDevice(void)
15{
16 context = NULL;
17 image = NULL;
18 user = NULL;
19 depth = NULL;
20 player = NULL;
21
22 imageMD = NULL;
23 depthMD = NULL;
24 sceneMD = NULL;
25
26 m_enu_dev = EnuDev_Unknown;
27 m_has_camera = TRUE;
28 m_err_mesg = make_Buffer(LMESG);
29
31 m_xsize = OPENNI_DEPTH_XSIZE;
32 m_ysize = OPENNI_DEPTH_YSIZE;
33 m_nfps = OPENNI_DEPTH_FPS;
34
35 //
36 recorder = NULL;
37 skeleton = NULL;
38// pose = NULL;
39
40 usb_dev = NULL;
41 devPath = NULL;
42
43 userCallbacks = NULL;
44 poseCallbacks = NULL;
45 calibCallbacks = NULL;
46
47 memset(dUsers, 0, sizeof(XnUserID)*OPENNI_USERS_NUM);
48}
49
50
51BOOL COpenNiDevice::init(BOOL use_image)
52{
53 outputMode.nXRes = OPENNI_DEPTH_XSIZE;
54 outputMode.nYRes = OPENNI_DEPTH_YSIZE;
55 outputMode.nFPS = OPENNI_DEPTH_FPS;
56
57 m_enu_dev = EnuDev_None;
58
59 BOOL ret = create_Context();
60 if (ret && use_image) create_Image();
61 if (ret) ret = create_Depth();
62 if (ret) m_enu_dev = EnuDev_PS1080;
63
64 return ret;
65}
66
67
68BOOL COpenNiDevice::init(char* fname, BOOL use_image)
69{
70 m_enu_dev = EnuDev_None;
71
72 if (fname==NULL) {
73 copy_s2Buffer("ERROR: COpenNiDevice::init: File name is NULL", &m_err_mesg);
74 return FALSE;
75 }
76 //
77 BOOL ret = create_Context(fname);
78 if (ret) ret = create_Player(TRUE);
79 if (!ret) {
80 copy_s2Buffer("ERROR: COpenNiDevice::init: create error!!", &m_err_mesg);
81 return FALSE;
82 }
83 //
84 xn::NodeInfoList nodeList;
85 player->EnumerateNodes(nodeList);
86
87 for (xn::NodeInfoList::Iterator node=nodeList.Begin(); node!=nodeList.End(); node++) {
88 if ((*node).GetDescription().Type==XN_NODE_TYPE_IMAGE) {
89 if (use_image) {
90 ret = create_Image(TRUE);
91 if (!ret) break;
92 }
93 }
94 if ((*node).GetDescription().Type==XN_NODE_TYPE_DEPTH) {
95 ret = create_Depth(TRUE);
96 if (!ret) break;
97 }
98 }
99 //
100 if (image!=NULL && use_image) {
101 image->GetMapOutputMode(outputMode);
102 }
103 else if (depth!=NULL) {
104 depth->GetMapOutputMode(outputMode);
105 }
106 else {
107 copy_s2Buffer("ERROR: COpenNiDevice::init: No Generators", &m_err_mesg);
108 return FALSE;
109 }
110
111 m_enu_dev = EnuDev_OniFile;
112 return TRUE;
113}
114
115
116void COpenNiDevice::free(void)
117{
118 clear_Tracking();
119 clear_CallBacks();
120 clear_Skeleton();
121
122 delete_User();
123 delete_Depth();
124 delete_Image();
125 delete_Player();
126 delete_Context();
127
128 free_Buffer(&m_err_mesg);
129}
130
131
132
134// Create/Delete Generators
135
136BOOL COpenNiDevice::create_Context(char* fname)
137{
138 if (context==NULL) {
139 context = new xn::Context();
140 if (context==NULL) {
141 copy_s2Buffer("ERROR: COpenNiDevice::create_Context: context is NULL", &m_err_mesg);
142 return FALSE;
143 }
144 }
145
146 XnStatus rc = context->Init();
147 if (rc==XN_STATUS_OK && fname!=NULL) rc = context->OpenFileRecording(fname);
148
149 if (rc!=XN_STATUS_OK) {
150 copy_s2Buffer("ERROR: COpenNiDevice::create_Context: ", &m_err_mesg);
151 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
152 return FALSE;
153 }
154 return TRUE;
155}
156
157
158BOOL COpenNiDevice::create_Image(BOOL easy)
159{
160 if (!m_has_camera) return FALSE;
161
162 if (context==NULL) {
163 copy_s2Buffer("ERROR: COpenNiDevice::create_Image: context is NULL", &m_err_mesg);
164 return FALSE;
165 }
166
167 if (image==NULL) {
168 image = new xn::ImageGenerator();
169 if (image==NULL) {
170 copy_s2Buffer("ERROR: COpenNiDevice::create_Image: fail to create image generator", &m_err_mesg);
171 m_has_camera = FALSE;
172 return FALSE;
173 }
174 }
175
176 XnStatus rc = XN_STATUS_ERROR;
177 if (easy) {
178 rc = context->FindExistingNode(XN_NODE_TYPE_IMAGE, *image);
179 }
180 else {
181 rc = image->Create(*context);
182 if (rc==XN_STATUS_OK) rc = image->StartGenerating();
183 if (rc==XN_STATUS_OK) rc = image->SetMapOutputMode(outputMode);
184 }
185
186 if (rc!=XN_STATUS_OK) {
187 copy_s2Buffer("ERROR: COpenNiDevice::create_Image: ", &m_err_mesg);
188 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
189 delete_Image();
190 return FALSE;
191 }
192
193 imageMD = new xn::ImageMetaData();
194 //imageData = (uByte*)malloc(outputMode.nXRes*outputMode.nYRes*3);
195 //if (imageData!=NULL) memset(imageData, 0, outputMode.nXRes*outputMode.nYRes*3);
196
197 return TRUE;
198}
199
200
201BOOL COpenNiDevice::create_Depth(BOOL easy)
202{
203 if (context==NULL) {
204 copy_s2Buffer("ERROR: COpenNiDevice::create_Depth: context is NULL", &m_err_mesg);
205 return FALSE;
206 }
207
208 if (depth==NULL) {
209 depth = new xn::DepthGenerator();
210 if (depth==NULL) {
211 copy_s2Buffer("ERROR: COpenNiDevice::create_Depth: fail to create depth generator", &m_err_mesg);
212 return FALSE;
213 }
214 }
215
216 XnStatus rc = XN_STATUS_ERROR;
217 if (easy) {
218 rc = context->FindExistingNode(XN_NODE_TYPE_DEPTH, *depth);
219 }
220 else {
221 rc = depth->Create(*context);
222 if (rc==XN_STATUS_OK) rc = depth->StartGenerating();
223 if (rc==XN_STATUS_OK) rc = depth->SetMapOutputMode(outputMode);
224 if (rc==XN_STATUS_OK && image!=NULL) {
225 rc = depth->GetAlternativeViewPointCap().SetViewPoint(*image);
226 /*if (rc==XN_STATUS_OK && depth->IsCapabilitySupported(XN_CAPABILITY_FRAME_SYNC)) {
227 if (depth->GetFrameSyncCap().CanFrameSyncWith(*image)) {
228 rc = depth->GetFrameSyncCap().FrameSyncWith(*image);
229 }
230 }*/
231 }
232 }
233
234 if (rc!=XN_STATUS_OK) {
235 copy_s2Buffer("ERROR: COpenNiDevice::create_Depth: ", &m_err_mesg);
236 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
237 delete_Depth();
238 return FALSE;
239 }
240
241 depthMD = new xn::DepthMetaData();
242 //depthData = (XnLabel*)malloc(outputMode.nXRes*outputMode.nYRes*sizeof(XnLabel));
243 //if (depthData!=NULL) memset(depthData, 0, outputMode.nXRes*outputMode.nYRes*sizeof(XnLabel));
244
245 return TRUE;
246}
247
248
249BOOL COpenNiDevice::create_User(BOOL easy)
250{
251 if (context==NULL) {
252 copy_s2Buffer("ERROR: COpenNiDevice::create_User: context is NULL", &m_err_mesg);
253 return FALSE;
254 }
255
256 if (user==NULL) {
257 user = new xn::UserGenerator();
258 if (user==NULL) {
259 copy_s2Buffer("ERROR: COpenNiDevice::create_User: fail to create user generator", &m_err_mesg);
260 return FALSE;
261 }
262 }
263
264 XnStatus rc = XN_STATUS_ERROR;
265 if (easy) {
266 rc = context->FindExistingNode(XN_NODE_TYPE_USER, *user);
267 }
268 else {
269 rc = user->Create(*context);
270 if (rc==XN_STATUS_OK) rc = user->StartGenerating();
271 }
272
273 if (rc!=XN_STATUS_OK) {
274 copy_s2Buffer("ERROR: COpenNiDevice::create_User: ", &m_err_mesg);
275 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
276 delete_User();
277 return FALSE;
278 }
279
280 sceneMD = new xn::SceneMetaData();
281 return TRUE;
282}
283
284
285BOOL COpenNiDevice::create_Player(BOOL easy)
286{
287 if (context==NULL) {
288 copy_s2Buffer("ERROR: COpenNiDevice::create_Player: context is NULL", &m_err_mesg);
289 return FALSE;
290 }
291
292 if (player==NULL) {
293 player = new xn::Player();
294 if (player==NULL) {
295 copy_s2Buffer("ERROR: COpenNiDevice::create_Player: fail to create player generator", &m_err_mesg);
296 return FALSE;
297 }
298 }
299
300 XnStatus rc = XN_STATUS_ERROR;
301 if (easy) {
302 rc = context->FindExistingNode(XN_NODE_TYPE_PLAYER, *player);
303 }
304 else {
305 rc = player->Create(*context, "oni");
306 }
307
308 if (rc!=XN_STATUS_OK) {
309 copy_s2Buffer("ERROR: COpenNiDevice::create_Player: ", &m_err_mesg);
310 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
311 delete_Player();
312 return FALSE;
313 }
314 return TRUE;
315}
316
317
318
320// Delete Generators
321
322void COpenNiDevice::delete_Context(void)
323{
324 if (context!=NULL) {
325 context->Release();
326 delete(context);
327 }
328 context = NULL;
329}
330
331
332void COpenNiDevice::delete_Image(void)
333{
334 if (image!=NULL) {
335 if (image->IsValid()) {
336 if (image->IsGenerating()) image->StopGenerating();
337 }
338 image->Release();
339 delete(image);
340 }
341 if (imageMD!=NULL) delete(imageMD);
342
343 image = NULL;
344 imageMD = NULL;
345}
346
347
348void COpenNiDevice::delete_Depth(void)
349{
350 if (depth!=NULL) {
351 if (depth->IsValid()) {
352 if (depth->IsGenerating()) depth->StopGenerating();
353 }
354 depth->Release();
355 delete(depth);
356 }
357 if (depthMD!=NULL) delete(depthMD);
358
359 depth = NULL;
360 depthMD = NULL;
361}
362
363
364void COpenNiDevice::delete_User(void)
365{
366 if (user!=NULL) {
367 if (user->IsValid()) {
368 if (user->IsGenerating()) user->StopGenerating();
369 }
370 user->Release();
371 delete(user);
372 }
373 if (sceneMD!=NULL) delete(sceneMD);
374
375 user = NULL;
376 sceneMD = NULL;
377}
378
379
380void COpenNiDevice::delete_Player(void)
381{
382 if (player!=NULL) {
383 player->Release();
384 delete(player);
385 player = NULL;
386 }
387}
388
389
390
392// Create Capabilities
393
394BOOL COpenNiDevice::setup_Tracking(int profile, double smooth)
395{
396 if (user==NULL) {
397 copy_s2Buffer("ERROR: COpenNiDevice::setup_Tracking: user is NULL", &m_err_mesg);
398 return FALSE;
399 }
400 if (!user->IsCapabilitySupported(XN_CAPABILITY_SKELETON)) {
401 copy_s2Buffer("ERROR: COpenNiDevice::setup_Tracking: not support skeleton", &m_err_mesg);
402 return FALSE;
403 }
404
405 if (skeleton==NULL) {
406 skeleton = new xn::SkeletonCapability(*user);
407 if (skeleton==NULL) {
408 copy_s2Buffer("ERROR: COpenNiDevice::setup_Tracking: fail to make skeleton capability", &m_err_mesg);
409 return FALSE;
410 }
411 }
412
413 //
414 skeleton->SetSkeletonProfile((XnSkeletonProfile)profile);
415 skeleton->SetSmoothing((XnFloat)smooth);
416 //
417 return TRUE;
418}
419
420
421
423// Clear Capabilities
424
425//
426void COpenNiDevice::clear_Skeleton(void)
427{
428 if (skeleton!=NULL) delete(skeleton);
429 skeleton = NULL;
430}
431
432
433void COpenNiDevice::clear_Tracking(void)
434{
435 if (user!=NULL) {
436 nUsers = OPENNI_USERS_NUM;
437 user->GetUsers(dUsers, nUsers);
438 for (int i=0; i<nUsers; i++) {
439 if (skeleton!=NULL && skeleton->IsTracking(dUsers[i])) {
440 skeleton->StopTracking(dUsers[i]);
441 }
442 }
443 }
444}
445
446
447
449// File
450
451BOOL COpenNiDevice::create_Recorder(char* file_name, BOOL use_image)
452{
453 if (context==NULL) {
454 copy_s2Buffer("ERROR: COpenNiDevice::create_Recorder: context is NULL", &m_err_mesg);
455 return FALSE;
456 }
457 if (depth==NULL) {
458 copy_s2Buffer("ERROR: COpenNiDevice::create_Recorder: depth is NULL", &m_err_mesg);
459 return FALSE;
460 }
461
462 recorder = new xn::Recorder();
463 rc = recorder->Create(*context);
464 if (rc==XN_STATUS_OK) rc = recorder->SetDestination(XN_RECORD_MEDIUM_FILE, file_name);
465 if (rc==XN_STATUS_OK && use_image && image!=NULL) rc = recorder->AddNodeToRecording(*image, XN_CODEC_JPEG);
466 if (rc==XN_STATUS_OK) rc = recorder->AddNodeToRecording(*depth, XN_CODEC_16Z);
467
468 if (rc!=XN_STATUS_OK) {
469 copy_s2Buffer("ERROR: COpenNiDevice::create_Recorder: ", &m_err_mesg);
470 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
471 return FALSE;
472 }
473
474 return TRUE;
475}
476
477
478void COpenNiDevice::delete_Recorder(void)
479{
480 if (recorder!=NULL) {
481 int prev_state = m_state;
482 m_state = NI_STATE_SAVE_WORKING;
483 {
485 if (depth!=NULL) recorder->RemoveNodeFromRecording(*depth);
486 if (image!=NULL) recorder->RemoveNodeFromRecording(*image);
487 //if (use_camera && image!=NULL) recorder->RemoveNodeFromRecording(*image);
488 recorder->Release();
489 delete(recorder);
490 }
491 m_state = prev_state;
492 }
493 recorder = NULL;
494 return;
495}
496
497
498BOOL COpenNiDevice::start_Recorde(char* file_name, BOOL use_image)
499{
500 BOOL ret = FALSE;
501 unlink(file_name);
502
503 int prev_state = m_state;
504 m_state = NI_STATE_SAVE_WORKING;
505 {
507 ret = create_Recorder(file_name, use_image);
508 if (ret) {
509 rc = recorder->Record();
510 if (rc!=XN_STATUS_OK) {
511 copy_s2Buffer("ERROR: COpenNiDevice::start_Recorde: ", &m_err_mesg);
512 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
513 ret = FALSE;
514 }
515 }
516 }
517 m_state = prev_state;
518
519 if (!ret) {
520 delete_Recorder();
521 unlink(file_name);
522 }
523 return ret;
524}
525
526
527void COpenNiDevice::stop_Recorde(void)
528{
529 delete_Recorder();
530}
531
532
533
535// USB
536
537BOOL COpenNiDevice::open_USB_Device(void)
538{
539 rc = ::xnUSBInit();
540 if (rc!=XN_STATUS_OK && rc!=XN_STATUS_USB_ALREADY_INIT) return FALSE;
541
542#ifdef WIN32
543 XnUInt32 count;
544 rc = ::xnUSBEnumerateDevices(NI_VID_MICROSOFT, NI_PID_NUI_MOTOR, (const XnUSBConnectionString**)&devPath, &count);
545 if (rc!=XN_STATUS_OK) {
546 ::xnUSBShutdown();
547 return FALSE;
548 }
549
550 rc = ::xnUSBOpenDeviceByPath(*devPath, &usb_dev);
551 if (rc!=XN_STATUS_OK) {
552 ::xnUSBFreeDevicesList(devPath);
553 return FALSE;
554 }
555#else
556 rc = ::xnUSBOpenDevice(OPENNI_VID_MICROSOFT, OPENNI_PID_NUI_MOTOR, NULL, NULL, &usb_dev);
557 if (rc!=XN_STATUS_OK) {
558 ::xnUSBShutdown();
559 return FALSE;
560 }
561#endif
562
563 return TRUE;
564}
565
566
567void COpenNiDevice::close_USB_Device(void)
568{
569 if (usb_dev!=NULL) {
570 ::xnUSBCloseDevice(usb_dev);
571 usb_dev = NULL;
572 }
573
574#ifdef WIN32
575 if (devPath!=NULL) {
576 ::xnUSBFreeDevicesList(devPath);
577 devPath = NULL;
578 }
579#endif
580
581 ::xnUSBShutdown();
582}
583
584
585void COpenNiDevice::set_LED_Color(int col)
586{
587 if (usb_dev==NULL) return;
588
589 ::xnUSBSendControl(usb_dev, XN_USB_CONTROL_TYPE_VENDOR, 0x06, (XnUInt16)col, 0, NULL, 0, 0);
590
591 return;
592}
593
594
595void COpenNiDevice::set_Tilt_Motor(int ang)
596{
597 if (usb_dev==NULL) return;
598 //if (ang>30 || ang<-30) return;
599
600 ::xnUSBSendControl(usb_dev, XN_USB_CONTROL_TYPE_VENDOR, 0x31, (XnUInt16)(ang*2), 0, NULL, 0, 0);
601
602 Sleep(1000);
603 return;
604}
605
606
607
609// コールバック
610
612BOOL COpenNiDevice::setup_CallBacks()
613{
614 BOOL ret = set_UserCallbacks (&userDetect, &userLost, this);
615 if (ret) ret = set_CalibCallbacks(&calibStart, &calibEnd, this);
616 if (!ret) return FALSE;
617
618 return TRUE;
619}
620
621
622void COpenNiDevice::clear_CallBacks()
623{
624 unset_UserCallbacks();
625 unset_CalibCallbacks();
626}
627
628
629BOOL COpenNiDevice::set_UserCallbacks(xn::UserGenerator::UserHandler newUser, xn::UserGenerator::UserHandler lostUser, void* cookie)
630{
631 if (user==NULL) {
632 copy_s2Buffer("ERROR: COpenNiDevice::set_UserCallbacks: user is NULL", &m_err_mesg);
633 return FALSE;
634 }
635
636 rc = user->RegisterUserCallbacks(newUser, lostUser, cookie, userCallbacks);
637 if (rc!=XN_STATUS_OK) {
638 copy_s2Buffer("ERROR: COpenNiDevice::set_UserCallbacks: ", &m_err_mesg);
639 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
640 unset_UserCallbacks();
641 return FALSE;
642 }
643 return TRUE;
644}
645
646
647BOOL COpenNiDevice::set_CalibCallbacks(xn::SkeletonCapability::CalibrationStart calibStart, xn::SkeletonCapability::CalibrationEnd calibEnd, void* cookie)
648{
649 if (skeleton==NULL) {
650 copy_s2Buffer("ERROR: COpenNiDevice::set_CalibCallbacks: skeleton is NULL", &m_err_mesg);
651 return FALSE;
652 }
653
654 rc = skeleton->RegisterCalibrationCallbacks(calibStart, calibEnd, cookie, calibCallbacks);
655 if (rc!=XN_STATUS_OK) {
656 copy_s2Buffer("ERROR: COpenNiDevice::set_CalibCallbacks: ", &m_err_mesg);
657 cat_s2Buffer (::xnGetStatusString(rc), &m_err_mesg);
658 unset_CalibCallbacks();
659 return FALSE;
660 }
661 return TRUE;
662}
663
664
665void COpenNiDevice::unset_UserCallbacks()
666{
667 if (user!=NULL && userCallbacks!=NULL) {
668 user->UnregisterUserCallbacks(userCallbacks);
669 userCallbacks = NULL;
670 }
671 return;
672}
673
674
675void COpenNiDevice::unset_CalibCallbacks()
676{
677 if (skeleton!=NULL && calibCallbacks!=NULL) {
678 skeleton->UnregisterCalibrationCallbacks(calibCallbacks);
679 calibCallbacks = NULL;
680 }
681 return;
682}
683
684
685
687// External Callback Functions
688//
689
690void XN_CALLBACK_TYPE jbxl::userDetect(xn::UserGenerator& user, unsigned int nId, void* cookie)
691{
692 DEBUG_INFO("INFO: jbxl::userDetect(): User is detected. (%d)", nId);
693 if (cookie==NULL) return;
694
695 user.GetSkeletonCap().RequestCalibration(nId, TRUE);
696
697 DEBUG_INFO("INFO: jbxl::userDetect(): Start Pose Detection. (%d)", nId);
698}
699
700
701void XN_CALLBACK_TYPE jbxl::userLost(xn::UserGenerator& user, unsigned int nId, void* cookie)
702{
703 DEBUG_INFO("INFO: jbxl::userLost(): Lost user. (%d)", nId);
704
705 if (user.GetSkeletonCap().IsValid()) {
706 if (user.GetSkeletonCap().IsTracking(nId)) {
707 user.GetSkeletonCap().StopTracking(nId);
708 DEBUG_INFO("INFO: jbxl::userLost(): Stop Tracking. (%d)", nId);
709 }
710 }
711}
712
713
714// Calibration
715
716void XN_CALLBACK_TYPE jbxl::calibStart(xn::SkeletonCapability& skeleton, unsigned int nId, void* cookie)
717{
718 DEBUG_INFO("INFO: jbxl::calibStart(): Start Calibration. (%d)", nId);
719}
720
721
722void XN_CALLBACK_TYPE jbxl::calibEnd(xn::SkeletonCapability& skeleton, unsigned int nId, XnBool success, void* cookie)
723{
724 DEBUG_INFO("INFO: jbxl::calibEnd(): End Calibration. (%d)", nId);
725 if (cookie==NULL) return;
726
727 //
728 xn::UserGenerator* user = ((COpenNiDevice*)cookie)->user;
729 if (user!=NULL) {
730 if (success) {
731 if (user!=NULL) {
732 user->GetSkeletonCap().StartTracking(nId);
733 DEBUG_INFO("INFO: jbxl::calibEnd(): Start Tracking. (%d)", nId);
734 }
735 }
736 }
737}
738
739
740#endif // ENABLE_OPENNI
#define NI_PID_NUI_MOTOR
Definition NiDevice.h:53
#define OPENNI_USERS_NUM
Definition NiDevice.h:11
#define NI_STATE_SAVE_WORKING
Definition NiDevice.h:44
#define NI_WORKING_WAIT_TIME
Definition NiDevice.h:46
#define OPENNI_DEPTH_FPS
Definition NiDevice.h:35
#define OPENNI_DEPTH_YSIZE
Definition NiDevice.h:34
#define NI_VID_MICROSOFT
Definition NiDevice.h:52
#define NI_STATE_DETECT_STOPPED
Definition NiDevice.h:40
@ EnuDev_Unknown
Definition NiDevice.h:18
@ EnuDev_OniFile
Definition NiDevice.h:22
@ EnuDev_None
Definition NiDevice.h:19
@ EnuDev_PS1080
Definition NiDevice.h:20
#define OPENNI_DEPTH_XSIZE
Definition NiDevice.h:33
Buffer make_Buffer(int sz)
Buffer型変数のバッファ部をつくり出す.
Definition buffer.cpp:71
void free_Buffer(Buffer *buf)
Buffer型変数のバッファ部を解放する
Definition buffer.cpp:128
#define copy_s2Buffer(src, dst)
copy_b2Buffer()
Definition buffer.h:108
#define cat_s2Buffer(src, dst)
cat_b2Buffer()
Definition buffer.h:122
#define unlink
Definition common.h:55
#define LMESG
Definition common.h:148
#define TRUE
Definition common.h:226
#define FALSE
Definition common.h:223
Definition Brep.h:29
ツールライブラリ ヘッダ for C++
#define DEBUG_INFO
デバッグ用出力関数.コンパイル時に削除可能
Definition tools.h:511