mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-15 19:55:57 +08:00
Add a command line applicatiosn guide.
This commit is contained in:
parent
eee8bf5d86
commit
b496a3da1e
45
docs/guides/COMMAND_LINE_APPLICATIONS.md
Normal file
45
docs/guides/COMMAND_LINE_APPLICATIONS.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Using Draco Command Line Applications
|
||||||
|
|
||||||
|
This guide will show you how to build, and use the Draco command line
|
||||||
|
applications to encode and decode Draco files.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Clone the Github repository using this command line:
|
||||||
|
```
|
||||||
|
git clone git@github.com:<username>/draco.git
|
||||||
|
```
|
||||||
|
_**Note** that we **strongly** recommend [using SSH] with GitHub, not HTTPS._
|
||||||
|
|
||||||
|
|
||||||
|
Build the command line applications with these commands:
|
||||||
|
```
|
||||||
|
cd draco
|
||||||
|
```
|
||||||
|
|
||||||
|
It is best to create an isolated build directory.
|
||||||
|
```
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
```
|
||||||
|
|
||||||
|
Run cmake to build `draco_encoder` and `draco_decoder`.
|
||||||
|
```
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
## Encode Draco File
|
||||||
|
|
||||||
|
Encode a mesh file using the default settings. `draco_encoder` will read OBJ or PLY files as input, and output Draco files. We have included Stanford's Bunny mesh for testing. The basic command line looks like this:
|
||||||
|
```
|
||||||
|
./draco_encoder -i ../testdata/bun_zipper.ply -o bunny.drc
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Decode Draco File
|
||||||
|
|
||||||
|
`draco_decoder` will read Draco files as input, and output OBJ or PLY files. The basic command line looks like this:
|
||||||
|
```
|
||||||
|
./draco_encoder -i bunny.drc -o bunny.ply
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user