CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxGeomUtils Class Referenceabstract

#include <FxGeomUtils.h>

Public Member Functions

virtual void SelectSubentsByPoint (CFxView *pView, CFxGsNode *p3dSolidGsNode, const OdGePoint3d &ptPickPoint, OdArray< OdGsMarker > &aMarkers) const =0
 
virtual bool GetNormalOfPlanarFace (OdDb3dSolidPtr pSolid, const OdDbFullSubentPath &face, OdGeVector3d &normal) const =0
 
virtual bool GetClosestPointInFace (const OdGePoint3d &pt, OdDbEntityPtr pObj, const OdDbFullSubentPath &face, OdGePoint3d &closest, OdGeVector3d &Utangent, OdGeVector3d &Vtangent) const =0
 
virtual bool shootRayAgainstObject (OdDbEntityPtr pObj, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const =0
 
virtual bool shootRayAgainstObject (OdDbEntityPtr pObj, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, OdArray< OdDbSubentId > &subEntIds, OdGePoint3d &pickPoint) const =0
 
virtual bool shootRayAgainstArrayObjects (std::vector< OdDbEntityPtr > pObjs, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, int &index, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const =0
 
virtual bool shootRayAgainstArrayObjects (std::vector< OdDbEntityPtr > pObjs, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, int &index, OdArray< OdDbSubentId > &subEntIds, OdGePoint3d &pickPoint) const =0
 
virtual bool shootRayToGetMultipleSubEntities (std::vector< OdDbEntityPtr > pObjs, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, int &index, OdArray< OdDbSubentId > &subEntIds, OdArray< OdGePoint3d > &pickPoints) const =0
 
virtual bool shootRayToGetMultipleSubEntities (std::vector< OdDbEntityPtr > pObjs, double tol, const OdGePoint3d &base, const OdGeVector3d &viewDir, int &index, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const =0
 
virtual bool SelectEdgeOnFace (CFxView *pView, CFxGsNode *p3dSolidGsNode, const OdGePoint3d &ptPickPoint, const OdGsMarker &faceId, OdGsMarker &edgeId) const =0
 
virtual bool GetEdgesFromFace (OdDb3dSolidPtr p3dSolid, const OdDbFullSubentPath &face, OdDbFullSubentPathArray &edgePaths) const =0
 

Static Public Member Functions

static OdGeMatrix3d GetTransform (const OdDbObjectIdArray &idArray)
 
static OdGeMatrix3d GetTransform (const OdDbFullSubentPath &path)
 
static OdGePoint3dArray GetImageBoundary (const OdGeMatrix3d &mPixelToModel, const OdGePoint2d *uvBoundary, OdUInt32 numBoundPts)
 
static OdGeMatrix3d GetPixelToModelTransform (const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, double ySize)
 
static OdDbEntityPtr GetPolySegment (const OdDbEntityPtr pPoly, const OdGePoint3d &pickPoint)
 
static bool GetSegmentAtPoint (OdDbCurvePtr pPLine, const OdGePoint3d pointOnPLine, OdGeCircArc3d &circ, OdGeLineSeg3d &line, bool &isArc, bool &isLine)
 
static OdDbPolylinePtr ConvertToStdPolyline (OdDbCurvePtr pCurve)
 

Detailed Description

Definition at line 40 of file FxGeomUtils.h.

Member Function Documentation

◆ ConvertToStdPolyline()

static OdDbPolylinePtr CFxGeomUtils::ConvertToStdPolyline ( OdDbCurvePtr pCurve)
static

◆ GetClosestPointInFace()

virtual bool CFxGeomUtils::GetClosestPointInFace ( const OdGePoint3d & pt,
OdDbEntityPtr pObj,
const OdDbFullSubentPath & face,
OdGePoint3d & closest,
OdGeVector3d & Utangent,
OdGeVector3d & Vtangent ) const
pure virtual

Description: Find closest Point on Face from Input pt this point returned in parameter-coordinates (u,v) ==> param Arguments:

Parameters
[in]ptThe point input.
[in]pObjnon-null, the 3d solid or OdDbRegion or OdDbSurface.
[in]faceOdDbFullSubentPath face.
[outclosest OdGePoint3d point on underlying surface.
[outUtangent OdGeVector3d tangent direction in U on underlying surface.
[outVtangent OdGeVector3d tangent direction in V on underlying surface. Return Value:
True if it succeeds, false if it fails.

◆ GetEdgesFromFace()

virtual bool CFxGeomUtils::GetEdgesFromFace ( OdDb3dSolidPtr p3dSolid,
const OdDbFullSubentPath & face,
OdDbFullSubentPathArray & edgePaths ) const
pure virtual

Description: Get all Edges to selected face. Arguments:

Parameters
[in,out]p3dSolidpointer to OdDb3dSolid
[in]faceface
[out]edgePathsEdgeArray. Return Value:
True if it succeeds, false if it fails.

◆ GetImageBoundary()

static OdGePoint3dArray CFxGeomUtils::GetImageBoundary ( const OdGeMatrix3d & mPixelToModel,
const OdGePoint2d * uvBoundary,
OdUInt32 numBoundPts )
static

Description: Returns boundary in model coordinates. In case of 2 points in 'uvBoundary' it's converted to closed rectangle.

◆ GetNormalOfPlanarFace()

virtual bool CFxGeomUtils::GetNormalOfPlanarFace ( OdDb3dSolidPtr pSolid,
const OdDbFullSubentPath & face,
OdGeVector3d & normal ) const
pure virtual

Description Returns true if face is planar else false Arguments:

Parameters
[in]pSolidIf non-null, the 3d solid.
[in]faceOdDbFullSubentPath face.
[out]normalthe normal of face i_face

◆ GetPixelToModelTransform()

static OdGeMatrix3d CFxGeomUtils::GetPixelToModelTransform ( const OdGePoint3d & origin,
const OdGeVector3d & u,
const OdGeVector3d & v,
double ySize )
static

Description: This function returns same transform as OdDbRasterImage::getPixelToModelTransform() do.

◆ GetPolySegment()

static OdDbEntityPtr CFxGeomUtils::GetPolySegment ( const OdDbEntityPtr pPoly,
const OdGePoint3d & pickPoint )
static

Description: Converts OdDb2dPolyline to OdDbPolyline

◆ GetSegmentAtPoint()

static bool CFxGeomUtils::GetSegmentAtPoint ( OdDbCurvePtr pPLine,
const OdGePoint3d pointOnPLine,
OdGeCircArc3d & circ,
OdGeLineSeg3d & line,
bool & isArc,
bool & isLine )
static

◆ GetTransform() [1/2]

static OdGeMatrix3d CFxGeomUtils::GetTransform ( const OdDbFullSubentPath & path)
static

◆ GetTransform() [2/2]

static OdGeMatrix3d CFxGeomUtils::GetTransform ( const OdDbObjectIdArray & idArray)
static

Description: Returns transformation matrix from model coordiantes to space coordiantes

◆ SelectEdgeOnFace()

virtual bool CFxGeomUtils::SelectEdgeOnFace ( CFxView * pView,
CFxGsNode * p3dSolidGsNode,
const OdGePoint3d & ptPickPoint,
const OdGsMarker & faceId,
OdGsMarker & edgeId ) const
pure virtual

Description: Select edge on face. Arguments:

Parameters
[in,out]pViewIf non-null, the view.
[in,out]p3dSolidGsNodeIf non-null, the 3d solid gs node.
ptPickPointThe point pick point.
faceIdIdentifier for the face.
[in,out]edgeIdIdentifier for the edge. Return Value:
True if it succeeds, false if it fails.

◆ SelectSubentsByPoint()

virtual void CFxGeomUtils::SelectSubentsByPoint ( CFxView * pView,
CFxGsNode * p3dSolidGsNode,
const OdGePoint3d & ptPickPoint,
OdArray< OdGsMarker > & aMarkers ) const
pure virtual

Description: Returns subents gs markers sorted along direction from camera to target. Currently only finds 3dsolid's faces at pickpoint.

◆ shootRayAgainstArrayObjects() [1/2]

virtual bool CFxGeomUtils::shootRayAgainstArrayObjects ( std::vector< OdDbEntityPtr > pObjs,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
int & index,
OdArray< OdDbSubentId > & subEntIds,
OdGeDoubleArray & parameters ) const
pure virtual

Description: Compute nearest intersection of ray ( base + c * viewDir) with all Entities pObjs. Arguments:

Parameters
[in]pObjsArray of Entities
[in]tolradius of tube around of ray
[in]basebasepoint of ray
[in]viewDirdirection of ray
[out]

index of entity in array

Parameters
[out]subEntIdsthe subEntitiesIds met by the ray corresponding to parameter[0], (only one: the first) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol
[out]parametersnearest intersection-parameter on ray Return Value:
True if intersection found, false if not.

◆ shootRayAgainstArrayObjects() [2/2]

virtual bool CFxGeomUtils::shootRayAgainstArrayObjects ( std::vector< OdDbEntityPtr > pObjs,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
int & index,
OdArray< OdDbSubentId > & subEntIds,
OdGePoint3d & pickPoint ) const
pure virtual

Description: Compute nearest intersection of ray ( base + c * viewDir) with all Entities pObjs. Arguments:

Parameters
[in]pObjsArray of Entities
[in]tolradius of tube around of ray
[in]basebasepoint of ray
[in]

direction of ray

Parameters
[out]

index of entity in array

Parameters
[out]

the subEntitiesIds met by the ray corresponding to o_parameter[0], (only one: the first) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol

Parameters
[out]pickPointThe first intersectionpoint with ray Return Value:
True if intersection found, false if not.

◆ shootRayAgainstObject() [1/2]

virtual bool CFxGeomUtils::shootRayAgainstObject ( OdDbEntityPtr pObj,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
OdArray< OdDbSubentId > & subEntIds,
OdGeDoubleArray & parameters ) const
pure virtual

Description: Compute nearest intersection of ray ( base + c * viewDir) with Object pObj. Arguments:

Parameters
[in]pObjIf non-null, the Object ( 3dSolid or Region or Surface )
[in]tolradius of tube around of ray
[in]basebasepoint of ray
[in]viewDirdirection of ray
[out]subEntIdsthe subEntitiesIds met by the ray (only one: the first) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol
[out]parametersnearest intersection-parameter on ray Return Value:
True if intersection found, false if not.

◆ shootRayAgainstObject() [2/2]

virtual bool CFxGeomUtils::shootRayAgainstObject ( OdDbEntityPtr pObj,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
OdArray< OdDbSubentId > & subEntIds,
OdGePoint3d & pickPoint ) const
pure virtual

Description: Compute nearest intersection of ray ( base + c * viewDir) with Object pObj. Arguments:

Parameters
[in]pObjIf non-null, the Object ( 3dSolid or Region or Surface )
[in]tolradius of tube around of ray
[in]

basepoint of ray

Parameters
[in]viewDirdirection of ray
[out]subEntIdsthe subEntitiesIds met by the ray (only one: the first) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol
[out]pickPointThe first intersectionpoint with ray Return Value:
True if intersection found, false if not.

◆ shootRayToGetMultipleSubEntities() [1/2]

virtual bool CFxGeomUtils::shootRayToGetMultipleSubEntities ( std::vector< OdDbEntityPtr > pObjs,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
int & index,
OdArray< OdDbSubentId > & subEntIds,
OdArray< OdGePoint3d > & pickPoints ) const
pure virtual

Description: Computes all possible intersections of ray ( base + c * viewDir) with all Entities pObjs. Arguments:

Parameters
[in]pObjsArray of Entities
[in]tolradius of tube around of ray
[in]basebasepoint of ray
[in]viewDirdirection of ray
[out]

index of entity in array

Parameters
[out]subEntIdsthe subEntitiesIds met by the ray corresponding to all parameters, (from nearest to farthest) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol
[out]parametersnearest intersection-parameter on ray Return Value:
True if intersection found, false if not.

◆ shootRayToGetMultipleSubEntities() [2/2]

virtual bool CFxGeomUtils::shootRayToGetMultipleSubEntities ( std::vector< OdDbEntityPtr > pObjs,
double tol,
const OdGePoint3d & base,
const OdGeVector3d & viewDir,
int & index,
OdArray< OdDbSubentId > & subEntIds,
OdGeDoubleArray & parameters ) const
pure virtual

Description: Compute all possible intersections of ray ( base + c * viewDir) with all Entities pObjs. Arguments:

Parameters
[in]pObjsArray of Entities
[in]tolradius of tube around of ray
[in]basebasepoint of ray
[in]

direction of ray

Parameters
[out]

index of entity in array

Parameters
[out]

the subEntitiesIds met by the ray corresponding to all parameters, (from nearest to farthest) \ the subentity can be of type kFaceSubentType, kEdgeSubentType or kVertexSubentType, \ this depends on the size of tol

Parameters
[out]pickPointThe first intersectionpoint with ray Return Value: true if intersection found, false if not.

The documentation for this class was generated from the following file: