This commit is contained in:
iutbgdin 2025-10-09 12:28:36 +02:00
parent 018010acbd
commit 0a46bb50ad
2 changed files with 21 additions and 5 deletions

View file

@ -1,6 +1,17 @@
# 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
```
@ -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
```
MAP <- header
Call object file -> x,y,z <- object position : name <- Object name
Call object/map file: x,y,z <- object position : filename
```
Example
```
MAP
1,5,0:cube
2.3,2.0,6:light
1,5,0:cube.map
2.3,2.0,6:light.obj
```