From 0a46bb50adfd8b082857a3a1efe0bbd2b5272f7e Mon Sep 17 00:00:00 2001 From: iutbgdin Date: Thu, 9 Oct 2025 12:28:36 +0200 Subject: [PATCH] readme --- README.md | 23 ++++++++++++++++++----- src/main.cpp | 3 +++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1391f74..66c46fc 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/main.cpp b/src/main.cpp index e69de29..f4403b1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -0,0 +1,3 @@ +int main { + return 0; +}