Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qosm-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quasi Optical System Modelling
qosm-core
Commits
4931f7dc
Commit
4931f7dc
authored
2 weeks ago
by
GAUDIN Gregory
Browse files
Options
Downloads
Patches
Plain Diff
Fixed header errors after docstring generation
parent
2523c48b
No related branches found
No related tags found
No related merge requests found
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
build/.empty
+0
-0
0 additions, 0 deletions
build/.empty
include/grid.hpp
+27
-33
27 additions, 33 deletions
include/grid.hpp
include/pose.hpp
+612
-187
612 additions, 187 deletions
include/pose.hpp
setup-linux.py
+2
-0
2 additions, 0 deletions
setup-linux.py
setup.py
+2
-0
2 additions, 0 deletions
setup.py
with
643 additions
and
220 deletions
build/.empty
0 → 100644
+
0
−
0
View file @
4931f7dc
This diff is collapsed.
Click to expand it.
include/grid.hpp
+
27
−
33
View file @
4931f7dc
...
...
@@ -18,7 +18,6 @@ namespace QOSM::Tools{
ZY
};
/**
* @class Grid
* @brief Represents a 2D grid of points in a specified plane.
...
...
@@ -27,7 +26,7 @@ namespace QOSM::Tools{
* ranges. It supports various grid generation methods and transformations such
* as rotation and scaling.
*/
class
Grid
{
class
Grid
{
protected:
/**
* @brief Creates grid points within the specified parameter ranges.
...
...
@@ -37,11 +36,7 @@ namespace QOSM::Tools{
* @param n A scaling factor.
* @param plane The plane type in which the grid is defined.
*/
void
createPoints
(
const
std
::
array
<
double
,
2
>&
uRange
,
const
std
::
array
<
double
,
2
>&
vRange
,
const
std
::
array
<
int
,
2
>&
numPoints
,
const
double
&
n
,
const
PlaneType
&
plane
);
void
createPoints
(
const
std
::
array
<
double
,
2
>
&
uRange
,
const
std
::
array
<
double
,
2
>
&
vRange
,
const
std
::
array
<
int
,
2
>
&
numPoints
,
const
double
&
n
,
const
PlaneType
&
plane
);
public:
std
::
array
<
unsigned
int
,
2
>
shape
{
0
,
0
};
///< Grid dimensions (rows, cols).
...
...
@@ -49,7 +44,7 @@ namespace QOSM::Tools{
nc
::
NdArray
<
double
>
v
;
///< V-coordinates of grid points.
VectorNx3
points
;
///< 3D coordinates of grid points.
PlaneType
type
;
///< Type of plane where the grid is defined.
/**
* @brief Constructs a Grid with adaptive step size.
* @param uRange Range and step for the u-coordinate (min, max, step).
...
...
@@ -58,10 +53,10 @@ namespace QOSM::Tools{
* @param plane The plane type in which the grid is defined.
*/
Grid
(
const
std
::
array
<
double
,
3
>&
uRange
,
const
std
::
array
<
double
,
3
>&
vRange
,
const
double
&
n
,
const
PlaneType
&
plane
);
const
std
::
array
<
double
,
3
>&
vRange
,
const
double
&
n
,
const
PlaneType
&
plane
);
/**
* @brief Constructs a Grid with a fixed number of points.
* @param uRange Range of the u-coordinate (min, max).
...
...
@@ -70,59 +65,58 @@ namespace QOSM::Tools{
* @param n A scaling factor.
* @param plane The plane type in which the grid is defined.
*/
Grid
(
const
std
::
array
<
double
,
2
>
&
uRange
,
const
std
::
array
<
double
,
2
>
&
vRange
,
const
std
::
array
<
int
,
2
>
&
numPoints
,
const
double
&
n
,
const
PlaneType
&
plane
);
Grid
(
const
std
::
array
<
double
,
2
>
&
uRange
,
const
std
::
array
<
double
,
2
>
&
vRange
,
const
std
::
array
<
int
,
2
>
&
numPoints
,
const
double
&
n
,
const
PlaneType
&
plane
);
/**
* @brief Rotates the grid around the U-axis.
* @param centre The center of rotation.
* @param angle The rotation angle (in radians by default).
* @param deg If true, the angle is interpreted in degrees.
*/
void
rotateAlongU
(
const
Vec3
&
centre
,
const
double
&
angle
,
const
bool
&
deg
=
false
);
void
rotateAlongU
(
const
Vec3
&
centre
,
const
double
&
angle
,
const
bool
&
deg
=
false
);
/**
* @brief Rotates the grid around the V-axis.
* @param centre The center of rotation.
* @param angle The rotation angle (in radians by default).
* @param deg If true, the angle is interpreted in degrees.
*/
void
rotateAlongV
(
const
Vec3
&
centre
,
const
double
&
angle
,
const
bool
&
deg
=
false
);
void
rotateAlongV
(
const
Vec3
&
centre
,
const
double
&
angle
,
const
bool
&
deg
=
false
);
/**
* @brief Rotates the grid using a quaternion.
* @param centre The center of rotation.
* @param rot The quaternion representing the rotation.
*/
void
rotate
(
const
Vec3
&
centre
,
const
Quaternion
&
rot
);
void
rotate
(
const
Vec3
&
centre
,
const
Quaternion
&
rot
);
/**
* @brief Scales the grid.
* @param scale The scaling factor.
*/
void
operator
*=
(
const
double
&
scale
);
void
operator
*=
(
const
double
&
scale
);
/**
* @brief Uniformly scales down the grid.
* @param scale The scaling factor.
*/
void
operator
/=
(
const
double
&
scale
);
void
operator
/=
(
const
double
&
scale
);
/**
* @brief Translates the grid by a given offset.
* @param offset The translation vector.
*/
void
operator
+=
(
const
Vec3
&
offset
);
void
operator
+=
(
const
Vec3
&
offset
);
/**
* @brief Translates the grid in the opposite direction of a given offset.
* @param offset The translation vector.
*/
void
operator
-=
(
const
Vec3
&
offset
);
};
void
operator
-=
(
const
Vec3
&
offset
);
};
}
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
include/pose.hpp
+
612
−
187
View file @
4931f7dc
This diff is collapsed.
Click to expand it.
setup-linux.py
+
2
−
0
View file @
4931f7dc
...
...
@@ -44,6 +44,8 @@ setup(
name
=
"
qosm_core
"
,
cmdclass
=
{
"
build_ext
"
:
build_ext
},
ext_modules
=
ext_modules
,
zip_safe
=
False
,
python_requires
=
"
>=3.11
"
,
)
# USAGE:
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
0
View file @
4931f7dc
...
...
@@ -39,6 +39,8 @@ setup(
name
=
"
qosm_core
"
,
cmdclass
=
{
"
build_ext
"
:
build_ext
},
ext_modules
=
ext_modules
,
zip_safe
=
False
,
python_requires
=
"
>=3.11
"
,
)
# USAGE:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment