misc.h

Mon, 18 Mar 2013 18:29:02 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 18 Mar 2013 18:29:02 +0200
changeset 29
55406ce7446e
parent 25
c74bb88f537d
child 30
31ff9aabd506
permissions
-rw-r--r--

Added LDraw path setting dialog

#ifndef __MISC_H__
#define __MISC_H__

#include "common.h"
#include "str.h"

inline str GetWord (str& zString, ulong ulIndex) {
	return (zString / " ")[ulIndex];
}

double getWordFloat (str& s, const ushort n);
long getWordInt (str& s, const ushort n);
vertex parseVertex (str& s, const ushort n);
void stripWhitespace (str& s);

// Returns whether a given string represents a floating point number
// TODO: Does LDraw support scientific notation?
bool isNumber (str& zToken);

// Converts a float value to a string value.
str ftoa (double fCoord);

#endif // __MISC_H__

mercurial