-
Notifications
You must be signed in to change notification settings - Fork 40
RAM API Reference Utility
This page shows some useful classes, including selecting a node, programatically saving/loading motion data, as well as storing camera settings.
ramNodeFinder searches for a node or multiple notes from an array of nodes managed by ramActorManager. If you want to manupulate specific nodes, this is much easier than a for-loop. ramNodeFinder should be used in your draw() loop, and not in drawActor() or drawRigid()
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 the same as ramNodeFinder::name, and the ramNodeArray has a node which has the same id as ramNodeFinder::index.
If this is true, the search result node is set to ramNode &node
.
Return all nodes which matches the target name and target joint id.
Return all nodes which matches the target joint id.
A tiny class for identifying a node.
Generally it is used with 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 to see if target name and target id are set.
Puts name and id into stream.
ramCameraSettings stores some settings used for controlling 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
,
A sample XML format is available here: RAMDanceToolkit/resources/Settings/cam.moving.xml
Loads one setting from XML
Loads all settings from XML.
Returns true if loading const string filePath
is successful.
ramCommunicationManager is communication tools with other applications via OSC.
An example is available at examples/example-communicationManager
//communicationManager setup
ramCommunicationManager::instance().addSender("localhost", 8000);
//Send from communicationManager
ramCommunicationManager::instance().sendCC("rightHand", handPos, 3);
//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 is an OSC receiver class for each scene.
ofxOscReceiveTag receiver;
receiver.addAddress("/Signals");
ramOscManager::instance().addReceiverTag(&receiver);
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