Rhino C++ API  7.21
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ON_MeshX Class Reference

#include <opennurbs_mesh.h>

Inheritance diagram for ON_MeshX:
ON_MeshXLine ON_MeshXPlane

Public Member Functions

 ON_MeshX (const ON_Mesh &mesh, const ON_RTree &mesh_face_rtree, ON__UINT_PTR mesh_id)
 
 ON_MeshX (const ON_Mesh &mesh, ON__UINT_PTR mesh_id)
 
 ON_MeshX (unsigned int vertex_count, const class ON_3dPoint *mesh_dV, const class ON_3fPoint *mesh_fV, const class ON_2dPoint *mesh_S, unsigned int face_count, const class ON_MeshFace *mesh_F, const ON_RTree &mesh_face_rtree, ON__UINT_PTR mesh_id)
 
 ~ON_MeshX ()
 
double BarycentricCoordinateTolerance () const
 
ON_Xform MeshInverseTransform () const
 
ON_Xform MeshTransform () const
 
bool SetBarycentricCoordinateTolerance (double bc_tolerance)
 
bool SetMeshTransform (ON_Xform xform)
 
void SetSurfaceProperties (const class ON_Surface *surface)
 
void SetSurfaceProperties (const class ON_SurfaceProperties *surface_properties)
 
const class ON_SurfacePropertiesSurfaceProperties () const
 

Public Attributes

const ON_Meshm_mesh
 
ON_BoundingBox m_mesh_bbox
 
const class ON_3dPointm_mesh_dV
 
const class ON_MeshFacem_mesh_F
 
const ON_RTreem_mesh_face_rtree
 
const unsigned int m_mesh_Fcnt
 
const class ON_3fPointm_mesh_fV
 
const ON__UINT_PTR m_mesh_id
 
const class ON_2dPointm_mesh_S
 
const unsigned int m_mesh_Vcnt
 
ON__UINT_PTR m_tag
 

Protected Attributes

double m_bc_tolerance
 default is ON_EPSILON More...
 
unsigned char m_bHaveXform
 
ON_Xform m_inverse_xform
 
unsigned char m_reserved1 [7]
 
ON_SurfaceProperties m_surface_properties
 
ON_Xform m_xform
 

Constructor & Destructor Documentation

◆ ON_MeshX() [1/3]

ON_MeshX::ON_MeshX ( const ON_Mesh mesh,
ON__UINT_PTR  mesh_id 
)

Parameters: mesh - [in] mesh.MeshFaceTree(true) is used to get a mesh face rtree. mesh_id - [in] Vaue of that is assigned to ON_MeshXPoint.m_mesh_id.

◆ ON_MeshX() [2/3]

ON_MeshX::ON_MeshX ( const ON_Mesh mesh,
const ON_RTree mesh_face_rtree,
ON__UINT_PTR  mesh_id 
)

◆ ON_MeshX() [3/3]

ON_MeshX::ON_MeshX ( unsigned int  vertex_count,
const class ON_3dPoint mesh_dV,
const class ON_3fPoint mesh_fV,
const class ON_2dPoint mesh_S,
unsigned int  face_count,
const class ON_MeshFace mesh_F,
const ON_RTree mesh_face_rtree,
ON__UINT_PTR  mesh_id 
)

◆ ~ON_MeshX()

ON_MeshX::~ON_MeshX ( )

Member Function Documentation

◆ BarycentricCoordinateTolerance()

double ON_MeshX::BarycentricCoordinateTolerance ( ) const

◆ MeshInverseTransform()

ON_Xform ON_MeshX::MeshInverseTransform ( ) const

Returns: Inverse of the transformation that is conceptually applied to the mesh before it is interesected with the plane.

◆ MeshTransform()

ON_Xform ON_MeshX::MeshTransform ( ) const

Returns: Transformation that is conceptually applied to the mesh before it is interesected with the plane.

◆ SetBarycentricCoordinateTolerance()

bool ON_MeshX::SetBarycentricCoordinateTolerance ( double  bc_tolerance)

Parameters: bc_tolerance - [in] If a barycentric coordinate is < bc_tolerance, then the barycentric coordinate is set to zero. Any value that is invalid or < ON_EPSILON or >= 0.25 is ignored.
Returns: true if bc_tolerance was a valid value and will be used as the barycentric coordinate tolerance. Remarks: The default is ON_EPSILON. Barycentric coordinates are calculated from plane equation evaluations of mesh vertex locations. All internal calculations use double precision arithmetic.

◆ SetMeshTransform()

bool ON_MeshX::SetMeshTransform ( ON_Xform  xform)

Description: If you want to calculate the instersection of a plane and xform*mesh, then you can use SetMeshTransform() to specify the transformation and avoid having to transform the mesh and calculate a new mesh face rtree. Parameters: xform - [in] transformation that is conceptually appied to the mesh before an intesection calculation. This transformation must have an inverse.

◆ SetSurfaceProperties() [1/2]

void ON_MeshX::SetSurfaceProperties ( const class ON_Surface surface)

Description: When a mesh approximates a surface with singularities and an intersection event occurs on a facet with a corner at a singularity, surface property information is needed to correctly set the ON_MeshXPoint.m_S[] values.

◆ SetSurfaceProperties() [2/2]

void ON_MeshX::SetSurfaceProperties ( const class ON_SurfaceProperties surface_properties)

◆ SurfaceProperties()

const class ON_SurfaceProperties& ON_MeshX::SurfaceProperties ( ) const

Member Data Documentation

◆ m_bc_tolerance

double ON_MeshX::m_bc_tolerance
protected

default is ON_EPSILON

◆ m_bHaveXform

unsigned char ON_MeshX::m_bHaveXform
protected

◆ m_inverse_xform

ON_Xform ON_MeshX::m_inverse_xform
protected

◆ m_mesh

const ON_Mesh* ON_MeshX::m_mesh

When the ON_MeshX() constructor that takes an ON_Mesh reference is used, this pointer is set to &mesh for the convienience of the caller. The ON_MeshX class never uses this pointer

◆ m_mesh_bbox

ON_BoundingBox ON_MeshX::m_mesh_bbox

◆ m_mesh_dV

const class ON_3dPoint* ON_MeshX::m_mesh_dV

◆ m_mesh_F

const class ON_MeshFace* ON_MeshX::m_mesh_F

◆ m_mesh_face_rtree

const ON_RTree* ON_MeshX::m_mesh_face_rtree

◆ m_mesh_Fcnt

const unsigned int ON_MeshX::m_mesh_Fcnt

◆ m_mesh_fV

const class ON_3fPoint* ON_MeshX::m_mesh_fV

◆ m_mesh_id

const ON__UINT_PTR ON_MeshX::m_mesh_id

The value of the mesh_id parameter passed to the ON_MeshX() constructor is saved in m_mesh_id and the value is assigned to ON_MeshX.m_mesh_id when intersection events are added.

◆ m_mesh_S

const class ON_2dPoint* ON_MeshX::m_mesh_S

◆ m_mesh_Vcnt

const unsigned int ON_MeshX::m_mesh_Vcnt

These m_mesh_* fields save the information need to calculate mesh plane interesections. The values of these fields are set in the ON_MeshX constructors.

◆ m_reserved1

unsigned char ON_MeshX::m_reserved1[7]
protected

◆ m_surface_properties

ON_SurfaceProperties ON_MeshX::m_surface_properties
protected

◆ m_tag

ON__UINT_PTR ON_MeshX::m_tag

The ON_MeshX constructor sets m_tag to zero. Nothing in opennurbs modifies or uses this value.

◆ m_xform

ON_Xform ON_MeshX::m_xform
protected