gear_mc
 All Classes Namespaces Functions Variables
Functions
gear.xsi.transform Namespace Reference

Functions

def getTransformLookingAt
 TRANSFORM. More...
 
def getChainTransform
 
def getGlobalPositionFromObjects
 Get the global translation of each object in list or collection. More...
 
def getTransformFromPosition
 Get a SITransformation with translation equal the given position. More...
 
def getSymmetricalTransform
 Get the SITransformation. More...
 
def getSymmetricalTransform2
 
def matchGlobalTransform
 Math the global transformation of target object to source. More...
 
def getFilteredTransform
 Retrieve a transformation filtered. More...
 
def getNegatedTransform
 
def setRefPose
 KINEMATICS. More...
 
def getRotationFromAxis
 ROTATION. More...
 

Detailed Description

    This file is part of GEAR_mc.
    GEAR_mc is a fork of Jeremie Passerin's GEAR project.

    GEAR is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/lgpl.html>.

    Author:     Jeremie Passerin    geerem@hotmail.com  www.jeremiepasserin.com
    Fork Author:  Miquel Campos       hello@miqueltd.com  www.miqueltd.com
    Date:       2013 / 08 / 16
Author
Jeremie Passerin

Function Documentation

def gear.xsi.transform.getFilteredTransform (   t,
  translation = True,
  rotation = True,
  scaling = True 
)

Retrieve a transformation filtered.

Parameters
tSITransformation - Reference transformation.
translationBoolean - True to match translation.
rotationBoolean - True to match rotation.
scalingBoolean - True to match scaling.
Returns
SITransformation - The filtered transformation
def gear.xsi.transform.getGlobalPositionFromObjects (   collection)

Get the global translation of each object in list or collection.

Parameters
collectionList of X3DObject or XSICollection.
Returns
List of SIVector3 - The global translation.
def gear.xsi.transform.getRotationFromAxis (   in_a,
  in_b,
  axis = "xy",
  negate = False 
)

ROTATION.

setRefPose =============================================

def gear.xsi.transform.getSymmetricalTransform (   t,
  axis = "yz" 
)

Get the SITransformation.

Parameters
tSITransformation - The transform to symmetrize.
axisSIVector3 - Mirroring axis.
Returns
SITransformatin - The newy created transform
def gear.xsi.transform.getTransformFromPosition (   position)

Get a SITransformation with translation equal the given position.

Parameters
positionSIVector3 - The position
Returns
SITransformatin - The newy created transform
def gear.xsi.transform.getTransformLookingAt (   position,
  lookat,
  normal,
  axis = "xy",
  negate = False 
)

TRANSFORM.

getTransformLookingAt ================================== Get a transform that is oriented looking at another position.

Parameters
positionSIVector3 - The position of the object.
lookAtPosSIVector3 - The position that the object is looking at.
upvSIVector3 - Up vector direction.
negateBoolean - True to create negative side transform.
axisString - First the axis point at the look at position then the axe pointing to the up vector ("xy", "xz", "yx", "yz", "zx", "zy")
Returns
SITransformation - The newly created transform.
def gear.xsi.transform.matchGlobalTransform (   target,
  source,
  translation = True,
  rotation = True,
  scaling = True 
)

Math the global transformation of target object to source.

Parameters
targetX3DObject - Target object. The one we apply the new transform to.
sourceX3DObject - Source object.
translationBoolean - True to match translation.
rotationBoolean - True to match rotation.
scalingBoolean - True to match scaling.
def gear.xsi.transform.setRefPose (   obj,
  orientation = [0,
  negate = False 
)

KINEMATICS.

setRefPose ============================================= set the reference (neutral) pose of an object. Neutral translation and scaling and neutral orientation with offset.

Parameters
objX3DObject - The object.
orientationList of Double - The object neutral pose orientation angles in degrees.
negateBoolean - True to use with negative side.