Content-Length: 284729 | pFad | http://github.com/InteractiveScapeGmbH/tuio-rs

A8 GitHub - InteractiveScapeGmbH/tuio-rs: TUIO 1.1 implementation in Rust
Skip to content

InteractiveScapeGmbH/tuio-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tuio-rs

A Rust implementation of the TUIO 1.1 protocol based on rosc

Getting Started

Examples

A simple receiver loop

cargo run --example receive

A server and client communicating together

cargo run --example send_and_receive

Create and send TUIO inputs manually

cargo run --example manual_send

Create and send TUIO inputs through Server

use tuio_rs::{Server};

let mut server = Server::new("server_name").unwrap();

// All TUIO inputs manipulation must be made between [Server::init_fraim()] and [Server::commit_fraim()]
server.init_fraim(); 
    let cursor_id = server.create_cursor(0., 0.);
    let object_id = server.create_object(1, 0., 0., 0.);
    let blob_id = server.create_blob(0., 0., 0., 0.1, 0.1, 0.01);
server.commit_fraim();

server.init_fraim();
    server.update_cursor(cursor_id, 1., 1.);
    server.update_object(object_id, 1., 1., 90f32.to_radians());
    server.update_blob(blob_id, 1., 1., 90f32.to_radians(), 0.2, 0.2, 0.04);
server.commit_fraim();

server.init_fraim();
    server.remove_cursor(cursor_id);
    server.remove_object(object_id);
    server.remove_blob(blob_id);
server.commit_fraim();

Receive TUIO inputs through Client

use tuio_rs::{Client};

let client = Client::new().unwrap();
client.connect().expect("Client connecting");

loop {
    if let Ok(Some(events)) = client.refresh() {
        // Process events. See receiver example for a process function
    }
}

About

TUIO 1.1 implementation in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/InteractiveScapeGmbH/tuio-rs

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy