A DgnConeDetail represents a (frustum of a) cone. More...
#include <SolidPrimitive.h>
Public Member Functions | |
DgnConeDetail (DPoint3dCR centerA, DPoint3dCR centerB, double radiusA, double radiusB, bool capped) | |
Detail consructor with complete field list as parameters ... More... | |
DgnConeDetail (DPoint3dCR centerA, DPoint3dCR centerB, RotMatrixCR axes, double radiusA, double radiusB, bool capped) | |
Detail consructor with complete field list as parameters ... More... | |
DgnConeDetail (DPoint3dCR centerA, DPoint3dCR centerB, DVec3dCR vectorX, DVec3dCR vectorY, double radiusA, double radiusB, bool capped) | |
Detail consructor with complete field list as parameters ... More... | |
DgnConeDetail () | |
Default value constructor. More... | |
bool | GetRange (DRange3dR range) const |
Return range. More... | |
bool | GetRange (DRange3dR range, TransformCR transform) const |
Return range when transformed. More... | |
bool | TryGetConstructiveFrame (TransformR localToWorld, TransformR worldToLocal) const |
Return coordinate system with 1) XY plane of base circle, origin at center. More... | |
bool | IsSameStructure (ISolidPrimitiveCR other) const |
Test for same type and structure (but no coordinate comparison) More... | |
bool | IsSameStructureAndGeometry (ISolidPrimitiveCR other, double tolerance) const |
Test for same type, structure and coordinates. More... | |
bool | IsClosedVolume () const |
Test if this is a closed volume. More... | |
double | ParameterizationSign () const |
Return +1 or -1 that matches the volume sign after integration over the parameter space. More... | |
bool | GetTransforms (TransformR localToWorld, TransformR worldToLocal, double &radiusA, double &radiusB, bool fractionalRadii=false) const |
Try to set up a nonsingular coordinate frame. More... | |
bool | FractionToSection (double fraction, DEllipse3dR ellipse) const |
Return the ellipse cross section at a fraction along the rotation axis. More... | |
bool | FractionToRule (double fraction, DSegment3dR segment) const |
Return the rule line section at a fraction around the circular sections. More... | |
bool | GetSilhouettes (DSegment3dR segmentA, DSegment3dR segmentB, DMatrix4dCR viewToLocal) const |
Return the rule lines which are silhouettes as viewed. More... | |
bool | IsRealCap (int select01) const |
Test if caps are active and the indicated cap has nonzero radius. More... | |
bool | IsCircular (DPoint3dR centerA, DPoint3dR centerB, RotMatrixR rotMatrix, double &radiusA, double &radiusB, bool &capped) const |
Return true (with supporting data) if the cone is circular. More... | |
void | AddRayIntersections (bvector< SolidLocationDetail > &pickData, DRay3dCR ray, int parentId, double minParameter) const |
Compute intersections with a ray and add to the pickData. More... | |
void | AddCurveIntersections (CurveVectorCR curves, bvector< CurveLocationDetail > &curvePoints, bvector< SolidLocationDetail > &solidPoints, MeshAnnotationVector &messages) const |
Compute intersections with curves and add to the data array. More... | |
void | AddCurveIntersections (ICurvePrimitiveCR curves, bvector< CurveLocationDetail > &curvePoints, bvector< SolidLocationDetail > &solidPoints, MeshAnnotationVector &messages) const |
Compute intersections with a single curve and add to the data array. More... | |
bool | ClosestPoint (DPoint3dCR spacePoint, SolidLocationDetail &pickDetail) const |
bool | TryUVFractionToXYZ (SolidLocationDetail::FaceIndices const &faceIndices, double uFraction, double vFraction, DPoint3dR xyz, DVec3dR dXdu, DVec3dR dXdv) const |
convert u,v fraction on specified face to xyz and derivatives. More... | |
IGeometryPtr | GetFace (SolidLocationDetail::FaceIndices const &indices) const |
Return a single face of the solid primitive. More... | |
void | GetFaceIndices (bvector< SolidLocationDetail::FaceIndices > &indices) const |
Fill a list of all possible face indices. More... | |
ICurvePrimitivePtr | GetConstantVSection (SolidLocationDetail::FaceIndices const &indices, double fraction) const |
Copy a section curve at constant v of a single face to a single ICurvePrimitive. More... | |
ICurvePrimitivePtr | GetConstantUSection (SolidLocationDetail::FaceIndices const &indices, double fraction) const |
Copy a section at constant u of a single face to a single ICurvePrimitive. More... | |
bool | TryGetMaxUVLength (SolidLocationDetail::FaceIndices const &indices, DVec2dR uvLength) const |
Compute the lengths of the longest u and v direction sections of a single face of a solid primitive. More... | |
ISolidPrimitivePtr | Clone () const |
Copy to a new (allocated) solid primitive. More... | |
bool | TransformInPlace (TransformCR transform) |
Transform in place. More... | |
bool | ComputeSecondMomentAreaProducts (TransformR localToWorld, DMatrix4dR localProducts) const |
Return the various integrated products for area moment calculations. More... | |
bool | ComputeSecondMomentVolumeProducts (TransformR localToWorld, DMatrix4dR localProducts) const |
Return the various integrated products for moment calculations. More... | |
void | IntersectBoundedArc (DEllipse3dCR arc, bvector< double > &arcFractions, bvector< DPoint3d > &normalizedConePoints, TransformR localToWorld, TransformR worldToLocal, double &radius0, double &radius1, bool boundedConeZ) const |
Return all intersection points of an arc with the cone Returned data is the detailed local coordinates, with additional data to relate it back to world. More... | |
void | IntersectCurveLocal (ICurvePrimitiveCR curve, bvector< double > &curveFractions, bvector< DPoint3d > &normalizedConePoints, TransformR localToWorld, TransformR worldToLocal, double &radius0, double &radius1, bool boundedConeZ) const |
Return all intersection points of a curve with a cone. More... | |
Static Public Member Functions | |
static void | SetDetailCoordinatesFromFractionalizedConeCoordinates (SolidLocationDetail &detail, DPoint3dCR localuvw, TransformCR localToWorld, double r0, double r1) |
set point, uv coordinates, and uv derivatives vectors More... | |
Public Attributes | |
DPoint3d | m_centerA |
DPoint3d | m_centerB |
DVec3d | m_vector0 |
DVec3d | m_vector90 |
double | m_radiusA |
double | m_radiusB |
bool | m_capped |
A DgnConeDetail represents a (frustum of a) cone.
DgnConeDetail | ( | DPoint3dCR | centerA, |
DPoint3dCR | centerB, | ||
double | radiusA, | ||
double | radiusB, | ||
bool | capped | ||
) |
Detail consructor with complete field list as parameters ...
[in] | centerA | Center of base circle |
[in] | centerB | Center of top circle |
[in] | radiusA | radius at base (centerA) |
[in] | radiusB | radius at top (centerB) |
[in] | capped | true if end cap is enabled |
DgnConeDetail | ( | DPoint3dCR | centerA, |
DPoint3dCR | centerB, | ||
RotMatrixCR | axes, | ||
double | radiusA, | ||
double | radiusB, | ||
bool | capped | ||
) |
Detail consructor with complete field list as parameters ...
[in] | centerA | Center of base circle |
[in] | centerB | Center of top circle |
[in] | axes | x and y columns give base, top circle parameterization. |
[in] | radiusA | radius at base (centerA) |
[in] | radiusB | radius at top (centerB) |
[in] | capped | true if end cap is enabled |
DgnConeDetail | ( | DPoint3dCR | centerA, |
DPoint3dCR | centerB, | ||
DVec3dCR | vectorX, | ||
DVec3dCR | vectorY, | ||
double | radiusA, | ||
double | radiusB, | ||
bool | capped | ||
) |
Detail consructor with complete field list as parameters ...
[in] | centerA | Center of base circle |
[in] | centerB | Center of top circle |
[in] | vectorX | |
[in] | vectorY | |
[in] | radiusA | radius at base (centerA) |
[in] | radiusB | radius at top (centerB) |
[in] | capped | true if end cap is enabled |
DgnConeDetail | ( | ) |
Default value constructor.
void AddCurveIntersections | ( | CurveVectorCR | curves, |
bvector< CurveLocationDetail > & | curvePoints, | ||
bvector< SolidLocationDetail > & | solidPoints, | ||
MeshAnnotationVector & | messages | ||
) | const |
Compute intersections with curves and add to the data array.
[in] | curves | |
[in,out] | curvePoints | growing array of curve points. |
[in,out] | solidPoints | growing array of solid points. |
[in,out] | messages | array of error messages |
void AddCurveIntersections | ( | ICurvePrimitiveCR | curves, |
bvector< CurveLocationDetail > & | curvePoints, | ||
bvector< SolidLocationDetail > & | solidPoints, | ||
MeshAnnotationVector & | messages | ||
) | const |
Compute intersections with a single curve and add to the data array.
[in] | curves | |
[in,out] | curvePoints | growing array of curve points. |
[in,out] | solidPoints | growing array of solid points. |
[in,out] | messages | array of error messages |
void AddRayIntersections | ( | bvector< SolidLocationDetail > & | pickData, |
DRay3dCR | ray, | ||
int | parentId, | ||
double | minParameter | ||
) | const |
Compute intersections with a ray and add to the pickData.
[in] | ray | origin and direction |
[in] | minParameter | smallest parameter of pick. (e.g. 0 for picking along a positive ray from an eyepoint) |
[in,out] | pickData | growing array of picks. |
[in] | parentId | caller's id for this solid. Will be placed in each pickData entry has parentId. |
ISolidPrimitivePtr Clone | ( | ) | const |
Copy to a new (allocated) solid primitive.
bool ClosestPoint | ( | DPoint3dCR | spacePoint, |
SolidLocationDetail & | pickDetail | ||
) | const |
[in] | spacePoint | search for point close to here and on the solid surface |
[out] | pickDetail | closest point data. |
bool ComputeSecondMomentAreaProducts | ( | TransformR | localToWorld, |
DMatrix4dR | localProducts | ||
) | const |
Return the various integrated products for area moment calculations.
The primitive is treated as a thin shell.
[out] | localToWorld | transform from preferred system where the products are most easily computed to world. |
[out] | localProducts | integrated [xx xy xz x; xy yy yz y; xz yz zz z; x y z 1] dA |
bool ComputeSecondMomentVolumeProducts | ( | TransformR | localToWorld, |
DMatrix4dR | localProducts | ||
) | const |
Return the various integrated products for moment calculations.
The primitive is treated as a volume
[out] | localToWorld | transform from preferred system where the products are most easily computed to world. |
[out] | localProducts | integrated [xx xy xz x; xy yy yz y; xz yz zz z; x y z 1] dA |
bool FractionToRule | ( | double | fraction, |
DSegment3dR | segment | ||
) | const |
Return the rule line section at a fraction around the circular sections.
[in] | fraction | fractional position around the cone. |
[out] | segment | rule line |
bool FractionToSection | ( | double | fraction, |
DEllipse3dR | ellipse | ||
) | const |
Return the ellipse cross section at a fraction along the rotation axis.
[in] | fraction | fractional position alont the z axis. |
[out] | ellipse | the section ellipse. |
ICurvePrimitivePtr GetConstantUSection | ( | SolidLocationDetail::FaceIndices const & | indices, |
double | fraction | ||
) | const |
Copy a section at constant u of a single face to a single ICurvePrimitive.
[in] | indices | selects face |
[in] | fraction | u fraction for section curve |
ICurvePrimitivePtr GetConstantVSection | ( | SolidLocationDetail::FaceIndices const & | indices, |
double | fraction | ||
) | const |
Copy a section curve at constant v of a single face to a single ICurvePrimitive.
[in] | indices | selects face |
[in] | fraction | v fraction for section curve |
IGeometryPtr GetFace | ( | SolidLocationDetail::FaceIndices const & | indices | ) | const |
Return a single face of the solid primitive.
indices | integer selectors for the face. |
void GetFaceIndices | ( | bvector< SolidLocationDetail::FaceIndices > & | indices | ) | const |
Fill a list of all possible face indices.
[out] | indices | array of selectors for the faces. |
bool GetRange | ( | DRange3dR | range | ) | const |
Return range.
bool GetRange | ( | DRange3dR | range, |
TransformCR | transform | ||
) | const |
Return range when transformed.
bool GetSilhouettes | ( | DSegment3dR | segmentA, |
DSegment3dR | segmentB, | ||
DMatrix4dCR | viewToLocal | ||
) | const |
Return the rule lines which are silhouettes as viewed.
[out] | segmentA | first silhouette line |
[out] | segmentB | second silhouette line |
[in] | viewToLocal | matrix that positions the cone for viewing along the z axis. |
bool GetTransforms | ( | TransformR | localToWorld, |
TransformR | worldToLocal, | ||
double & | radiusA, | ||
double & | radiusB, | ||
bool | fractionalRadii = false |
||
) | const |
Try to set up a nonsingular coordinate frame.
Returns false if centerB is in base plane !!!!
localToWorld | Frame with origin at base, z=1 at top. This frame can be skewed. |
worldToLocal | Inverse frame. Undefined for false return. |
radiusA | radius at z=0 of local frame. |
radiusB | radius at z=1 of local frame. |
fractionalRadii | If false, x and y have legngth 1, z has length along the axis, and the radii are physical bottom and top If true, x and y have length of the largest radius and z has length along the axis, and the radii are fractions of the larger radius. |
void IntersectBoundedArc | ( | DEllipse3dCR | arc, |
bvector< double > & | arcFractions, | ||
bvector< DPoint3d > & | normalizedConePoints, | ||
TransformR | localToWorld, | ||
TransformR | worldToLocal, | ||
double & | radius0, | ||
double & | radius1, | ||
bool | boundedConeZ | ||
) | const |
Return all intersection points of an arc with the cone Returned data is the detailed local coordinates, with additional data to relate it back to world.
[in] | arc | arc to intersect with instance cone. |
[out] | arcFractions | intersection fractions along the arc. |
[out] | normalizedConePoints | intersection points, in local coordinates |
[out] | localToWorld | local to world transformation |
[out] | worldToLocal | world to local transformation |
[out] | radius0 | local arc radius at z=0 |
[out] | radius1 | local arc radius at z=1 |
[in] | boundedConeZ | if true, skip intersections outside the cone caps. |
void IntersectCurveLocal | ( | ICurvePrimitiveCR | curve, |
bvector< double > & | curveFractions, | ||
bvector< DPoint3d > & | normalizedConePoints, | ||
TransformR | localToWorld, | ||
TransformR | worldToLocal, | ||
double & | radius0, | ||
double & | radius1, | ||
bool | boundedConeZ | ||
) | const |
Return all intersection points of a curve with a cone.
Returned data is the detailed local coordinates, with additional data to relate it back to world.
[in] | curve | curve to intersect with instance cone. |
[out] | curveFractions | intersection fractions along the curve |
[out] | normalizedConePoints | intersection points, in local coordinates |
[out] | localToWorld | local to world transformation |
[out] | worldToLocal | world to local transformation |
[out] | radius0 | local arc radius at z=0 |
[out] | radius1 | local arc radius at z=1 |
[in] | boundedConeZ | if true, skip intersections outside the cone caps. |
bool IsCircular | ( | DPoint3dR | centerA, |
DPoint3dR | centerB, | ||
RotMatrixR | rotMatrix, | ||
double & | radiusA, | ||
double & | radiusB, | ||
bool & | capped | ||
) | const |
Return true (with supporting data) if the cone is circular.
bool IsClosedVolume | ( | ) | const |
Test if this is a closed volume.
bool IsRealCap | ( | int | select01 | ) | const |
Test if caps are active and the indicated cap has nonzero radius.
bool IsSameStructure | ( | ISolidPrimitiveCR | other | ) | const |
Test for same type and structure (but no coordinate comparison)
bool IsSameStructureAndGeometry | ( | ISolidPrimitiveCR | other, |
double | tolerance | ||
) | const |
Test for same type, structure and coordinates.
double ParameterizationSign | ( | ) | const |
Return +1 or -1 that matches the volume sign after integration over the parameter space.
|
static |
set point, uv coordinates, and uv derivatives vectors
[in,out] | detail | detail to update |
[in] | localuvw | coordinates in local fraction space. |
[in] | localToWorld | transform to world coordinates |
[in] | r0 | cone radius at w=0 |
[in] | r1 | cone radius at w=1 |
bool TransformInPlace | ( | TransformCR | transform | ) |
Transform in place.
bool TryGetConstructiveFrame | ( | TransformR | localToWorld, |
TransformR | worldToLocal | ||
) | const |
Return coordinate system with 1) XY plane of base circle, origin at center.
2) Z perpendicular
bool TryGetMaxUVLength | ( | SolidLocationDetail::FaceIndices const & | indices, |
DVec2dR | uvLength | ||
) | const |
Compute the lengths of the longest u and v direction sections of a single face of a solid primitive.
[in] | indices | selects face. |
[in] | uvLength | sizes in u, v directions. |
bool TryUVFractionToXYZ | ( | SolidLocationDetail::FaceIndices const & | faceIndices, |
double | uFraction, | ||
double | vFraction, | ||
DPoint3dR | xyz, | ||
DVec3dR | dXdu, | ||
DVec3dR | dXdv | ||
) | const |
convert u,v fraction on specified face to xyz and derivatives.
[in] | faceIndices | face selection indices |
[in] | uFraction | fractional coordinate in u direction. |
[in] | vFraction | fractional coordinate in v direction. |
[out] | xyz | point on face. |
[out] | dXdu | derivative of face point wrt uFraction. |
[out] | dXdv | derivative of face point wrt vFraction. |
bool m_capped |
DPoint3d m_centerA |
DPoint3d m_centerB |
double m_radiusA |
double m_radiusB |
DVec3d m_vector0 |
DVec3d m_vector90 |