openGJK 项目教程

openGJK 项目教程

openGJKFast and reliable implementation of the Gilbert-Johnson-Keerthi (GJK) algorithm for C, C#, Go, Matlab and Python项目地址:https://gitcode.com/gh_mirrors/op/openGJK

1. 项目的目录结构及介绍

openGJK 项目的目录结构如下:

openGJK/
│
├── example1_c/
│   ├── CMakeLists.txt
│   ├── main.c
│   ├── userP.dat
│   └── userQ.dat
│
├── example2_mex/
│   ├── main.m
│   └── runme.m
│
├── example3_csharp/
│   └── main.cs
│
├── lib/
│   ├── CMakeLists.txt
│   ├── ext/
│   │   ├── predicates.c
│   │   └── predicates.h
│   ├── include/
│   └── openGJK/
│       ├── openGJK.h
│       └── src/
│           └── openGJK.c
│
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
└── openGJK.c

目录介绍

  • example1_c/: 包含 C 语言示例的目录,包括 CMake 配置文件、主程序文件和数据文件。
  • example2_mex/: 包含 Matlab MEX 文件示例的目录,包括主程序文件和运行脚本。
  • example3_csharp/: 包含 C# 示例的目录,包括主程序文件。
  • lib/: 包含库文件的目录,包括 CMake 配置文件、外部库文件、头文件和源文件。
  • .gitignore: Git 忽略文件配置。
  • CMakeLists.txt: 顶层 CMake 配置文件。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文档。
  • openGJK.c: 主源文件。

2. 项目的启动文件介绍

项目的启动文件主要是 main.c 文件,位于 example1_c/ 目录下。该文件是 C 语言示例的主程序文件,用于演示如何使用 openGJK 库。

// example1_c/main.c
#include <stdio.h>
#include "openGJK.h"

int main() {
    // 主程序逻辑
    return 0;
}

3. 项目的配置文件介绍

项目的配置文件主要是 CMakeLists.txt 文件,位于项目根目录和 lib/ 目录下。

根目录下的 CMakeLists.txt

# CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(openGJK)

# 添加子目录
add_subdirectory(example1_c)
add_subdirectory(example2_mex)
add_subdirectory(example3_csharp)
add_subdirectory(lib)

lib/ 目录下的 CMakeLists.txt

# lib/CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(openGJK_lib)

# 添加源文件
add_library(openGJK src/openGJK.c)

# 包含头文件目录
target_include_directories(openGJK PUBLIC include)

这些配置文件用于构建项目,包括设置项目名称、添加子目录、添加源文件和包含头文件目录等。

openGJKFast and reliable implementation of the Gilbert-Johnson-Keerthi (GJK) algorithm for C, C#, Go, Matlab and Python项目地址:https://gitcode.com/gh_mirrors/op/openGJK

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

岑魁融Justine

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值