readme
This commit is contained in:
parent
018010acbd
commit
0a46bb50ad
2 changed files with 21 additions and 5 deletions
23
README.md
23
README.md
|
@ -1,6 +1,17 @@
|
||||||
# 3d-render
|
# 3d-render
|
||||||
|
|
||||||
## `.obj` files
|
## Files
|
||||||
|
|
||||||
|
This program use two kind of files to represent a 3D world:
|
||||||
|
- `obj` which are a list of planes representing an object.
|
||||||
|
- `map` which are a list of object representing the the world itself.
|
||||||
|
|
||||||
|
Only one map file can be use at time and a map can reference other maps.
|
||||||
|
Anything in a map is relative to the base point of the map, which is (0, 0, 0) for the 'top map' contain everything else. A map point is fix a can't be negative. An object point is relative to the map point and can be negative.
|
||||||
|
|
||||||
|
### `.obj` files
|
||||||
|
|
||||||
|
0,0,0 is the bottom-left-front point of the object. It is used to translate the object in the 3D map.
|
||||||
|
|
||||||
Syntaxe
|
Syntaxe
|
||||||
```
|
```
|
||||||
|
@ -16,17 +27,19 @@ OBJECT
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## `.map` files
|
### `.map` files
|
||||||
|
|
||||||
|
Calling a map file from a map file will change the reference point of the called map from fixed to relative to the current map.
|
||||||
|
|
||||||
Syntaxe
|
Syntaxe
|
||||||
```
|
```
|
||||||
MAP <- header
|
MAP <- header
|
||||||
Call object file -> x,y,z <- object position : name <- Object name
|
Call object/map file: x,y,z <- object position : filename
|
||||||
```
|
```
|
||||||
|
|
||||||
Example
|
Example
|
||||||
```
|
```
|
||||||
MAP
|
MAP
|
||||||
1,5,0:cube
|
1,5,0:cube.map
|
||||||
2.3,2.0,6:light
|
2.3,2.0,6:light.obj
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
int main {
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue