VR-Forces 4.6 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
vrfutil
rwColor.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2015 MaK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
9
10
#pragma once
11
12
#include "
vrfutil/readerWriter.h
"
13
#include "
vrfutil/rwInt.h
"
14
#include "
vrfutil/vrfutilDefines.h
"
15
#include "
geometry/color.h
"
16
17
19
class
DT_DLL_vrfutil
DtRwColor
:
public
DtReaderWriter
20
{
21
public
:
22
23
//Default constructor
24
DtRwColor
();
25
26
//Real constructors
27
DtRwColor
(
const
DtString
& name,
28
DtReaderWriterRegistry
* parentRegistry = NULL);
29
DtRwColor
(
const
DtSymbolString
& name,
30
DtReaderWriterRegistry
* parentRegistry = NULL);
31
32
//Copy constructor
33
DtRwColor
(
const
DtRwColor
& orig);
34
DtRwColor
&
operator=
(
const
DtRwColor
& orig);
35
36
DtRwColor
(
const
DtColor
& orig);
37
DtRwColor
&
operator=
(
const
DtColor
& orig);
38
39
virtual
void
setRed
(
int
v) {myRed = v;};
40
virtual
int
red
()
const
{
return
myRed;};
41
42
virtual
void
setGreen
(
int
v) {myGreen = v;};
43
virtual
int
green
()
const
{
return
myGreen;};
44
45
virtual
void
setBlue
(
int
v) {myBlue = v;};
46
virtual
int
blue
()
const
{
return
myBlue;};
47
48
virtual
void
setAlpha
(
int
v) {myAlpha = v;};
49
virtual
int
alpha
()
const
{
return
myAlpha;};
50
51
virtual
void
setRgba(
unsigned
v);
52
virtual
unsigned
rgba()
const
;
53
54
virtual
void
setArgb(
unsigned
v);
55
virtual
unsigned
argb()
const
;
56
57
virtual
DtColor
color
()
const
{
return
DtColor
(myRed, myGreen, myBlue, myAlpha);};
58
62
virtual
const
char
*
readerWriterType
()
const
;
63
65
static
const
char
*
theXmlType
();
66
67
virtual
const
char
*
xmlType
()
const
68
{
69
return
theXmlType
();
70
}
71
72
protected
:
73
DtRwInt
myRed
;
74
DtRwInt
myGreen
;
75
DtRwInt
myBlue
;
76
DtRwInt
myAlpha
;
77
78
};
79
80
namespace
DtBufferSerialize
81
{
82
DT_DLL_vrfutil
int
getSize
(
const
DtRwColor
& val);
83
DT_DLL_vrfutil
char
*
encode
(
const
DtRwColor
& val,
char
*buffer);
84
DT_DLL_vrfutil
const
char
*
decode
(
DtRwColor
&val,
const
char
*buffer) ;
85
}
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)