VR-Forces 4.8 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
geometry
polygon2D.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2005 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: polygon2D.h,v $ $Revision: 1.6 $ $State: Exp $
7
******************************************************************************/
8
#ifndef polygon2D_H_
9
#define polygon2D_H_
10
11
//
12
// \file polygon2D.h
13
// \brief This file contains all the classes related to the 2 dimensional
14
// geometric polygon class.
15
//
16
17
#include "
geometry/geometryDefines.h
"
18
#include "
geometry/point.h
"
19
#include "
geometry/extent.h
"
20
#include <vlutil/vlConfig.h>
21
#include <vector>
22
23
// The DtPolygon2D class represents a 2 dimensional polygon
24
class
DT_DLL_geometry
DtPolygon2D
25
{
26
public
:
27
28
typedef
std::vector<DtPoint>
DtVertexContainer
;
29
typedef
std::vector<DtPoint>::iterator
DtVertexIter
;
30
typedef
std::vector<DtPoint>::const_iterator
DtVertexConstIter
;
31
32
typedef
DtChord
DtEdge
;
33
34
35
DtPolygon2D
(
const
DtVertexContainer
& polygonVertices);
36
DtPolygon2D
(
const
DtExtent
& extent);
37
38
virtual
~
DtPolygon2D
();
39
40
private
:
41
// Copy constructor and Assignment operator not implemented
42
DtPolygon2D
(
const
DtPolygon2D
& original);
43
const
DtPolygon2D
& operator=(
const
DtPolygon2D
& original);
44
45
public
:
46
47
unsigned
int
numberOfVertices()
const
;
48
49
bool
getVertex(
DtPoint
& vertex,
unsigned
int
vertexIndex)
const
;
50
DtPoint
vertex(
unsigned
int
vertexIndex)
const
;
51
52
bool
setVertex(
unsigned
int
vertexIndex,
const
DtPoint
& newVertex);
53
54
DtVertexConstIter
verticesBegin()
const
;
55
DtVertexConstIter
verticesEnd()
const
;
56
57
DtPoint
verticesFront()
const
;
58
DtPoint
verticesBack()
const
;
59
60
unsigned
int
numberOfEdges()
const
;
61
62
DtEdge
edge(
unsigned
int
edgeIndex)
const
;
63
bool
getEdge(
unsigned
int
edgeIndex,
DtEdge
& edgeToGet)
const
;
64
65
DtExtent
extent()
const
;
66
67
const
DtVertexContainer
& vertices()
const
;
68
69
protected
:
70
bool
testInvariant
()
const
;
71
72
bool
isValidVertexIndex(
unsigned
int
vertexIndex)
const
;
73
74
bool
isValidEdgeIndex(
unsigned
int
edgeIndex)
const
;
75
76
private
:
77
DtVertexContainer
myVertices
;
78
};
79
80
81
#endif
82
DtChord
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition:
chord.h:40
DtPolygon2D::DtEdge
DtChord DtEdge
Definition:
polygon2D.h:32
geometryDefines.h
point.h
testInvariant
*bool testInvariant() const
DtPolygon2D
Definition:
polygon2D.h:24
DtExtent
The DtExtent represents an axis-aligned 3d bounding box.
Definition:
extent.h:43
DT_DLL_geometry
#define DT_DLL_geometry
Definition:
geometryDefines.h:23
DtPolygon2D::myVertices
DtVertexContainer myVertices
Definition:
polygon2D.h:77
DtPolygon2D::DtVertexIter
std::vector< DtPoint >::iterator DtVertexIter
Definition:
polygon2D.h:29
extent.h
Contains the declaration of the DtExtent class.
DtPolygon2D::DtVertexContainer
std::vector< DtPoint > DtVertexContainer
Definition:
polygon2D.h:28
DtPolygon2D::DtVertexConstIter
std::vector< DtPoint >::const_iterator DtVertexConstIter
Definition:
polygon2D.h:30
DtPoint
Definition:
point.h:34
Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (
www.mak.com
)