Skip to content

How to use

Cédric Vautrain edited this page Dec 13, 2022 · 17 revisions

Contents

Starting configuration

Config file

In the "OGREE 3D_Data" folder, we can find "config.json".

Name Type Value Comment
verbose bool
fullscreen bool
cachePath string Path of the cache directory Will store log.txt and fbx files
cacheLimitMo int Limit size of the cache directory
cliPort int The port use for TCP connection to the CLI
textures dictionnary name:path can be a local file or an url
colors dictionnary name:value Values, #RRGGBB or literal colors are listed here
alphaOnInteract int percentage of opacity when the object is selected/focused/edited/highlighted From 0 (invisible) to 100 (no opacity)
apiUrl string URL of the api
apiToken string id token for api
temperatureMinC int minimum temperature value, Celsius
temperatureMaxC int maximum temperature value, Celsius
temperatureMinF int minimum temperature value, Fahrenheit
temperatureMaxF int maximum temperature value, Fahrenheit
customTemperatureGradient int[int[4]] colors to be in a custom gradient used to show temperature first three digits are RGB values(0-255), last digit is the position of the color in the gradient (0[left]-100[right])*
useCustomGradient bool

*Ex : [[0,0,255,0],[255,0,0,100],[255,255,0,50]] creates a gradient with blue on the far left, yellow in the middle and red on the far right.

Specific colors values

Some colors values have a direct impact for the 3D client UI

Value Comment
selection Color for a rack or a device when it's selected
edit Color for a rack or a device when it's in edit mode
focus Color for a rack or a device when it's in focus mode
highlight Color for a rack or a device when it's highlighted
usableZone Default color for usable zones in rooms
reservedZone Default color for reserved zones in rooms
technicalZone Default color for technical zones in rooms

Default config file

{
    "verbose": "true",
    "fullscreen": "false",
    "cachePath": "C:/",
    "cacheLimitMo": "100",
    "cliPort": "5500",
    "textures": {
        "perf22": "https://raw.githubusercontent.com/ditrit/OGREE-3D/master/Assets/Resources/Textures/TilePerf22.png",
        "perf29": "https://raw.githubusercontent.com/ditrit/OGREE-3D/master/Assets/Resources/Textures/TilePerf29.png"
    },
    "colors": {
        "selection": "#21FF00",
        "edit": "#C900FF",
        "focus": "#FF9F00",
        "highlight": "#00D5FF",

        "usableZone": "#DBEDF2",
        "reservedZone": "#F2F2F2",
        "technicalZone": "#EBF2DE"
    },

    "api_url": "",
    "api_token": ""
}

Command line arguments

Each config file parameter can be overrided with a command line argument

--verbose [true|false]
--fullscreen [true|false]
--apiUrl[url]
--apiToken[token]

You can also start the client with an .ocli file:

--file [path to ocli file to load]

Populate objects

To populate object, you can either load a .ocli file with CLI commands written in it or type them directly on the build-in CLI.
Details about the CLI langage: https://github.com/ditrit/OGREE-3D/wiki/CLI-langage.

When you load a .ocli file, all commands in this file will be put at the end of the current file. If you want to modify an object, you should create and modify it in the same .ocli file.

Object hierarchy

We have to respect this object hierarchy in order to populate objects.

Tenant
 |_ Site
     |_ Building
         |_ Room
             |_Rack
             |  |_ Device
             |  |   |_ Device
             |  |   |   |_ Device
             |  |   |   |_ Device
             |  |   |_ ...
             |  |_ Device
             |  |_ Group
             |  |_ ...
             |_ ...
             |_ Group                      \
             |_ Corridor                   | 
             |_ PowerPanel*                | NO CHILDREN
             |_ AirConditioningSystem*     |
             |_ Cabinet*                   /
  • Not yet implemented
Clone this wiki locally