CFx SDK Documentation
2020SP3
SDK
CFx
dd_inc
HatchPattern.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
25
26
27
#ifndef OD_HATCHPATTERN_H
28
#define OD_HATCHPATTERN_H
29
30
#include "
TD_PackPush.h
"
31
32
#include "
Ge/GePoint2d.h
"
33
#include "
Ge/GeVector2d.h
"
34
#include "
Ge/GeDoubleArray.h
"
35
41
class
OdHatchPatternLine
42
{
43
public
:
44
double
m_dLineAngle
;
45
OdGePoint2d
m_basePoint
;
46
OdGeVector2d
m_patternOffset
;
47
OdGeDoubleArray
m_dashes
;
48
49
OdHatchPatternLine
() :
50
m_dLineAngle
(0.0)
51
{
52
}
53
54
void
transformBy
(
const
OdGeMatrix2d
& ocsXform)
55
{
56
m_basePoint
.
transformBy
(ocsXform);
57
m_patternOffset
.
transformBy
(ocsXform);
58
59
OdGeVector2d
pO(
OdGeVector2d::kXAxis
);
60
pO.
rotateBy
(
m_dLineAngle
);
61
pO.
transformBy
(ocsXform);
62
m_dLineAngle
= pO.
angle
();
63
64
OdGeDoubleArray::iterator
pDash;
65
for
(pDash =
m_dashes
.
begin
(); pDash !=
m_dashes
.
end
(); ++ pDash)
66
{
67
(*pDash) *= pO.
length
();
68
}
69
}
70
void
scale
(
double
s)
71
{
72
m_patternOffset
*= s;
73
for
(
unsigned
int
j = 0; j <
m_dashes
.
size
(); ++j)
74
m_dashes
[j] *= s;
75
}
76
};
77
81
typedef
OdArray<OdHatchPatternLine>
OdHatchPattern
;
82
83
#include "
TD_PackPop.h
"
84
85
#endif //#ifndef OD_HATCHPATTERN_H
OdHatchPatternLine
Definition:
HatchPattern.h:42
GeVector2d.h
OdHatchPatternLine::transformBy
void transformBy(const OdGeMatrix2d &ocsXform)
Definition:
HatchPattern.h:54
OdGeVector2d::angle
double angle() const
OdArray::end
iterator end()
Definition:
OdArray.h:772
OdArray< double, OdMemoryAllocator< double > >
OdHatchPatternLine::m_dashes
OdGeDoubleArray m_dashes
Definition:
HatchPattern.h:47
TD_PackPop.h
OdGeVector2d::transformBy
OdGeVector2d & transformBy(const OdGeMatrix2d &xfm)
Definition:
GeVector2d.h:106
OdHatchPatternLine::m_patternOffset
OdGeVector2d m_patternOffset
Definition:
HatchPattern.h:46
OdHatchPatternLine::m_dLineAngle
double m_dLineAngle
Definition:
HatchPattern.h:44
OdHatchPattern
OdArray< OdHatchPatternLine > OdHatchPattern
Definition:
HatchPattern.h:81
OdGePoint2d::transformBy
OdGePoint2d & transformBy(const OdGeMatrix2d &xfm)
OdArray::size
size_type size() const
Definition:
OdArray.h:893
OdArray< double, OdMemoryAllocator< double > >::iterator
double * iterator
Definition:
OdArray.h:594
OdGeVector2d
Definition:
GeVector2d.h:51
TD_PackPush.h
OdHatchPatternLine::OdHatchPatternLine
OdHatchPatternLine()
Definition:
HatchPattern.h:49
OdHatchPatternLine::m_basePoint
OdGePoint2d m_basePoint
Definition:
HatchPattern.h:45
OdGeVector2d::rotateBy
OdGeVector2d & rotateBy(double angle)
OdGeMatrix2d
Definition:
GeMatrix2d.h:73
OdGeVector2d::kXAxis
static GE_STATIC_EXPORT const OdGeVector2d kXAxis
Definition:
GeVector2d.h:66
OdArray::begin
iterator begin()
Definition:
OdArray.h:751
GePoint2d.h
OdHatchPatternLine::scale
void scale(double s)
Definition:
HatchPattern.h:70
OdGeVector2d::length
double length() const
GeDoubleArray.h
OdGePoint2d
Definition:
GePoint2d.h:60
Generated on Mon Oct 12 2020 11:49:34