gear_mc
 All Classes Namespaces Functions Variables
Classes | Functions
gear.xsi.vector Namespace Reference

Classes

class  Blade
 

Functions

def getDistance
 VECTORS. More...
 
def getDistance2
 Get the distance between two objects. More...
 
def trigo_opp
 
def trigo_adj
 
def getDistanceToAxe
 
def getOrthocentre
 
def getOrthocentreDistances
 
def linearlyInterpolate
 Get a vector that is the interpolation of the two input vector. More...
 
def rotateVectorAlongAxis
 Get a vector that is the rotation of first vector along an axis. More...
 
def getPlaneNormal
 Get the normal vector of a plane (Defined by 3 positions). More...
 
def getPlaneBiNormal
 Get the binormal vector of a plane (Defined by 3 positions). More...
 
def getBladeNormal
 Get the normal vector of a blade. More...
 
def getBladeNormalFromXml
 
def getBladeBiNormal
 Get the binormal vector of a blade. More...
 
def getBladeBiNormalFromXml
 
def getTransposedVector
 Get the transposed vector. More...
 
def getDegreeAngleFromPlane
 Get the transposed vector. More...
 
def drawVector
 Help method to draw a curve that represent a vector. 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.vector.drawVector (   vector,
  name = "vector",
  parent = xsi.ActiveSceneRoot 
)

Help method to draw a curve that represent a vector.

Parameters
vectorSIVector - vector to draw.
nameString - name of the vector.
parentXSI3DObject - parent object. (Used to move a vector at the position of an object).
Returns
NUrbCurve - The curve that represent the vector.
def gear.xsi.vector.getBladeBiNormal (   blade)

Get the binormal vector of a blade.

A Blade is a 3 points curve that define a plane.

Parameters
bladeNurbCurve.
Returns
SIVector3 - The binormal.
def gear.xsi.vector.getBladeNormal (   blade)

Get the normal vector of a blade.

A Blade is a 3 points curve that define a plane.

Parameters
bladeNurbCurve.
Returns
SIVector3 - The normal.
def gear.xsi.vector.getDegreeAngleFromPlane (   positions0,
  positions1 
)

Get the transposed vector.

Parameters
positions0List of SIVector - first plane position.
positions1List of SIVector - second plane position.
Returns
Double - Angle In Degree.
def gear.xsi.vector.getDistance (   v0,
  v1 
)

VECTORS.

getDistance ============================================ Get the distance between two positions.

Parameters
v0SIVector3 - First position.
v1SIVector3 - Second position.
Returns
Double - The distance.
def gear.xsi.vector.getDistance2 (   obj0,
  obj1 
)

Get the distance between two objects.

Parameters
obj0X3DObject - First object.
obj1X3DObject - Second object.
Returns
Double - The distance.
def gear.xsi.vector.getPlaneBiNormal (   v0,
  v1,
  v2 
)

Get the binormal vector of a plane (Defined by 3 positions).

Parameters
v0SIVector3 - First position on the plane.
v1SIVector3 - Second position on the plane.
v2SIVector3 - Third position on the plane.
Returns
SIVector3 - The binormal.
def gear.xsi.vector.getPlaneNormal (   v0,
  v1,
  v2 
)

Get the normal vector of a plane (Defined by 3 positions).

Parameters
v0SIVector3 - First position on the plane.
v1SIVector3 - Second position on the plane.
v2SIVector3 - Third position on the plane.
Returns
SIVector3 - The normal.
def gear.xsi.vector.getTransposedVector (   v,
  position0,
  position1,
  inverse = False 
)

Get the transposed vector.

Parameters
vSIVector - vector to transpose.
position0SIVector - original position.
position1SIVector - new position.
inverseBoolean - True to inverse the orientation.
Returns
SIVector3 - The transposed vector.
def gear.xsi.vector.linearlyInterpolate (   v0,
  v1,
  blend = .5 
)

Get a vector that is the interpolation of the two input vector.


This method is not limitied to a 0-1

Parameters
v0SIVector3 - First position.
v1SIVector3 - Second position.
blendDouble - Blend between the two vectors. (0 return the first vector, 1 return the second vector)
Returns
SIVector3 - The interpolated vector.
def gear.xsi.vector.rotateVectorAlongAxis (   v,
  axis,
  a = 0 
)

Get a vector that is the rotation of first vector along an axis.

Angle must be in radians.

Parameters
vSIVector3 - Vector to transform.
axisSIVector3 - Vector use as axes.
aDouble - Angle in radians.
Returns
SIVector3 - The newly created vector.