Chapter 1. Data Types and Coordinate System
Prev |  | Next

# Chapter 1. Data Types and Coordinate System

WM3D uses several types of values (ex. Integer, Float, String). Values must be quoted regardless of value types.

Examples:

<ATOM radius="2.0" quality="3" pos="0 0 0" \>
<LABEL text="N-terminus" pos="0 0 0" \>

## Data Types

### Basic Types (Int, Float, String)

Standard types. Integer, Float, and String values. Integer values are also valid for float values, see following samples. String accepts all most all kinds of quoted values.

Integer(Int): "1", "0", "-3"
Float: "1.1", "1.0", "1"
String: "3", "1.1", "text", "foobar"

### Point3D

Point3D is a three-dimension position/vector. This must have space-separated three float values. Leading, trailing, and any consecutive spaces are ignored in versions 0.22 or later. Do not add such spaces in versions older than 0.22.

Examples:

"4 5 6"
" 2.0 1.0 3.0 "
"-2.0 1.0 3.0 "
" -2.0 1.0 3"

Note: for versions before 0.22, only the first one is valid.

### Color

Colors can be specified either in a string such as "red" or a triplet of hexadecimal values (red, green, and blue).

Examples:

"red"
"0xFF0000" (same as "red")
"0x0000FF" (same as "blue")
"cyan"

All the predefined values are in the following.

COLORNAME : RGB VALUE
white : 0xFFFFFF
silver : 0xC0C0C0
gray : 0x808080
black : 0x000000
cyan : 0x00FFFF
navy : 0x000080
blue : 0x0000FF
lime : 0x00FF00
green : 0x008000
springgreen : 0x00FF7F
limegreen : 0x32CD32
darkgreen : 0x006400
khaki : 0xF0E68C
orange : 0xFFA500
yellow : 0xFFFF00
brown : 0xA52A2A
chocolate : 0xD2691E
gold : 0xFFD700
violet : 0xEE82EE
salmon : 0xFA8072
purple : 0x800080
red : 0xFF0000
magenta : 0xFF00FF
pink : 0xFFC0CB

Prev |  | Next
Introduction | Home | Coordinate System