CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
HatchPattern.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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
40{
47};
48
49
56{
57public:
62
64 m_dLineAngle(0.0)
65 {
66 }
67
69 {
74 }
75
76 void transformBy(const OdGeMatrix2d& ocsXform)
77 {
78 m_basePoint.transformBy(ocsXform);
80
83 pO.transformBy(ocsXform);
84 m_dLineAngle = pO.angle();
85
87 for(pDash = m_dashes.begin(); pDash != m_dashes.end(); ++ pDash)
88 {
89 (*pDash) *= pO.length();
90 }
91 }
92 void scale(double s)
93 {
94 m_patternOffset *= s;
95 for (unsigned int j = 0; j < m_dashes.size(); ++j)
96 m_dashes[j] *= s;
97 }
98};
99
104
105#include "TD_PackPop.h"
106
107#endif //#ifndef OD_HATCHPATTERN_H
OdGeIslandStyle
Definition: HatchPattern.h:40
@ OdGeIslandStyle_Outer
Definition: HatchPattern.h:44
@ OdGeIslandStyle_Normal
Definition: HatchPattern.h:42
@ OdGeIslandStyle_Ignore
Definition: HatchPattern.h:46
OdArray< OdHatchPatternLine > OdHatchPattern
Definition: HatchPattern.h:103
iterator end()
Definition: OdArray.h:1041
size_type size() const
Definition: OdArray.h:1247
iterator begin()
Definition: OdArray.h:1017
void insert(iterator before, const_iterator first, const_iterator afterLast)
Definition: OdArray.h:1101
OdGePoint2d & transformBy(const OdGeMatrix2d &xfm)
double angle() const
OdGeVector2d & rotateBy(double angle)
OdGeVector2d & transformBy(const OdGeMatrix2d &xfm)
Definition: GeVector2d.h:120
double length() const
static GE_STATIC_EXPORT const OdGeVector2d kXAxis
Definition: GeVector2d.h:76
OdGeVector2d m_patternOffset
Definition: HatchPattern.h:60
OdGePoint2d m_basePoint
Definition: HatchPattern.h:59
OdHatchPatternLine(const OdHatchPatternLine &pat)
Definition: HatchPattern.h:68
void scale(double s)
Definition: HatchPattern.h:92
OdGeDoubleArray m_dashes
Definition: HatchPattern.h:61
void transformBy(const OdGeMatrix2d &ocsXform)
Definition: HatchPattern.h:76