Base: apply clang format

This commit is contained in:
wmayer
2023-11-10 18:27:44 +01:00
committed by WandererFan
parent bb333d9a74
commit 985def3416
154 changed files with 11874 additions and 9872 deletions

View File

@@ -16,21 +16,21 @@
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Vector export class</DeveloperDocu>
<UserDocu>Base.Vector class.
<UserDocu>Base.Vector class.
This class represents a 3D float vector.
Useful to represent points in the 3D space.
Useful to represent points in the 3D space.
The following constructors are supported:
The following constructors are supported:
Vector(x=0, y=0, z=0)
x : float
y : float
z : float
z : float
Vector(vector)
Copy constructor.
vector : Base.Vector
vector : Base.Vector
Vector(seq)
Define from a sequence of float.
@@ -38,83 +38,83 @@ seq : sequence of float.</UserDocu>
</Documentation>
<Methode Name="__reduce__" Const="true">
<Documentation>
<UserDocu>__reduce__() -> tuple
<UserDocu>__reduce__() -> tuple
Serialization of Vector objects.</UserDocu>
</Documentation>
</Methode>
<Methode Name="add" Const="true">
<Documentation>
<UserDocu>add(vector2) -> Base.Vector
<UserDocu>add(vector2) -> Base.Vector
Returns the sum of this vector and `vector2`.
Returns the sum of this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="sub" Const="true">
<Documentation>
<UserDocu>sub(vector2) -> Base.Vector
<UserDocu>sub(vector2) -> Base.Vector
Returns the difference of this vector and `vector2`.
Returns the difference of this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="negative" Const="true">
<Documentation>
<UserDocu>negative() -> Base.Vector
<UserDocu>negative() -> Base.Vector
Returns the negative (opposite) of this vector.</UserDocu>
</Documentation>
</Methode>
<Methode Name="scale">
<Documentation>
<UserDocu>scale(x, y, z) -> Base.Vector
<UserDocu>scale(x, y, z) -> Base.Vector
Scales in-place this vector by the given factor in each component.
Scales in-place this vector by the given factor in each component.
x : float
x : float
x-component factor scale.
y : float
y : float
y-component factor scale.
z : float
z : float
z-component factor scale.</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply">
<Documentation>
<UserDocu>multiply(factor) -> Base.Vector
<UserDocu>multiply(factor) -> Base.Vector
Multiplies in-place each component of this vector by a single factor.
Equivalent to scale(factor, factor, factor).
Equivalent to scale(factor, factor, factor).
factor : float</UserDocu>
</Documentation>
</Methode>
<Methode Name="dot" Const="true">
<Documentation>
<UserDocu>dot(vector2) -> float
<UserDocu>dot(vector2) -> float
Returns the scalar product (dot product) between this vector and `vector2`.
Returns the scalar product (dot product) between this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="cross" Const="true">
<Documentation>
<UserDocu>cross(vector2) -> Base.Vector
<UserDocu>cross(vector2) -> Base.Vector
Returns the vector product (cross product) between this vector and `vector2`.
Returns the vector product (cross product) between this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="isOnLineSegment" Const="true">
<Documentation>
<UserDocu>isOnLineSegment(vector1, vector2) -> bool
<UserDocu>isOnLineSegment(vector1, vector2) -> bool
Checks if this vector is on the line segment generated by `vector1` and `vector2`.
Checks if this vector is on the line segment generated by `vector1` and `vector2`.
vector1 : Base.Vector
vector2 : Base.Vector</UserDocu>
@@ -122,26 +122,26 @@ vector2 : Base.Vector</UserDocu>
</Methode>
<Methode Name="getAngle" Const="true">
<Documentation>
<UserDocu>getAngle(vector2) -> float
<UserDocu>getAngle(vector2) -> float
Returns the angle in radians between this vector and `vector2`.
Returns the angle in radians between this vector and `vector2`.
vector2 : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="normalize">
<Documentation>
<UserDocu>normalize() -> Base.Vector
<UserDocu>normalize() -> Base.Vector
Normalizes in-place this vector to the length of 1.0.</UserDocu>
</Documentation>
</Methode>
<Methode Name="isEqual" Const="true">
<Documentation>
<UserDocu>isEqual(vector2, tol=0) -> bool
<UserDocu>isEqual(vector2, tol=0) -> bool
Checks if the distance between the points represented by this vector
and `vector2` is less or equal to the given tolerance.
and `vector2` is less or equal to the given tolerance.
vector2 : Base.Vector
tol : float</UserDocu>
@@ -149,14 +149,14 @@ tol : float</UserDocu>
</Methode>
<Methode Name="projectToLine">
<Documentation>
<UserDocu>projectToLine(point, dir) -> Base.Vector
<UserDocu>projectToLine(point, dir) -> Base.Vector
Projects `point` on a line that goes through the origin with the direction `dir`.
The result is the vector from `point` to the projected point.
The operation is equivalent to dir_n.cross(dir_n.cross(point)), where `dir_n` is
the vector `dir` normalized.
The method modifies this vector instance according to result and does not
depend on the vector itself.
depend on the vector itself.
point : Base.Vector
dir : Base.Vector</UserDocu>
@@ -164,10 +164,10 @@ dir : Base.Vector</UserDocu>
</Methode>
<Methode Name="projectToPlane">
<Documentation>
<UserDocu>projectToPlane(base, normal) -> Base.Vector
<UserDocu>projectToPlane(base, normal) -> Base.Vector
Projects in-place this vector on a plane defined by a base point
represented by `base` and a normal defined by `normal`.
represented by `base` and a normal defined by `normal`.
base : Base.Vector
normal : Base.Vector</UserDocu>
@@ -175,20 +175,20 @@ normal : Base.Vector</UserDocu>
</Methode>
<Methode Name="distanceToPoint" Const="true">
<Documentation>
<UserDocu>distanceToPoint(point2) -> float
<UserDocu>distanceToPoint(point2) -> float
Returns the distance to another point represented by `point2`.
Returns the distance to another point represented by `point2`.
.
point : Base.Vector</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToLine" Const="true">
<Documentation>
<UserDocu>distanceToLine(base, dir) -> float
<UserDocu>distanceToLine(base, dir) -> float
Returns the distance between the point represented by this vector
and a line defined by a base point represented by `base` and a
direction `dir`.
direction `dir`.
base : Base.Vector
dir : Base.Vector</UserDocu>
@@ -196,11 +196,11 @@ dir : Base.Vector</UserDocu>
</Methode>
<Methode Name="distanceToLineSegment" Const="true">
<Documentation>
<UserDocu>distanceToLineSegment(point1, point2) -> Base.Vector
<UserDocu>distanceToLineSegment(point1, point2) -> Base.Vector
Returns the vector between the point represented by this vector and the point
on the line segment with the shortest distance. The line segment is defined by
`point1` and `point2`.
`point1` and `point2`.
point1 : Base.Vector
point2 : Base.Vector</UserDocu>
@@ -208,10 +208,10 @@ point2 : Base.Vector</UserDocu>
</Methode>
<Methode Name="distanceToPlane" Const="true">
<Documentation>
<UserDocu>distanceToPlane(base, normal) -> float
<UserDocu>distanceToPlane(base, normal) -> float
Returns the distance between this vector and a plane defined by a
base point represented by `base` and a normal defined by `normal`.
base point represented by `base` and a normal defined by `normal`.
base : Base.Vector
normal : Base.Vector</UserDocu>