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
vrvGraphicsUtils
DtSphericalCoordinateUtils.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvGraphicsUtils/DtVector3.h
>
13
14
namespace
makVrv
15
{
16
19
template
<
class
T>
20
class
DtSphericalVertex
{
21
22
public
:
23
29
DtSphericalVertex
( T inclination, T azimuth, T radius );
30
34
DtSphericalVertex
(
const
DtVector3<T>
& cartesian );
35
41
bool
operator < ( const DtSphericalVertex<T>& rhs )
const
;
42
46
DtVector3<T>
toCartesian
()
const
;
47
49
T
myInclination
;
50
52
T
myAzimuth
;
53
55
T
myRadius
;
56
57
};
58
61
template
<
class
T>
62
class
DtSphericalVertexCache
63
{
64
65
public
:
66
71
DtSphericalVertexCache
();
72
80
int
getIndex
(
const
DtSphericalVertex<T>
& vertex );
81
83
std::map<DtSphericalVertex<T>,
int
>
mySphericalToIndexMap
;
84
86
std::list<DtVector3<T> >
myVertices
;
87
89
std::list<DtVector3<T> >
myNormals
;
90
92
int
myNextIndex
;
93
94
};
95
98
template
<
class
T>
99
class
DtSphericalQuad
100
{
101
102
public
:
103
110
DtSphericalQuad
(
DtSphericalVertex<T>
topLeft,
DtSphericalVertex<T>
topRight,
111
DtSphericalVertex<T>
bottomLeft,
DtSphericalVertex<T>
bottomRight );
112
113
DtSphericalVertex<T>
myTopLeft
;
114
DtSphericalVertex<T>
myTopRight
;
115
DtSphericalVertex<T>
myBottomLeft
;
116
DtSphericalVertex<T>
myBottomRight
;
117
118
};
119
122
template
<
class
T>
123
class
DtSphericalTriangle
{
124
125
public
:
126
132
DtSphericalTriangle
(
DtSphericalVertex<T>
v1,
DtSphericalVertex<T>
v2,
DtSphericalVertex<T>
v3 );
133
134
DtSphericalVertex<T>
myV1
;
135
DtSphericalVertex<T>
myV2
;
136
DtSphericalVertex<T>
myV3
;
137
138
};
139
140
}
141
142
#include "DtSphericalCoordinateUtils.inl"
143
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
)