-
Notifications
You must be signed in to change notification settings - Fork 40
RAM API Reference Utility
This page shows some useful class e.g. pick node by clicking, save/load motion data by code, and store camera settings.
ramNodeFinder searches node(s) from nodearrays managed by ramActorManager.
If you want to manipulate not ramNodeArray but specific nodes, it is more easier than using for-loop. Probably ramNodeFinder is used not in drawActor(), drawRigid() but in draw().
Constructor.
ramNodeFinder nf;
nf1.setTargetName("Yoko");
nf1.setJointID(ramActor::JOINT_HEAD);
Constructor.
ramNodeIdentifer cyril_head("Cyril", ramActor::JOINT_HEAD);
ramNodeFinder nf(cyril_head);
Sets target name.
Sets target joint id.
Returns true if ramActorManager has ramNodeArray whose name is same to ramNodeFinder::name, and the ramNodeArray has node which has id same to ramNodeFinder::index.
If it's true, search result node is set to ramNode &node
.
Return all nodes which matches to target name and target joint id.
Return all nodes which matches to target joint id.
A tiny class to identify node.
Generally it's used for ramNodeFinder.
Constructor.
Constructor.
Constructor.
Constructor.
Constructor.
Name and id are copied from right hand side.
Sets target name and target id.
Sets target name.
Sets target id.
Clears target name and target id.
Checks target name and target id are set.
Puts name and id to stream.
ramCameraSettings stores some settings used for control ofCamera.
string name
,
ofVec3f pos
,
ofVec3f look_at
,
float fov
,
unsigned int moving_type
,
bool bMoving
,
ofVec3f moving_from
,
ofVec3f moving_to
,
float moving_duration
,
float moving_start_time
,
float moving_end_time
,
ofVec3f moving_axis_pos
,
ofVec3f moving_axis_up_vector
,
float moving_radius
,
float moving_speed
,
float moving_deg
,
Sample XML format is in RAMDanceToolkit/resources/Settings/cam.moving.xml
Loads one setting from XML
Loads settings from XML.
Returns true if load const string filePath
succeeded.
#ramCommunicationManager ramCommunicationManager is communication tools with other applications on OSC.
you can check how to details on examples/example-communicationManager
###Setup //communicationManager setup ramCommunicationManager::instance().addSender("localhost", 8000);
###Send for another app //Send from communicationManager ramCommunicationManager::instance().sendCC("rightHand", handPos, 3);
###Receive and use it //Receive from communicationManager
//[Send format]
//Port : same as the port passed to ramInitialize( ... )
//Address : /ram/communicate/cc
//Args : string(Instrument name), float(cc value), float(cc value), ...
float scale = 10 + ramCommunicationManager::instance().getCC("someInst", 0) * 50.0;
ofEnableDepthTest();
ramEnableShadow();
ramBeginCamera();
ofDrawBox(0, 100, 0, scale);
ramEndCamera();
#ramOscReceiveTag ramOscReceiveTag is OSC receiver class for each scenes. ###Setup ofxOscReceiveTag receiver;
receiver.addAddress("/Signals");
ramOscManager::instance().addReceiverTag(&receiver);
###Receive while (receiver.hasWaitingMessages()){
ofxOscMessage m;
receiver.getNextMessage(&m);
if (m.getAddress() == "/Signals/bang"){
cout << "Receive bang" << endl;
}
if (m.getAddress() == "/Signals/control"){
cout << "Control :" << m.getArgAsInt32(0) << endl;
}
}
This Document by YCAM InterLab, Yoshito Onishi, Satoru Higa, Motoi Shimizu, and Kyle McDonald is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
This Wiki and API References (RAMDanceToolkit 1.0.0) is created on 2013-03-09