VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
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
DtColor
color()
const
{
return
DtColor
(myRed, myGreen, myBlue, myAlpha);};
55
56
protected
:
57
DtRwInt
myRed;
58
DtRwInt
myGreen
;
59
DtRwInt
myBlue
;
60
DtRwInt
myAlpha
;
61
62
};
63
64
namespace
DtBufferSerialize
65
{
66
DT_DLL_vrfutil
int
getSize
(
const
DtRwColor
& val);
67
DT_DLL_vrfutil
char
*
encode
(
const
DtRwColor
& val,
char
*buffer);
68
DT_DLL_vrfutil
const
char
*
decode
(
DtRwColor
&val,
const
char
*buffer) ;
69
}
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)