VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
13 
14 namespace makVrv
15 {
16 
19  template <class T>
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 
50 
53 
56 
57  };
58 
61  template <class T>
63  {
64 
65  public:
66 
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 
93 
94  };
95 
98  template <class T>
100  {
101 
102  public:
103 
111  DtSphericalVertex<T> bottomLeft, DtSphericalVertex<T> bottomRight );
112 
117 
118  };
119 
122  template <class T>
124 
125  public:
126 
133 
137 
138  };
139 
140 }
141 
142 #include "DtSphericalCoordinateUtils.inl"
143 
DtSphericalVertex< T > myBottomRight
Definition: DtSphericalCoordinateUtils.h:116
T myAzimuth
The vertex&#39;s representative azimuth.
Definition: DtSphericalCoordinateUtils.h:52
DtSphericalVertex< T > myBottomLeft
Definition: DtSphericalCoordinateUtils.h:115
Structure to hold triangles in spherical coordinates while building the geometry. ...
Definition: DtSphericalCoordinateUtils.h:123
DtSphericalVertex< T > myV1
Definition: DtSphericalCoordinateUtils.h:134
DtSphericalVertex< T > myV2
Definition: DtSphericalCoordinateUtils.h:135
Structure to hold a quad in spherical coordinates during geometry construction.
Definition: DtSphericalCoordinateUtils.h:99
DtSphericalVertex< T > myV3
Definition: DtSphericalCoordinateUtils.h:136
DtSphericalQuad(DtSphericalVertex< T > topLeft, DtSphericalVertex< T > topRight, DtSphericalVertex< T > bottomLeft, DtSphericalVertex< T > bottomRight)
CTOR Instantiates a new Spherical Quad with the given vertices.
3 dimensional vector
std::list< DtVector3< T > > myVertices
The vertex array to update.
Definition: DtSphericalCoordinateUtils.h:86
Class to hold a vertex in spherical coordinates during geometry construction.
Definition: DtSphericalCoordinateUtils.h:20
std::map< DtSphericalVertex< T >, int > mySphericalToIndexMap
Stores the indices of the vertices in the vertex array.
Definition: DtSphericalCoordinateUtils.h:83
DtSphericalVertex(T inclination, T azimuth, T radius)
CTOR Instantiates a new spherical vertex.
int myNextIndex
The index of the next inserted vertex.
Definition: DtSphericalCoordinateUtils.h:92
DtSphericalVertex< T > myTopRight
Definition: DtSphericalCoordinateUtils.h:114
DtVector3< T > toCartesian() const
Returns the equivalent cartesian coordinate Converts this DtSphericalVertex to Cartesian coordinates...
Caches the cartesian version of spherical vertices and their normals into the specified arrays...
Definition: DtSphericalCoordinateUtils.h:62
T myRadius
The vertex&#39;s representative radius.
Definition: DtSphericalCoordinateUtils.h:55
DtSphericalVertex< T > myTopLeft
Definition: DtSphericalCoordinateUtils.h:113
T myInclination
The vertex&#39;s representative inclination.
Definition: DtSphericalCoordinateUtils.h:49
DtSphericalTriangle(DtSphericalVertex< T > v1, DtSphericalVertex< T > v2, DtSphericalVertex< T > v3)
CTOR Instantiates a new Triangle using the given vertices.
2 dimensional vector
Definition: DtMath.h:21
int getIndex(const DtSphericalVertex< T > &vertex)
Get the given vertex&#39;s index Adds the given SphericalVertex into the vertex array and returns its ind...
std::list< DtVector3< T > > myNormals
The normal array to update.
Definition: DtSphericalCoordinateUtils.h:89
DtSphericalVertexCache()
CTOR Instantiates a new DtSphericalVertexCache for building the vertex and normal arrays for the elli...

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)