I3DVector¶
- class I3DVector¶
Bases:
ImpactCOMWrapperBase- Description:
Represents a 3D vector with (X,Y,Z) values.
- Remarks:
You can use i3_d_creator.vector3_d to create a new i3_d_vector object. Introduced in Impact 12.0.0.136
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property length¶
Gets Length.
- Description:
Gets the length of the 3D vector.
- Returns:
The value of Length.
- Return type:
length (float)
- property x¶
Gets X.
- Description:
Sets or gets the X compnent of the 3D vector.
- Returns:
The value of X.
- Return type:
x (float)
- property y¶
Gets Y.
- Description:
Sets or gets the Y compnent of the 3D vector.
- Returns:
The value of Y.
- Return type:
y (float)
- property z¶
Gets Z.
- Description:
Sets or gets the Z compnent of the 3D vector.
- Returns:
The value of Z.
- Return type:
z (float)
- add(vector3_d)¶
- Description:
Adds the values of another vector to a this vector.
- Parameters:
vector3_d (i3_d_vector) – The vector to add to this vector.
- assign(source)¶
- Description:
Assigns the properties of another i3_d_vector object to this object.
- Parameters:
source (i3_d_vector) – Specifies the i3_d_vector from which to copy the properties.
- distance_to(other_vector3_d)¶
- Description:
Calculates the distance between this 3D position vector and another.
- Parameters:
other_vector3_d (i3_d_vector) – The 3D position from which to determine the distance.
- Examples:
- divide(divisor)¶
- Description:
Divides a vector by a double value.
- Parameters:
divisor (float) – Specifies the value to divide by.
- equals(other_vector3_d)¶
- Description:
Determines if two 3D vectors are equal.
- Returns:
Returns true if the two points are coincident to within Impact’s built-in tolerance.
- Parameters:
other_vector3_d (i3_d_vector) – The vector to be compared with this one.
- multiply(multiplier)¶
- Description:
Multiplies a vector by a given value.
- Parameters:
multiplier (float) – Specifies the value to multiply by.
- negate()¶
- Description:
Negates the values in this vector
- subtract(vector3_d)¶
- Description:
Subtracts the value of another vector from this vector.
- Parameters:
vector3_d (i3_d_vector) – Specifies the vector to subtract.
- to_string()¶
- Description:
Returns a string representation of the 3D vector.