CFx SDK Documentation
2020SP3
SDK
CFx
dd_inc
Gi
OdPolyPolygon3d.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3
// All rights reserved.
4
//
5
// This software and its documentation and related materials are owned by
6
// the Alliance. The software may only be incorporated into application
7
// programs owned by members of the Alliance, subject to a signed
8
// Membership Agreement and Supplemental Software License Agreement with the
9
// Alliance. The structure and organization of this software are the valuable
10
// trade secrets of the Alliance and its suppliers. The software is also
11
// protected by copyright law and international treaty provisions. Application
12
// programs incorporating this software must include the following statement
13
// with their copyright notices:
14
//
15
// This application incorporates Teigha(R) software pursuant to a license
16
// agreement with Open Design Alliance.
17
// Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18
// All rights reserved.
19
//
20
// By use of this software, its documentation or related materials, you
21
// acknowledge and accept the above terms.
23
24
//:> OdPolyPolygon3d.h: interface for the OdPolyPolygon3d class.
25
//
27
28
#if !defined(AFX_OdPolyPolygon3d_H__0D83A6B9_F93A_4801_AB9B_47B6648AE23B__INCLUDED_)
29
#define AFX_OdPolyPolygon3d_H__0D83A6B9_F93A_4801_AB9B_47B6648AE23B__INCLUDED_
30
31
#include "
TD_PackPush.h
"
32
33
#if defined(_MSC_VER)
34
#pragma warning (push)
35
#pragma warning ( disable : 4512 ) // assignment operator could not be generated
36
#endif
37
38
#include "
RxObject.h
"
39
#include "
OdArray.h
"
40
#include "
Ge/GePoint3d.h
"
41
#include "
Int32Array.h
"
42
51
class
OdPolyPolygon3d
52
{
53
OdGePoint3dArray
m_Points;
// Points defining the polygons.
54
OdInt32Array
m_Counts;
// Counts of points in each polygon.
55
56
public
:
57
OdPolyPolygon3d
() {}
58
virtual
~OdPolyPolygon3d
() {}
59
63
void
newContour
() { m_Counts.
append
(0); }
64
69
void
addToCurrentContour
(
const
OdGePoint3d
& point) { m_Points.
append
(point); m_Counts[m_Counts.
size
() - 1]++; }
70
71
void
removeLastContour
()
72
{
73
if
( m_Counts.
size
() )
74
{
75
for
(
int
i = 0; i < m_Counts[m_Counts.
size
()-1]; i++)
76
{
77
m_Points.
removeLast
();
78
}
79
m_Counts.
removeLast
();
80
}
81
}
82
88
void
setGrowLength
(
OdInt32
growLength)
89
{ m_Points.
setGrowLength
(growLength); m_Counts.
setGrowLength
(growLength/10 > 0 ? growLength/10 : 1); }
90
92
void
setGrowLenght
(
OdInt32
growLength) {
setGrowLength
(growLength); }
93
97
OdGePoint3dArray
&
points
() {
return
m_Points; }
101
const
OdGePoint3dArray
&
points
()
const
{
return
m_Points; }
105
OdInt32Array
&
counts
() {
return
m_Counts; }
109
const
OdInt32Array
&
counts
()
const
{
return
m_Counts; }
110
};
111
112
#if defined(_MSC_VER)
113
#pragma warning (pop)
114
#endif
115
116
#include "
TD_PackPop.h
"
117
118
#endif // !defined(AFX_OdPolyPolygon3d_H__0D83A6B9_F93A_4801_AB9B_47B6648AE23B__INCLUDED_)
119
OdArray::removeLast
OdArray & removeLast()
Definition:
OdArray.h:1242
Int32Array.h
OdPolyPolygon3d::OdPolyPolygon3d
OdPolyPolygon3d()
Definition:
OdPolyPolygon3d.h:57
OdArray::setGrowLength
OdArray & setGrowLength(int growLength)
Definition:
OdArray.h:1251
OdArray< OdGePoint3d, OdMemoryAllocator< OdGePoint3d > >
TD_PackPop.h
OdPolyPolygon3d::counts
const OdInt32Array & counts() const
Definition:
OdPolyPolygon3d.h:109
RxObject.h
OdArray.h
OdGePoint3d
Definition:
GePoint3d.h:55
OdInt32
int OdInt32
Definition:
OdPlatformSettings.h:782
GePoint3d.h
OdArray::size
size_type size() const
Definition:
OdArray.h:893
OdArray::append
size_type append(const T &value)
Definition:
OdArray.h:1215
OdPolyPolygon3d
Definition:
OdPolyPolygon3d.h:52
OdPolyPolygon3d::setGrowLength
void setGrowLength(OdInt32 growLength)
Definition:
OdPolyPolygon3d.h:88
OdPolyPolygon3d::removeLastContour
void removeLastContour()
Definition:
OdPolyPolygon3d.h:71
OdPolyPolygon3d::addToCurrentContour
void addToCurrentContour(const OdGePoint3d &point)
Definition:
OdPolyPolygon3d.h:69
TD_PackPush.h
OdPolyPolygon3d::points
const OdGePoint3dArray & points() const
Definition:
OdPolyPolygon3d.h:101
OdPolyPolygon3d::newContour
void newContour()
Definition:
OdPolyPolygon3d.h:63
OdPolyPolygon3d::points
OdGePoint3dArray & points()
Definition:
OdPolyPolygon3d.h:97
OdPolyPolygon3d::setGrowLenght
void setGrowLenght(OdInt32 growLength)
Definition:
OdPolyPolygon3d.h:92
OdPolyPolygon3d::counts
OdInt32Array & counts()
Definition:
OdPolyPolygon3d.h:105
OdPolyPolygon3d::~OdPolyPolygon3d
virtual ~OdPolyPolygon3d()
Definition:
OdPolyPolygon3d.h:58
Generated on Mon Oct 12 2020 11:49:43