VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
tdbutil
unitFormatter.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2005 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: unitFormatter.h,v $ $Revision: 1.4 $ $State: Exp $
7
*******************************************************************************/
8
9
#pragma once
10
11
#include <vlutil/vlString.h>
12
#include <matrix/vlVector.h>
13
14
#include "
tdbutil/tdbUtilDefines.h
"
15
16
// Set the global translation function to handle your own custom translations
17
typedef
DtString
(*
DtTranslatorFunction
)(
const
char
* text,
const
char
* module);
18
19
DT_DLL_tdbutil
DtString
trUtf8
(
const
char
* text,
const
char
* module);
20
DT_DLL_tdbutil
void
setTranslatorFunction
(
DtTranslatorFunction
);
21
22
// Pretty formatting for back-end tasks and sets
23
24
class
DT_DLL_tdbutil
DtUnitFormatter
25
{
26
public
:
27
virtual
DtString
formatSourceToDisplay
(
const
DtVector
& val)
const
;
28
virtual
DtString
formatSourceToDisplay
(
double
val,
const
DtString
& unitDisplay,
29
const
DtString
& source,
DtString
& unitLabel)
const
;
30
};
31
32
DT_DLL_tdbutil
DtUnitFormatter
*
setUnitFormatter
(
DtUnitFormatter
*);
33
34
// Assumes that DtVector is in geocentric
35
DT_DLL_tdbutil
DtString
formatSourceToDisplay
(
const
DtVector
& val);
36
37
// value must be in source units as defined in tdbUnits.h
38
DT_DLL_tdbutil
DtString
formatSourceToDisplay
(
double
val,
const
DtString
& unitDisplay,
39
const
DtString
& source,
DtString
& unitLabel);
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)