This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from omega import * | |
from euclid import * | |
# needed for radians() | |
from math import * | |
a = SceneNode.create('a') | |
b = SceneNode.create('b') | |
a.addChild(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example 1: Get wand position using the event function | |
onEvent(): | |
e = getEvent() | |
if(e.getServiceType() == ServiceType.Wand()) | |
wandPosition = e.getPosition() | |
# use wandPosition to do stuff here or save it in | |
# a global var and do stuf later | |
setEventFunction(onEvent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////////////////////////// | |
void GamepadCameraController::update(const UpdateContext& context) | |
{ | |
if(!isEnabled()) return; | |
Camera* c = getCamera(); | |
c->setOrientation(Math::quaternionFromEuler(Vector3f(myPitch, myYaw, 0))); | |
c->translate(mySpeedVector * context.dt, Node::TransformLocal); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Actor dictionary | |
actors = {} | |
# create a custom actor class | |
class Pickable(Actor): | |
node = None | |
def __init__(self): | |
# create something | |
node = SphereNode.create(1,2) | |
node.setSelectable(True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config: | |
{ | |
serverPort = "28000"; | |
// VRPN Controller device for CalVR | |
vrpnTrackerName = "Navigation"; | |
vrpnTrackerPort = 3894; | |
checkForDisconnectedClients = false; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example creates a spinning cube every time the user right-clicks on the window. | |
# A custom Actor keeps track of each cube spinning. | |
from math import * | |
from euclid import * | |
from omega import * | |
from omegaToolkit import * | |
from cyclops import * | |
# The actor list is needed to avoid garbage-collecting alive actors. | |
actors = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pointer: | |
{ | |
type="cylindrical"; | |
radius=3.238; | |
doorWidth = 36; | |
xBias = 0.0278; | |
minY = 0.305; | |
maxY = 2.625; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config: | |
{ | |
//serverListenIP = "127.0.0.1"; | |
serverPort = "28000"; | |
// VRPN Controller device for CalVR | |
vrpnTrackerName = "Navigation"; | |
vrpnTrackerPort = 3894; | |
checkForDisconnectedClients = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cyclops import * | |
from random import * | |
from math import * | |
l = Light.create() | |
l.setPosition(0, 2, 0) | |
l.setAmbient(Color(0.5, 0.5, 0.5, 1)) | |
s1 = SphereShape.create(0.5, 2) | |
s2 = SphereShape.create(0.5, 2) |
OlderNewer