#!/usr/bin/env python

###
# Copyright (c) 2002-2007 Systems in Motion
#
# Permission to use, copy, modify, and distribute this coin.Software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE coin.SoFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS coin.SoFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATcoin.SoEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS coin.SoFTWARE.
#

###
# This is an example from the Inventor Mentor,
# chapter 2, example 3.
#
# Use the trackball manipulator to edit/rotate a red cone
#
####################################################################
#         Modified to be compatible with  FreeCAD                  #
#                                                                  #
# Author : Mariwan Jalal  mariwan.jalal@gmail.com                  #
####################################################################

import os
import sys
import FreeCAD as App
import FreeCADGui as Gui
import pivy.coin as coin

# Great Example how you can use this to rotate objects :)


def Trackball():

    root = coin.SoSeparator()

    root.addChild(coin.SoDirectionalLight())  # child 1
    # child 2     # You can choose other types .. Look at the note bellow the code
    root.addChild(coin.SoTrackballManip())

    myMaterial = coin.SoMaterial()
    myMaterial.diffuseColor = (1.0, 0.0, 0.0)
    root.addChild(myMaterial)
    root.addChild(coin.SoCone())

    view = Gui.ActiveDocument.ActiveView
    sg = view.getSceneGraph()
    sg.addChild(root)

    """
    Note:
    There are many other kind of this manupulation widget. Please choose the following classes to get other types.add()
    
    #link : http://webcache.googleusercontent.com/search?q=cache:9kTXW4u5hIkJ:www-evasion.inrialpes.fr/people/Francois.Faure/doc/inventor_doc.con3d.org/Coin/group__manips.html+&cd=12&hl=sv&ct=clnk&gl=se&client=firefox-b-d

    coin.SoCenterballManip()   	        #The SoCenterballManip wraps an SoCenterballDragger for convenience. More...
    coin.SoClipPlaneManip()      	    #The SoClipPlaneManip class is used to manipulate clip planes. More...
    coin.SoDirectionalLightManip()  	#The SoDirectionalLightManip class is used to manipulate SoDirectionalLight nodes. More...
    coin.SoHandleBoxManip()         	#The SoHandleBoxManip class wraps an SoHandleBoxDragger for manipulating a transformation. More...
    coin.SoJackManip()              	#The SoJackManip wraps an SoJackDragger for convenience. More...
    coin.SoPointLightManip()       	    #The SoPointLightManip class is used to manipulate point light nodes. More...
    coin.SoSpotLightManip()         	#The SoSpotLightManip class is used to manipulate spot light nodes. More...
    coin.SoTabBoxManip()            	#The SoTabBoxManip class wraps an SoTabBoxDragger. More...
    coin.SoTrackballManip()    	        # The SoTrackballManip wraps an SoTrackballDragger for convenience. More...
    coin.SoTransformBoxManip()       	#The SoTransformBoxManip wraps an SoTransformBoxDragger for convenience. More...
    coin.SoTransformManip()         	#The SoTransformManip class is used to manipulate transformations. More...
    coin.SoTransformerManip()           #The SoTransformerManip wraps an SoTransformerDragger for convenience

    
    
    
    """

41914f407ce415761f0291b516ccfa0470cb85ee
<mask token>

<mask token>


def Trackball():
    root = coin.SoSeparator()
    root.addChild(coin.SoDirectionalLight())
    root.addChild(coin.SoTrackballManip())
    myMaterial = coin.SoMaterial()
    myMaterial.diffuseColor = 1.0, 0.0, 0.0
    root.addChild(myMaterial)
    root.addChild(coin.SoCone())
    view = Gui.ActiveDocument.ActiveView
    sg = view.getSceneGraph()
    sg.addChild(root)
    """
    Note:
    There are many other kind of this manupulation widget. Please choose the following classes to get other types.add()
    
    #link : http://webcache.googleusercontent.com/search?q=cache:9kTXW4u5hIkJ:www-evasion.inrialpes.fr/people/Francois.Faure/doc/inventor_doc.con3d.org/Coin/group__manips.html+&cd=12&hl=sv&ct=clnk&gl=se&client=firefox-b-d

    coin.SoCenterballManip()   	        #The SoCenterballManip wraps an SoCenterballDragger for convenience. More...
    coin.SoClipPlaneManip()      	    #The SoClipPlaneManip class is used to manipulate clip planes. More...
    coin.SoDirectionalLightManip()  	#The SoDirectionalLightManip class is used to manipulate SoDirectionalLight nodes. More...
    coin.SoHandleBoxManip()         	#The SoHandleBoxManip class wraps an SoHandleBoxDragger for manipulating a transformation. More...
    coin.SoJackManip()              	#The SoJackManip wraps an SoJackDragger for convenience. More...
    coin.SoPointLightManip()       	    #The SoPointLightManip class is used to manipulate point light nodes. More...
    coin.SoSpotLightManip()         	#The SoSpotLightManip class is used to manipulate spot light nodes. More...
    coin.SoTabBoxManip()            	#The SoTabBoxManip class wraps an SoTabBoxDragger. More...
    coin.SoTrackballManip()    	        # The SoTrackballManip wraps an SoTrackballDragger for convenience. More...
    coin.SoTransformBoxManip()       	#The SoTransformBoxManip wraps an SoTransformBoxDragger for convenience. More...
    coin.SoTransformManip()         	#The SoTransformManip class is used to manipulate transformations. More...
    coin.SoTransformerManip()           #The SoTransformerManip wraps an SoTransformerDragger for convenience

    
    
    
    """

import os
import sys
import FreeCAD as App
import FreeCADGui as Gui
import pivy.coin as coin


def Trackball():
    root = coin.SoSeparator()
    root.addChild(coin.SoDirectionalLight())
    root.addChild(coin.SoTrackballManip())
    myMaterial = coin.SoMaterial()
    myMaterial.diffuseColor = 1.0, 0.0, 0.0
    root.addChild(myMaterial)
    root.addChild(coin.SoCone())
    view = Gui.ActiveDocument.ActiveView
    sg = view.getSceneGraph()
    sg.addChild(root)
    """
    Note:
    There are many other kind of this manupulation widget. Please choose the following classes to get other types.add()
    
    #link : http://webcache.googleusercontent.com/search?q=cache:9kTXW4u5hIkJ:www-evasion.inrialpes.fr/people/Francois.Faure/doc/inventor_doc.con3d.org/Coin/group__manips.html+&cd=12&hl=sv&ct=clnk&gl=se&client=firefox-b-d

    coin.SoCenterballManip()   	        #The SoCenterballManip wraps an SoCenterballDragger for convenience. More...
    coin.SoClipPlaneManip()      	    #The SoClipPlaneManip class is used to manipulate clip planes. More...
    coin.SoDirectionalLightManip()  	#The SoDirectionalLightManip class is used to manipulate SoDirectionalLight nodes. More...
    coin.SoHandleBoxManip()         	#The SoHandleBoxManip class wraps an SoHandleBoxDragger for manipulating a transformation. More...
    coin.SoJackManip()              	#The SoJackManip wraps an SoJackDragger for convenience. More...
    coin.SoPointLightManip()       	    #The SoPointLightManip class is used to manipulate point light nodes. More...
    coin.SoSpotLightManip()         	#The SoSpotLightManip class is used to manipulate spot light nodes. More...
    coin.SoTabBoxManip()            	#The SoTabBoxManip class wraps an SoTabBoxDragger. More...
    coin.SoTrackballManip()    	        # The SoTrackballManip wraps an SoTrackballDragger for convenience. More...
    coin.SoTransformBoxManip()       	#The SoTransformBoxManip wraps an SoTransformBoxDragger for convenience. More...
    coin.SoTransformManip()         	#The SoTransformManip class is used to manipulate transformations. More...
    coin.SoTransformerManip()           #The SoTransformerManip wraps an SoTransformerDragger for convenience

    
    
    
    """

#!/usr/bin/env python

###
# Copyright (c) 2002-2007 Systems in Motion
#
# Permission to use, copy, modify, and distribute this coin.Software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE coin.SoFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS coin.SoFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATcoin.SoEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS coin.SoFTWARE.
#

###
# This is an example from the Inventor Mentor,
# chapter 2, example 3.
#
# Use the trackball manipulator to edit/rotate a red cone
#
####################################################################
#         Modified to be compatible with  FreeCAD                  #
#                                                                  #
# Author : Mariwan Jalal  mariwan.jalal@gmail.com                  #
####################################################################

import os
import sys
import FreeCAD as App
import FreeCADGui as Gui
import pivy.coin as coin

# Great Example how you can use this to rotate objects :)


def Trackball():

    root = coin.SoSeparator()

    root.addChild(coin.SoDirectionalLight())  # child 1
    # child 2     # You can choose other types .. Look at the note bellow the code
    root.addChild(coin.SoTrackballManip())

    myMaterial = coin.SoMaterial()
    myMaterial.diffuseColor = (1.0, 0.0, 0.0)
    root.addChild(myMaterial)
    root.addChild(coin.SoCone())

    view = Gui.ActiveDocument.ActiveView
    sg = view.getSceneGraph()
    sg.addChild(root)

    """
    Note:
    There are many other kind of this manupulation widget. Please choose the following classes to get other types.add()
    
    #link : http://webcache.googleusercontent.com/search?q=cache:9kTXW4u5hIkJ:www-evasion.inrialpes.fr/people/Francois.Faure/doc/inventor_doc.con3d.org/Coin/group__manips.html+&cd=12&hl=sv&ct=clnk&gl=se&client=firefox-b-d

    coin.SoCenterballManip()   	        #The SoCenterballManip wraps an SoCenterballDragger for convenience. More...
    coin.SoClipPlaneManip()      	    #The SoClipPlaneManip class is used to manipulate clip planes. More...
    coin.SoDirectionalLightManip()  	#The SoDirectionalLightManip class is used to manipulate SoDirectionalLight nodes. More...
    coin.SoHandleBoxManip()         	#The SoHandleBoxManip class wraps an SoHandleBoxDragger for manipulating a transformation. More...
    coin.SoJackManip()              	#The SoJackManip wraps an SoJackDragger for convenience. More...
    coin.SoPointLightManip()       	    #The SoPointLightManip class is used to manipulate point light nodes. More...
    coin.SoSpotLightManip()         	#The SoSpotLightManip class is used to manipulate spot light nodes. More...
    coin.SoTabBoxManip()            	#The SoTabBoxManip class wraps an SoTabBoxDragger. More...
    coin.SoTrackballManip()    	        # The SoTrackballManip wraps an SoTrackballDragger for convenience. More...
    coin.SoTransformBoxManip()       	#The SoTransformBoxManip wraps an SoTransformBoxDragger for convenience. More...
    coin.SoTransformManip()         	#The SoTransformManip class is used to manipulate transformations. More...
    coin.SoTransformerManip()           #The SoTransformerManip wraps an SoTransformerDragger for convenience

    
    
    
    """
