![]() |
|
#1
|
|||
|
|||
This simple code flips the texture but it doesn't solve the purpose..
Code:
import viz viz.go() ar = viz.add('artoolkit.dle') camera = ar.addWebCamera() camera.background.setEuler([180,0,0]) camera.background.setPosition([640,0,0]) marker = camera.addMarker('ar/patt.worldviz',width = 1000) logo = viz.add('logo.ive') viz.link(marker,logo) |
#2
|
|||
|
|||
You will need to "flip" the position/rotation values of the markers as well. You can use the link.swapPos and link.swapEuler commands to accomplish this. Here is some sample code:
Code:
import viz viz.go() #Add ARToolkit extension ar = viz.add('artoolkit.dle') #Create camera using first available webcam camera = ar.addWebCamera() #Flip background quad camera.background.setEuler([180,0,0]) camera.background.setPosition([camera.texture.getSize()[0],0,0]) #Create a matrix marker with the specified id marker = camera.addMatrixMarker(0,width=1000) #Add logo model logo = viz.add('logo.ive') #Link logo model to marker sensor link = viz.link(marker,logo) #Swap X position and yaw,roll of euler rotation link.swapPos([-1,2,3],target=viz.LINK_POS_OP) link.swapEuler([-1,2,-3],target=viz.LINK_ORI_OP) |
![]() |
Tags |
artoolkit, camera, flip, flip horizontally, webcam |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
User keyboard input without halting the program | Zhi | Vizard | 2 | 06-23-2011 12:53 PM |
Controlling User Input | ohad | Vizard | 1 | 03-15-2010 05:16 PM |
How to input several model files and then save one output file | mspusch | Vizard | 1 | 07-15-2008 10:30 PM |
problems with webcam plug-in | v-clizzin | Plug-in development | 2 | 01-25-2008 03:06 PM |
problem with input boxes | shai | Vizard | 6 | 08-15-2005 10:51 AM |