CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdPolyPolygon3d.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 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#include "RxObject.h"
34#include "OdArray.h"
35#include "Ge/GePoint3d.h"
36#include "Int32Array.h"
37
47{
48 OdGePoint3dArray m_Points; // Points defining the polygons.
49 OdInt32Array m_Counts; // Counts of points in each polygon.
50
51public:
53 virtual ~OdPolyPolygon3d() {}
54
58 void newContour() { m_Counts.append(0); }
59
64 void addToCurrentContour(const OdGePoint3d& point) { m_Points.append(point); m_Counts[m_Counts.size() - 1]++; }
65
67 {
68 if ( m_Counts.size() )
69 {
70 for ( int i = 0; i < m_Counts[m_Counts.size()-1]; i++)
71 {
72 m_Points.removeLast();
73 }
74 m_Counts.removeLast();
75 }
76 }
77
83 void setGrowLength(OdInt32 growLength)
84 { m_Points.setGrowLength(growLength); m_Counts.setGrowLength(growLength/10 > 0 ? growLength/10 : 1); }
85
87 void setGrowLenght(OdInt32 growLength) { setGrowLength(growLength); }
88
92 OdGePoint3dArray& points() { return m_Points; }
96 const OdGePoint3dArray& points() const { return m_Points; }
100 OdInt32Array& counts() { return m_Counts; }
104 const OdInt32Array& counts() const { return m_Counts; }
105};
106
107#include "TD_PackPop.h"
108
109#endif // !defined(AFX_OdPolyPolygon3d_H__0D83A6B9_F93A_4801_AB9B_47B6648AE23B__INCLUDED_)
110
OdArray< OdGePoint3d, OdMemoryAllocator< OdGePoint3d > > OdGePoint3dArray
OdArray< OdInt32, OdMemoryAllocator< OdInt32 > > OdInt32Array
Definition Int32Array.h:34
int OdInt32
OdGePoint3dArray & points()
const OdInt32Array & counts() const
OdInt32Array & counts()
const OdGePoint3dArray & points() const
virtual ~OdPolyPolygon3d()
void setGrowLenght(OdInt32 growLength)
void setGrowLength(OdInt32 growLength)
void addToCurrentContour(const OdGePoint3d &point)