DTriangle3d.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
17 struct GEOMDLLIMPEXP DTriangle3d
19 {
21 DPoint3d point[3];
23 DTriangle3d ();
24 
26 DTriangle3d (DPoint3dCR xyz0, DPoint3dCR xyz10, DPoint3dCR xyz01);
28 DTriangle3d (DPoint2dCR xyz0, DPoint2dCR xyz10, DPoint2dCR xyz01);
29 
31 DPoint3d Evaluate (double u, double v) const;
33 void Evaluate (double u, double v, DPoint3dR xyz, DVec3dR dXdu, DVec3dR dXdv) const;
35 void EvaluateNormal (double u, double v, DPoint3dR xyz, DVec3dR unitNormal) const;
36 
38 void GetVectorsFromOrigin (DVec3dR vectorU, DVec3dR vectorV) const;
41 bool ClosestPointUnbounded (DPoint3dCR spacePoint, DPoint2d &uv, DPoint3d &xyz) const;
42 
45 bool ClosestPointUnbounded (DPoint3dCR spacePoint, DPoint2d &uv) const;
46 
49 DSegment3d GetCCWEdgeDSegment3d (int i) const;
50 
53 DRay3d GetCCWEdgeDRay3d (int i) const;
54 
55 
58 DVec3d GetCCWEdgeDVec3d (int i) const;
59 
62 double AspectRatio () const;
63 
65 DVec3d CrossVectorsFromOrigin () const;
66 };
70 
72 struct GEOMDLLIMPEXP DPlane3dByVectors
73 {
74 DPoint3d origin;
75 DVec3d vectorU;
76 DVec3d vectorV;
77 DPlane3dByVectors (DPoint3dCR _origin, DVec3dCR _vectorU, DVec3d _vectorV);
78 
81 
87 static DPlane3dByVectors FromOriginAndParallelToXY (DPoint3d origin, double sizeU, double sizeV);
89 static DPlane3dByVectors FromOriginAndParallelToYZ (DPoint3d origin, double sizeU, double sizeV);
91 static DPlane3dByVectors FromOriginAndParallelToXZ (DPoint3d origin, double sizeU, double sizeV);
92 
94 static DPlane3dByVectors FromOriginAndTargets (DPoint3dCR origin, DPoint3dCR UTarget, DPoint3dCR VTarget);
95 
97 ValidatedDPlane3d GetDPlane3dWithUnitNormal () const;
99 DPoint3d Evaluate (double u, double v) const;
101 DPlane3dByVectors EvaluateTangents (double u, double v) const;
103 bool GetTransformsUnitZ (TransformR localToWorld, TransformR worldToLocal) const;
106 bool TransverseIntersection (DSegment3dCR segment, DPoint2dR uv, double &segmentFraction) const;
111 ValidatedDPoint2d ProjectPoint (DPoint3dCR spacePoint) const;
112 };
struct DVec3d & DVec3dR
Definition: msgeomstructs_typedefs.h:89
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
4-sided patch defined by its 4 vertices.
Definition: DTriangle3d.h:18
struct Transform & TransformR
Definition: msgeomstructs_typedefs.h:134
ValidatedValue< struct DPlane3d > ValidatedDPlane3d
Definition: GeomApi.h:352
Detailed Description Here.
Definition: DTriangle3d.h:72
struct DPoint2d & DPoint2dR
Definition: msgeomstructs_typedefs.h:78
DPoint3d origin
Definition: DTriangle3d.h:74
DVec3d vectorU
Definition: DTriangle3d.h:75
struct DPoint2d const & DPoint2dCR
Definition: msgeomstructs_typedefs.h:78
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
Start point and direction (NOT necessarily unit) for a 3D ray.
Definition: dray3d.h:21
struct DSegment3d const & DSegment3dCR
Definition: msgeomstructs_typedefs.h:115
DVec3d vectorV
Definition: DTriangle3d.h:76
struct DEllipse3d const & DEllipse3dCR
Definition: msgeomstructs_typedefs.h:114
ValidatedValue< struct DPoint2d > ValidatedDPoint2d
Definition: GeomApi.h:348
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
Start and end points of a line segment.
Definition: dsegment3d.h:16
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
struct DTriangle3d const & DTriangle3dCR
Definition: msgeomstructs_typedefs.h:117

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.