Vector3¶
Inheritance diagram¶

Classes¶
Vector3¶
- class ORSModel.ors.Vector3¶
Bases:
UnmanagedA wrapper to a 3D vector.
- add(self, aVector: ORSModel.ors.Vector3)¶
Adds a vector to the receiver.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- copy(self) ORSModel.ors.Vector3¶
Returns a new vector identical to the receiver (a copy).
- Returns:
output (ORSModel.ors.Vector3) –
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Vector3¶
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Vector3) –
- getAPerpendicular(self) ORSModel.ors.Vector3¶
Computes a perpendicular from the vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- Returns:
output (ORSModel.ors.Vector3) – a perpendicular vector (an Vector3)
- getAdditionWith(self, aVector: ORSModel.ors.Vector3) ORSModel.ors.Vector3¶
Gets the result of adding a vector to the receiver.
Note
The receiver is not modified.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
- getAngleWith(self, pVect: ORSModel.ors.Vector3) float¶
Computes the angle with another vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (float) – the angle (a double)
- getClassNameStatic() str¶
getClassNameStatic
- Returns:
output (str) –
- getClosestPointOnTriangle(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) ORSModel.ors.Vector3¶
- Parameters:
point0 (ORSModel.ors.Vector3) – a vector (an Vector3)
point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
point2 (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Vector3) – a vector (an Vector3)
- getCrossProductWith(self, pVect: ORSModel.ors.Vector3) ORSModel.ors.Vector3¶
Computes the cross product with another vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Vector3) – the cross product (a double)
- getDistanceFrom(self, pVect: ORSModel.ors.Vector3) float¶
Computes the distance to another vector.
- Parameters:
pVect (ORSModel.ors.Vector3) – another vector (an Vector3)
- Returns:
output (float) – the distance (a double)
- getDistanceFromClosestPointOnTriangle(self, point0: ORSModel.ors.Vector3, point1: ORSModel.ors.Vector3, point2: ORSModel.ors.Vector3) float¶
- Parameters:
point0 (ORSModel.ors.Vector3) – a vector (an Vector3)
point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
point2 (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (float) – a Double
- getDotProductWith(self, pVect: ORSModel.ors.Vector3) float¶
Computes the dot product with another vector.
See also
ORSModel.ors.Vector3.getCrossProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- Parameters:
pVect (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (float) – the dot product (a double)
- getIsEqualTo(self, aVector: ORSModel.ors.Vector3) bool¶
- Parameters:
aVector (ORSModel.ors.Vector3) –
- Returns:
output (bool) –
- getLargestComponent(self) float¶
- Returns:
output (float) – the biggest component of the vector
- getLength(self) float¶
Gets the vector’s length.
- Returns:
output (float) – the length (a double)
- getLinearInterpolationWith(self, point1: ORSModel.ors.Vector3, normalizePosition: float) ORSModel.ors.Vector3¶
Computes the lerp with another vector.
See also
ORSModel.ors.Vector3.getDotProductWith(),ORSModel.ors.Vector3.getAngleWith(),ORSModel.ors.Vector3.getDistanceFrom()- Parameters:
point1 (ORSModel.ors.Vector3) – a vector (an Vector3)
normalizePosition (float) – a interpolation factor [0,1](a double)
- Returns:
output (ORSModel.ors.Vector3) – the lerp vector (an Vector3)
- getNegated(self) ORSModel.ors.Vector3¶
Gets the receiver negated in a new vector.
Note
The receiver is not modified.
- Returns:
output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
- getNormalized(self) ORSModel.ors.Vector3¶
- Returns:
output (ORSModel.ors.Vector3) –
- getPhi(self) float¶
Note
Equivalent to atan(y/x), where the provided result is in the range [0, 2*pi[.
Note
The vector should be normalized.
- Returns:
output (float) – the angle in radians (a double)
- getRotatedAroundAxis(self, anAxis: ORSModel.ors.Vector3, centerOfRotation: ORSModel.ors.Vector3, angleInRadian: float) ORSModel.ors.Vector3¶
- Parameters:
anAxis (ORSModel.ors.Vector3) – an axis vector (an Vector3)
centerOfRotation (ORSModel.ors.Vector3) – an centerOfRotation vector (an Vector3)
angleInRadian (float) – an angle in radian (a double)
- Returns:
output (ORSModel.ors.Vector3) – the product of the rotation (an Vector3)
- getScaledBy(self, scaleFactor: float) ORSModel.ors.Vector3¶
Gets the result of scaling a vector to the receiver.
Note
The receiver is not modified.
- Parameters:
scaleFactor (float) – a scale a double
- Returns:
output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
- getSmallestComponent(self) float¶
- Returns:
output (float) – the smallest component of the vector
- getSubtractionFrom(self, aVector: ORSModel.ors.Vector3) ORSModel.ors.Vector3¶
Gets the result of subtracting a vector from the receiver.
Note
The receiver is not modified.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
- Returns:
output (ORSModel.ors.Vector3) – the resulting vector (an Vector3)
- getTheta(self) float¶
Gets the angle from the positive z axis.
Note
Equivalent to acos(z), where the provided result is in the range [0, pi].
Note
The vector should be normalized.
- Returns:
output (float) – the angle in radians (a double)
- getX(self) float¶
Gets the X value from the vector.
See also
ORSModel.ors.Vector3.getY(),ORSModel.ors.Vector3.getZ(), getW()- Returns:
output (float) – a double
- getY(self) float¶
Gets the Y value from the vector.
See also
ORSModel.ors.Vector3.getX(),ORSModel.ors.Vector3.getZ(), getW()- Returns:
output (float) – a double
- getZ(self) float¶
Gets the Z value from the vector.
See also
ORSModel.ors.Vector3.getX(),ORSModel.ors.Vector3.getY(), getW()- Returns:
output (float) – a double
- negate(self)¶
Negates the vector.
- normalize(self)¶
Normalizes the vector.
Note
A normalized vector has norm (length) 1.
- scale(self, scaleFactor: float)¶
Scales the vector.
- Parameters:
scaleFactor (float) – a scale factor (a double)
- setX(self, value: float)¶
Sets the X value of the vector.
See also
ORSModel.ors.Vector3.setY(),ORSModel.ors.Vector3.setZ(), setW()- Parameters:
value (float) – a double value
- setXYZ(self, x: float, y: float, z: float)¶
Sets the 3 vector component.
Note
W is set to zero
- Parameters:
x (float) – the X component (a double)
y (float) – the Y component (a double)
z (float) – the Z component (a double)
- setY(self, value: float)¶
Sets the Y value of the vector.
See also
ORSModel.ors.Vector3.setX(),ORSModel.ors.Vector3.setZ(), setW()- Parameters:
value (float) – a double value
- setZ(self, value: float)¶
Sets the Z value of the vector.
See also
ORSModel.ors.Vector3.setX(),ORSModel.ors.Vector3.setY(), setW()- Parameters:
value (float) – a double value
- subtract(self, aVector: ORSModel.ors.Vector3)¶
Subtracts a vector from the receiver.
- Parameters:
aVector (ORSModel.ors.Vector3) – a vector (an Vector3)
Unmanaged¶
- class ORSModel.ors.Unmanaged
Bases:
ORSBaseClassAbstract class for objects that are not managed by the core library. Unmanaged objects are transient objects.
- atomicLoad(sFilename: str) Unmanaged
Creates an object from a file where an object was saved.
- Parameters:
sFilename (str) – path of the file to load
- Returns:
output (Unmanaged) – an unmanaged object, or none() if the load fails
- atomicSave(self, aFilename: str) int
Saves the object to a file.
- Parameters:
aFilename (str) – path of the file to save
- Returns:
output (int) – 0 if successful, otherwise an error code
- createFromPythonRepresentation(aPythonRepresentation: str) ORSModel.ors.Unmanaged
Create aUnmanaged Object from a python representation a static method.
- Parameters:
aPythonRepresentation (str) –
- Returns:
output (ORSModel.ors.Unmanaged) –
- fromPythonRepresentation(self, aPythonRepresentation: str) bool
Create aUnmanaged object from a Python string representation.
- Parameters:
aPythonRepresentation (str) – a Python evaluable string representation (a string)
- Returns:
output (bool) – true if parsing worked, false otherwise (a bool)
- getClassName(self) str
Retrieves the class name of the core object wrapped by this Interface object.
- Returns:
output (str) –
- getClassNameStatic() str
getClassNameStatic
- Returns:
output (str) –
- getDataChecksum(self) str
- Returns:
output (str) –
- getIsInstanceOf(self, pProgId: str) bool
Queries the object to know if it is an instance of a certain class.
- Parameters:
pProgId (str) –
- Returns:
output (bool) –
- getPythonRepresentation(self) str
Gets a Python evaluable string representation.
- Returns:
output (str) –
- isNone(self) bool
Checks if the receiver is none.
- Returns:
output (bool) –
- isNotNone(self) bool
Checks if the receiver is not none.
- Returns:
output (bool) –
ORSBaseClass¶
- class ORSModel.ors.ORSBaseClass
An abstract class from which all objects issued from the ORS Core Library inherit.
- getPythonTraceBack() List[str]
Set the python traceback for a call from python.
- Returns:
output (List[str]) –
- isManaged(self) bool
- Returns:
output (bool) –
- isNone(self) bool
- Returns:
output (bool) –
- setPythonTraceBack(tb: List[str])
Set the python traceback for a call from python.
- Parameters:
tb (List[str]) –