GithubHelp home page GithubHelp logo

mkalten / tuio20_cpp Goto Github PK

View Code? Open in Web Editor NEW
50.0 13.0 21.0 2.8 MB

C++ TUIO 2.0 reference implementation

License: GNU Lesser General Public License v3.0

C++ 100.00%
tuio c-plus-plus library tuio-client tuio-tracker tuio-simulator tuio2

tuio20_cpp's People

Contributors

floe avatar mkalten avatar payload avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tuio20_cpp's Issues

No limit on TuioComponent path list size

Currently the TuioComponent only adds new points to the list, without limiting its size. This can lead to big memory usage for objects that are tracked for a long time.

Won't build?

1>------ Build started: Project: libTUIO2, Configuration: Release Win32 ------
1> IpEndpointName.cpp
1> NetworkingUtils.cpp
1> UdpSocket.cpp
1> OscOutboundPacketStream.cpp
1> OscPrintReceivedElements.cpp
1> OscReceivedElements.cpp
1> OscTypes.cpp
1> FlashSender.cpp
1> OscReceiver.cpp
1> TcpReceiver.cpp
1>..\TUIO2\TcpReceiver.cpp(30): error C2371: 'int32_t': redefinition; different basic types
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdint.h(19): note: see declaration of 'int32_t'

1> TcpSender.cpp
1> TuioBounds.cpp
1> TuioClient.cpp
1> TuioComponent.cpp
1> TuioDispatcher.cpp
1> TuioManager.cpp
1> TuioObject.cpp
1> TuioPoint.cpp
1> TuioPointer.cpp
1> TuioServer.cpp
1> Compiling...
1> TuioSymbol.cpp
1> TuioTime.cpp
1> TuioToken.cpp
1> UdpReceiver.cpp
1> UdpSender.cpp
1> WebSockSender.cpp
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Duplicate 'add ptr' events being incorrectly generated

When receiving two pointers with the same data, the reference implementation incorrectly generates two 'add ptr' events for the same session ID.

Consider the following 3 TUIO bundles, being processed by the Tuio2Dump demo application:

/tuio2/frm 20668 7089359197171840187 537399850 Ultra 022001000104
/tuio2/alv

/tuio2/frm 20669 7089359197438128160 537399850 Ultra 022001000104
/tuio2/ptr 101027 65536 0 0.409512 0.49871 0 0 0 0.136719
/tuio2/alv 101027

/tuio2/frm 20670 7089359197695826198 537399850 Ultra 022001000104
/tuio2/ptr 101027 65536 0 0.409512 0.49871 0 0 0 0.136719
/tuio2/alv 101027

This will generate two 'add ptr' events for pointer with session ID 101027, although, frame 20669 should generate a 'add ptr' and frame 20670 should generate a 'set ptr' event.

My suspicion, is that here:

if (tptr == NULL) {
tptr = new TuioPointer(frameTime,tobj,t_id,u_id,c_id,xpos,ypos,angle,shear,radius,pressure);
tobj->setTuioPointer(tptr);
} else if ( (tptr->getX()!=xpos) || (tptr->getY()!=ypos) || (tptr->getAngle()!=angle) || (tptr->getShear()!=shear) || (tptr->getRadius()!=radius) || (tptr->getPressure()!=pressure) || (tptr->getXSpeed()!=xspeed) || (tptr->getYSpeed()!=yspeed) || (tptr->getPressureSpeed()!=pspeed) || (tptr->getMotionAccel()!=maccel) || (tptr->getPressureAccel()!=paccel) ) {
tptr->update(frameTime,xpos,ypos,angle,shear,radius,pressure,xspeed,yspeed,pspeed,maccel,paccel);
}

the update event should occur even if the pointer data is the same, as long as the time is different.

Is my interpretation correct, or am I missing something?

PointerId

Hi,

I have a question regarding component IDs of Tuio2 pointers. The specification says:

it defines a Component ID that allows the distinction of individual pointer components during a whole session.

However, in TuioClient, you initialise the pointer like so

new TuioPointer(frameTime,tobj,t_id,u_id,c_id,xpos,ypos,angle,shear,radius,pressure);

where c_id is actually the pointer_id of TuioPointer. So my questions are, is component id the same as pointer id, and what is its actual purpose? I see the explanation, but don't really get it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.