CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GiDeviation.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
25
26
27#ifndef __ODGIDEVIATION_H__
28#define __ODGIDEVIATION_H__
29
30
31#include "Gi/GiCommonDraw.h"
32#include "Ge/GeDoubleArray.h"
33#include "Ge/GePoint3d.h"
34
44{
45public:
46
69 virtual double deviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve) const = 0;
70
74 virtual ~OdGiDeviation() {}
75};
76
96inline OdGeDoubleArray odgiGetAllDeviations(const OdGiDeviation& deviationObj, const OdGePoint3d& pointOnCurve = OdGePoint3d::kOrigin)
97{
98 OdGeDoubleArray values(5);
99 values.append(deviationObj.deviation(kOdGiMaxDevForCircle, pointOnCurve));
100 values.append(deviationObj.deviation(kOdGiMaxDevForCurve, pointOnCurve));
101 values.append(deviationObj.deviation(kOdGiMaxDevForBoundary, pointOnCurve));
102 values.append(deviationObj.deviation(kOdGiMaxDevForIsoline, pointOnCurve));
103 values.append(deviationObj.deviation(kOdGiMaxDevForFacet, pointOnCurve));
104 return values;
105}
106
107#endif //#ifndef __ODGIDEVIATION_H__
OdArray< double, OdMemoryAllocator< double > > OdGeDoubleArray
OdGiDeviationType
@ kOdGiMaxDevForCircle
@ kOdGiMaxDevForIsoline
@ kOdGiMaxDevForCurve
@ kOdGiMaxDevForFacet
@ kOdGiMaxDevForBoundary
OdGeDoubleArray odgiGetAllDeviations(const OdGiDeviation &deviationObj, const OdGePoint3d &pointOnCurve=OdGePoint3d::kOrigin)
Definition GiDeviation.h:96
size_type append(const T &value)
Definition OdArray.h:1747
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition GePoint3d.h:106
virtual double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const =0
virtual ~OdGiDeviation()
Definition GiDeviation.h:74