Skip to content

Commit c3f0793

Browse files
committed
add markdownlint conf, apply format.
1 parent 8e8bf9d commit c3f0793

4 files changed

Lines changed: 80 additions & 51 deletions

File tree

.github/workflows/pull-request-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
mkdir -p "${{ steps.paths.outputs.external_install_dir }}"
6464
6565
- name: Clone Radium
66+
id: sha
6667
run: |
6768
git clone --recurse-submodules https://github.com/STORM-IRIT/Radium-Engine.git --single-branch ${{ env.src_prefix }}/Radium-Engine
6869
radium_sha=`git -C ${{ env.src_prefix }}/Radium-Engine rev-parse --short HEAD`

.markdownlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
2+
default: true
3+
MD002: false
4+
MD033: false
5+
6+
MD013:
7+
line_length: 520
8+
code_block_line_length: 200
9+
MD034: true
10+
MD041: false
11+
# link fragments from php markdown are not recognized
12+
MD051: false

CLISubdivider/README.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Radium Subdivider Command-Line Interface
22

3-
Load a triangle mesh and subdivide it using OpenMesh.
3+
Load a triangle mesh and subdivide it using OpenMesh.
44

55
## CLI parameters
6+
67
```cpp
78
std::cout << "Usage :\n"
89
<< argv[0] << " -i input.obj -o output -s type -n iteration \n\n"
@@ -14,43 +15,47 @@ std::cout << "Usage :\n"
1415
"iteration of subdivision\n\n";
1516
```
1617

17-
1818
## Code breakdown
19+
1920
Excluding command parsing, only very few steps are required to load, simplify and save the object:
2021

21-
1. Load triangular mesh or generate
22-
```cpp
23-
Ra::Core::Geometry::TriangleMesh mesh;
24-
Ra::IO::OBJFileManager obj;
22+
1. Load triangular mesh or generate
2523

26-
// Load geometry as triangle
27-
if ( inputFilename.empty() ) { mesh = Ra::Core::Geometry::makeBox(); }
28-
else { obj.load( inputFilename, mesh ); }
29-
```
24+
```cpp
25+
Ra::Core::Geometry::TriangleMesh mesh;
26+
Ra::IO::OBJFileManager obj;
3027

31-
2. Create topological structure from the loaded geometry, and OpenMesh datastructures.
32-
```cpp
33-
// Create topological structure
34-
Ra::Core::Geometry::TopologicalMesh topologicalMesh( mesh );
28+
// Load geometry as triangle
29+
if ( inputFilename.empty() ) { mesh = Ra::Core::Geometry::makeBox(); }
30+
else { obj.load( inputFilename, mesh ); }
31+
```
3532

36-
// Create CatmullClarkSubdivider
37-
using Subdivider =
38-
OpenMesh::Subdivider::Uniform::SubdividerT<Ra::Core::Geometry::TopologicalMesh, Scalar>;
39-
Subdiviser subdiviser(Ra::Core::Geometry::CatmullClarkSubdivider);
40-
```
33+
2. Create topological structure from the loaded geometry, and OpenMesh datastructures.
4134

42-
3. Create OpenMesh subdivider and process geometry
43-
```cpp
44-
subdivider.attach( topologicalMesh );
45-
subdivider( nIter );
46-
subdivider.detach();
47-
```
35+
```cpp
36+
// Create topological structure
37+
Ra::Core::Geometry::TopologicalMesh topologicalMesh( mesh );
4838

49-
4. Convert and save simplified geometry
50-
```cpp
51-
// Convert processed topological structure to triangle mesh
52-
mesh = topologicalMesh.toTriangleMesh();
39+
// Create CatmullClarkSubdivider
40+
using Subdivider =
41+
OpenMesh::Subdivider::Uniform::SubdividerT<Ra::Core::Geometry::TopologicalMesh, Scalar>;
42+
Subdiviser subdiviser(Ra::Core::Geometry::CatmullClarkSubdivider);
43+
```
44+
45+
3. Create OpenMesh subdivider and process geometry
46+
47+
```cpp
48+
subdivider.attach( topologicalMesh );
49+
subdivider( nIter );
50+
subdivider.detach();
51+
```
52+
53+
4. Convert and save simplified geometry
54+
55+
```cpp
56+
// Convert processed topological structure to triangle mesh
57+
mesh = topologicalMesh.toTriangleMesh();
5358

54-
// Save triangle mesh to obj file
55-
obj.save( outputFilename, mesh );
56-
```
59+
// Save triangle mesh to obj file
60+
obj.save( outputFilename, mesh );
61+
```

README.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
11
# Radium Applications
2+
23
Radium is a research 3D Engine for rendering, animation and processing.
34
It is developed and maintained by the [STORM research group](https://www.irit.fr/STORM/site/).
45

56
This repository holds front-end applications (GUI, command line) based on Radium Libraries
6-
- Sandbox: Graphical frontend of the Radium Engine. This application aims at demonstrating the capabilities of the Radium Libraries. It can be extended using Radium plugins.
7-
- CLISubdivider: Example of command line application. Loads obj files and run subdivision algorithms implemented with OpenMesh.
8-
7+
8+
- Sandbox: Graphical frontend of the Radium Engine. This application aims at demonstrating the capabilities of the Radium Libraries. It can be extended using Radium plugins.
9+
- CLISubdivider: Example of command line application. Loads obj files and run subdivision algorithms implemented with OpenMesh.
10+
911
To get more details about each application, checkout the Readme files in each application directory.
1012

11-
# How to get these applications
12-
## Pre-compiled binaries
13-
Pre-compiled binaries can be downloaded from https://github.com/STORM-IRIT/Radium-Releases/releases/.
13+
## How to get these applications
14+
15+
### Pre-compiled binaries
16+
17+
Pre-compiled binaries can be downloaded from <https://github.com/STORM-IRIT/Radium-Releases/releases/>.
1418

1519
The downloaded archive contains:
16-
- Radium libraries
17-
- Radium example applications (this repository)
1820

19-
## Compilation instructions
21+
- Radium libraries
22+
- Radium example applications (this repository)
23+
24+
### Compilation instructions
25+
2026
To compile this repository, you first need to compile and install the [Radium libraries](https://github.com/STORM-IRIT/Radium-Engine).
21-
Then, configure this project using cmake.
22-
You need to tell cmake where to find the installed Radium package by setting the `Radium_DIR` variable to the right location (see more details in Radium Engine documentation: https://storm-irit.github.io/Radium-Engine/).
27+
Then, configure this project using cmake.
28+
You need to tell cmake where to find the installed Radium package by setting the `Radium_DIR` variable to the right location (see more details in Radium Engine documentation: <https://storm-irit.github.io/Radium-Engine/>).
2329

30+
## How to write your own application
2431

25-
# How to write your own application
2632
This repository also demonstrate how to write applications and extend Radium ecosystem.
2733
Radium provides a set of tools simplifying the deployment of such applications,
2834
which among other things take care of the portability and relocatability of the
2935
binaries.
3036

31-
Other minimal application examples are available at https://github.com/STORM-IRIT/Radium-Engine/tree/master/tests/ExampleApps.
37+
Other minimal application examples are available at <https://github.com/STORM-IRIT/Radium-Engine/tree/master/tests/ExampleApps>.
3238

3339
In order to write your own application, you need to follow theses instructions.
3440

41+
### Setting a CMakeLists.txt to compile and install an application
3542

36-
## Setting a CMakeLists.txt to compile and install an application
3743
To compile and execute an application, either in the build tree
3844
or after installation, the Radium environment must be configured,
3945
compiled and installed beforehand.
4046

4147
The main CMakeLists.txt file for compiling a Radium Based application
4248
could be as simple as
49+
4350
```cmake
4451
# set the minimal cmake version supported by Radium cmake system
4552
cmake_minimum_required(VERSION 3.6)
@@ -82,18 +89,22 @@ configure_radium_app(
8289
)
8390
```
8491

85-
### Configure the application
92+
#### Configure the application
93+
8694
Radium does not support in-source builds (it is bad practice anyway).
8795
You then must first create a buid directory that will be the root of the buildtree.
8896

89-
mkdir build
90-
cd build
97+
```bash
98+
mkdir build
99+
cd build
100+
```
91101

92102
If the Radium environment was installed in the directory `pathToRadiumInstallation`,
93103
configure the project with :
94104

95-
cmake ../ -DRadium_DIR=pathToRadiumInstallation/lib/cmake/Radium
96-
105+
```bash
106+
cmake ../ -DRadium_DIR=pathToRadiumInstallation/lib/cmake/Radium
107+
```
97108

98109
By default, the application will be installed in a directory
99110
called `installed-<Compiler_id>` in the application buildtree. This installed

0 commit comments

Comments
 (0)