-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


3D- Renga

, 13 2017 . 18:17 +
! Renga Software ( 1ѻ), BIM-: Renga Architecture - Renga Structure .

3D- Renga.
image

Renga ( !)
Renga Architecture - . : , .

Renga Structure c /. - ////.

Renga BIM. 3D-:


Renga 3D- / (, , ..)


BIM-Server Pilot

Renga API 1- ABC- .


Renga (.ifc, .dwg, .dxf, .obj, .dae, .stl, .3ds, .lwo .csv)


Renga , .


3D- (, ) .


3D- , . - , 3D-, .

3D- 3Donnexion. ( ):

image

3D- 6 : X, Y, Z, , : Roll, Pitch, Yaw.

image

:

image

3D- 3Donnexion SDK. .

3D- Qt5.
Qt Visual Studio.

3D- SDK:

// Mouse 3D stuff
#include   /* Common macros used by SpaceWare functions. */
#include              /* Required for any SpaceWare support within an app.*/
#include        /* Required for siapp.lib symbols */
#include "virtualkeys.hpp"

, handle , . . - :

bool init3DMouse()
{
  SiOpenData oData; 

  /*init the SpaceWare input library */
  if (SiInitialize() == SPW_DLL_LOAD_ERROR)  
      return false;
  
  SiOpenWinInit(&oData, (HWND)winId());    /* init Win. platform specific data  */
  SiSetUiMode(mouse3DHandle, SI_UI_ALL_CONTROLS); /* Config SoftButton Win Display */

  /* open data, which will check for device type and return the device handle
  to be used by this function */ 
  if ( (mouse3DHandle = SiOpen ("HabrahabrAnd3DMouse", SI_ANY_DEVICE, SI_NO_MASK, SI_EVENT, &oData)) == NULL) 
  {
    SiTerminate();  /* called to shut down the SpaceWare input library */
    return false;       /* could not open device */
  }
  else
  {
    return true; /* opened device succesfully */ 
  }  
}

message loop . :

typedef struct          /* 3DxWare event */
{
  int type;                 /* Event type */
  union
  {
    SiSpwData spwData;            /* Button, motion, or combo data        */
    SiSpwOOB spwOOB;              /* Out of band message                  */
    SiOrientation spwOrientation; /* Which hand orientation is the device */
    char exData[SI_MAXBUF];       /* Exception data. Driver use only      */
    SiKeyboardData spwKeyData;    /* String for keyboard data             */
    SiSyncPacket siSyncPacket;    /* GUI SyncPacket sent to applications  */
    SiHWButtonData hwButtonEvent; /* V3DKey that goes with          *
                                   * SI_BUTTON_PRESS/RELEASE_EVENT        */
    SiAppCommandData appCommandData;  /* Application command event function data that *
                                   * goes with an SI_APP_EVENT event      */
    SiDeviceChangeEventData deviceChangeEventData;    /* Data for connecting/disconnecting devices */
    SiCmdEventData cmdEventData;  /* V3DCMD_* function data that *
                                   * goes with an SI_CMD_EVENT event      */
  } u;
} SiSpwEvent;

SiSpwEvent::type. SiSpwData::spwData , .

. . QAbstractNativeEventFilter nativeEventFilter:

bool HabrahabrAnd3DMouse::nativeEventFilter(const QByteArray &eventType, void *msg, long *)
{
  if(!mouse3DHandle)
    return false;

  MSG* winMSG = (MSG*)msg;

  bool handled = SPW_FALSE;
  SiSpwEvent     Event;    /* SpaceWare Event */ 
  SiGetEventData EData;    /* SpaceWare Event Data */

  /* init Window platform specific data for a call to SiGetEvent */
  SiGetEventWinInit(&EData, winMSG->message, winMSG->wParam, winMSG->lParam);

  /* check whether msg was a 3D mouse event and process it */
  if (SiGetEvent (mouse3DHandle, SI_AVERAGE_EVENTS, &EData, &Event) == SI_IS_EVENT)
  {
    if (Event.type == SI_MOTION_EVENT)
    {
      qDebug() << "delta by X coordinate = " << Event.u.spwData.mData[SI_TX] << "\n";
      qDebug() << "delta by Y coordinate = " << Event.u.spwData.mData[SI_TY] << "\n";
      qDebug() << "delta by Z coordinate = " << Event.u.spwData.mData[SI_TZ] << "\n";

      qDebug() << "delta by Yaw = " << Event.u.spwData.mData[SI_RX] << "\n";
      qDebug() << "delta by Pitch = " << Event.u.spwData.mData[SI_RY] << "\n";
      qDebug() << "delta by Roll = " << Event.u.spwData.mData[SI_RZ] << "\n";
    }
    else if (Event.type == SI_ZERO_EVENT)
    {
      // ZERO event
    }
    else if (Event.type == SI_BUTTON_EVENT)
    {
      // misc button events
    }

    handled = SPW_TRUE;  /* 3D mouse event handled */ 
  }

  return handled;
}

. .
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/332676/


: [1] []
 

:
: 

: ( )

:

  URL