Rhino C++ API  8.10
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
ON_SubDFace Class Reference

#include <opennurbs_subd.h>

Inheritance diagram for ON_SubDFace:
ON_SubDComponentBase

Public Types

enum  : unsigned int { MaximumEdgeCount = 0xFFF0U }
 

Public Member Functions

 ON_SubDFace ()=default
 
 ON_SubDFace (const ON_SubDFace &)=default
 
 ~ON_SubDFace ()=default
 
const ON_BoundingBox BoundingBox (ON_SubDComponentLocation subd_appearance, const ON_SubD &subd) const
 
const ON_Plane CenterFrame (ON_SubDComponentLocation subd_appearance) const
 
const ON_3dVector CenterNormal (ON_SubDComponentLocation subd_appearance) const
 
const ON_3dPoint CenterPoint (ON_SubDComponentLocation subd_appearance) const
 
void ClearMaterialChannelIndex () const
 
void ClearPackId ()
 
void ClearPackRect ()
 
void ClearPerFaceColor () const
 
void ClearSavedSubdivisionPoints () const
 
void ClearSavedSubdivisionPoints (bool bClearNeighborhood) const
 
void ClearTexturePoints () const
 
const ON_COMPONENT_INDEX ComponentIndex () const
 
const ON_SubDComponentPtr ComponentPtr () const
 
const ON_BoundingBox ControlNetBoundingBox () const
 
const ON_Plane ControlNetCenterFrame () const
 The face's control net center frame is a plane with normal equal to this->ControlNetCenterNormal() and origin equal to this->ControlNetCenterPoint(). The x and y axes of the frame have no predictable relationship to the face or SubD control net topology. More...
 
const ON_3dVector ControlNetCenterNormal () const
 When the face's control net polygon is planar, the face's control net normal is a unit vector perpindicular to the plane that points outwards. If the control net polygon is not planar, the control net normal is control net normal is a unit vector that is the average of the control polygon's corner normals. More...
 
const ON_3dPoint ControlNetCenterPoint () const
 The face's control net center point is the average of the face's vertex control net points. This is the same point as the face's subdivision point. More...
 
const ON_3dPoint ControlNetPoint (unsigned int i) const
 
const ON_3dPoint DoubleSubdivisionPoint () const
 Get the location of the subdivision point of faces's subdivision vertex. More...
 
const class ON_SubDEdgeEdge (unsigned int i) const
 
unsigned int EdgeArrayIndex (const ON_SubDEdge *e) const
 
unsigned int EdgeCount () const
 
ON__UINT_PTR EdgeDirection (unsigned int i) const
 
bool EdgeMark (unsigned int i, bool bMissingEgeReturnValue) const
 
ON__UINT8 EdgeMarkBits (unsigned int i, ON__UINT8 missing_edge_return_value) const
 
const ON_SubDEdgePtr EdgePtr (unsigned int i) const
 
const ON_SubDEdgePtr EdgePtrFromEdge (const class ON_SubDEdge *e) const
 
bool EvaluateCatmullClarkSubdivisionPoint (double subdivision_point[3]) const
 
unsigned int FaceId () const
 
void FaceModifiedNofification () const
 
bool GetCenterPointAndNormal (ON_SubDComponentLocation subd_appearance, double *P, double *N) const
 
unsigned int GetCornerEdges (const ON_SubDVertex *corner_vertex, ON_SubDEdgePtr &entering_edge, ON_SubDEdgePtr &leaving_edge) const
 Get the edges in the face's boundary that are on either side of a face corner. More...
 
unsigned int GetEdgeArray (ON_SimpleArray< ON_SubDEdgePtr > &face_edge_array) const
 
bool GetFacePackRectCorners (bool bGridOrder, ON_2dPoint face_pack_rect_corners[4]) const
 
bool GetMeshFragmentPackRectCorners (bool bGridOrder, unsigned int fragment_index, ON_2dPoint mesh_fragment_pack_rect_corners[4]) const
 
bool GetQuadSurface (class ON_BezierSurface &limit_surface) const
 
bool GetQuadSurface (class ON_NurbsSurface &limit_surface) const
 
bool GetQuadSurface (double *limit_surface_cv, size_t limit_surface_cv_stride0, size_t limit_surface_cv_stride1) const
 
bool GetSubdivisionPoint (double subdivision_point[3]) const
 
bool GetSurfaceCenterPointAndNormal (double *P, double *N) const
 
bool HasEdges () const
 
bool HasSharpEdges () const
 Determine if this SubD face has sharp edges. See ON_SubDEdge::IsSharp() for more information about sharp edges. More...
 
bool IsConvex () const
 
bool IsNotConvex () const
 
bool IsNotPlanar (double planar_tolerance=ON_ZERO_TOLERANCE) const
 Determine if the face's control net polygon is not planar. More...
 
bool IsPlanar (double planar_tolerance=ON_ZERO_TOLERANCE) const
 Determine if the face's control net polygon is planar. More...
 
unsigned int MarkedEdgeCount () const
 
unsigned int MarkedVertexCount () const
 
int MaterialChannelIndex () const
 
double MaximumEdgeSharpness () const
 Get the maximum sharpeness of the edges that form the face's boundary. (Creased edges have zero sharpness.) More...
 
const class ON_SubDMeshFragmentMeshFragments () const
 
const ON_ComponentStatus NeighborhoodStatusLogicalOr (bool bIncludeVertices, bool bIncludeEdges) const
 
const ON_SubDEdgeNextEdge (const ON_SubDEdge *edge) const
 
unsigned int NextEdgeArrayIndex (unsigned int edge_array_index) const
 
ON_SubDFaceoperator= (const ON_SubDFace &)=default
 
unsigned int PackId () const
 
const ON_2dPoint PackRectCorner (bool bGridOrder, int corner_index) const
 
bool PackRectIsSet () const
 
const ON_2dPoint PackRectOrigin () const
 
unsigned PackRectRotationDegrees () const
 
double PackRectRotationRadians () const
 
const ON_2dVector PackRectSize () const
 
const ON_Color PerFaceColor () const
 
const ON_SubDEdgePrevEdge (const ON_SubDEdge *edge) const
 
unsigned int PrevEdgeArrayIndex (unsigned int edge_array_index) const
 
const ON_SubDEdgeQuadOppositeEdge (const ON_SubDEdge *edge) const
 
const ON_SubDVertexQuadOppositeVertex (const ON_SubDVertex *vertex) const
 
bool RemoveEdgeFromArray (const ON_SubDEdge *e)
 
bool RemoveEdgeFromArray (unsigned int i, ON_SubDEdgePtr &removed_edge)
 
bool ReplaceEdgeInArray (unsigned int fei0, ON_SubDEdge *edge_to_remove, ON_SubDEdge *edge_to_insert)
 
bool ReplaceEdgeInArray (unsigned int fei0, ON_SubDEdge *edge_to_remove, ON_SubDEdgePtr edgeptr_to_insert)
 
bool ReverseEdgeList ()
 
bool RotateEdgeArray (unsigned int fei0)
 
unsigned int SetEdgeMarks (bool bMark) const
 
void SetMaterialChannelIndex (int material_channel_index) const
 
void SetPackIdForExperts (unsigned int pack_id)
 
bool SetPackRectForExperts (ON_2dPoint pack_rect_origin, ON_2dVector pack_rect_size, int packing_rotation_degrees)
 
void SetPerFaceColor (ON_Color color) const
 
bool SetTexturePoint (unsigned i, ON_3dPoint texture_point) const
 
unsigned int SetVertexMarks (bool bMark) const
 
unsigned int SharpEdgeCount () const
 Number of sharp edges attached to this face. See ON_SubDEdge::IsSharp() for more information about sharp edges. More...
 
unsigned int SharpEdgeCount (ON_SubDEdgeSharpness &sharpness_range) const
 Get the range of sharpness values assigned to this face's sharp edges and return the number of sharp edges. See ON_SubDEdge::IsSharp() for more information about sharp edges. More...
 
const ON_3dPoint SubdivisionPoint () const
 
const ON_BoundingBox SurfaceBoundingBox (const ON_SubD &subd) const
 
const ON_Plane SurfaceCenterFrame () const
 Get the limit surface tangent plane at the center of the face. The plane's origin is the point on the limit surface at the center of the face. The plane's z axis is the limit surface normal vector at the center of the face. More...
 
const ON_3dVector SurfaceCenterNormal () const
 Get the limit surface normal vector at the center of the face. More...
 
const ON_3dPoint SurfaceCenterPoint () const
 Get the point on the limit surface that is at the center of the face. More...
 
const ON_3dPoint TextureCenterPoint () const
 
const ON_3dPoint TexturePoint (unsigned int i) const
 
bool TexturePointsAreSet () const
 
unsigned int TexturePointsCapacity () const
 
ON__UINT32 TopologyCRC32 (bool bIncludeSubdivisionProperties) const
 Get a 32 bit CRC that is useful in detecting when a face's connections to attached vertices or edges have been changed. More...
 
const ON_SHA1_Hash TopologyHash (bool bIncludeSubdivisionProperties) const
 Get a SHA-1 hash that is useful in detecting when a face's connections to attached vertices or edges have been changed. See also ON_SubDFace::TopologyCRC32() which, in practice, is just as reliable as the hash. More...
 
bool Transform (bool bTransformationSavedSubdivisionPoint, bool bKeepCurvatures, bool bKeepTextures, bool bKeepColors, const ON_Xform &xform, const ON_Xform &xformNormals, const ON_Xform &xformCurvatures, const ON_Xform &xformTextures, const ON_Xform &xformColors)
 
bool Transform (bool bTransformationSavedSubdivisionPoint, const class ON_Xform &xform)
 
const class ON_SubDVertexVertex (unsigned int i) const
 
const ON_SubDComponentPtrPair VertexEdgePair (const ON_SubDVertex *vertex) const
 
const ON_SubDComponentPtrPair VertexEdgePair (unsigned vertex_index) const
 
unsigned int VertexIndex (const ON_SubDVertex *vertex) const
 
bool VertexMark (unsigned int i, bool bMissingVertexReturnValue) const
 
ON__UINT8 VertexMarkBits (unsigned int i, ON__UINT8 missing_vertex_return_value) const
 
bool Write (class ON_BinaryArchive &archive) const
 
- Public Member Functions inherited from ON_SubDComponentBase
 ON_SubDComponentBase ()=default
 
 ON_SubDComponentBase (const ON_SubDComponentBase &)=default
 
 ~ON_SubDComponentBase ()=default
 
unsigned int ArchiveId () const
 
bool ClearMark () const
 
ON__UINT8 ClearMarkBits () const
 
void ClearSavedSubdivisionPoint () const
 
void ClearSubdivisionDisplacement () const
 
bool GetSavedSubdivisionPoint (double subdivision_point[3]) const
 
bool GetSubdivisionDisplacement (double *) const
 
bool InSymmetrySet () const
 
bool IsActive () const
 
bool IsSymmetrySetPrimaryMotif () const
 
bool Mark () const
 
ON__UINT8 MarkBits () const
 
ON_SubDComponentBaseoperator= (const ON_SubDComponentBase &)=default
 
const ON_3dPoint SavedSubdivisionPoint () const
 
bool SavedSubdivisionPointIsSet () const
 
void SetArchiveId (unsigned int archive_id) const
 
bool SetMark () const
 
bool SetMark (bool bMark) const
 
ON__UINT8 SetMarkBits (ON__UINT8 mark_bits) const
 
bool SetSavedSubdivisionPoint (const double subdivision_point[3]) const
 
bool SetSubdivisionDisplacement (const double *)
 
void SetSubdivisionLevel (unsigned level)
 
const ON_ComponentStatus Status () const
 
const ON_3dVector SubdivisionDisplacement () const
 
bool SubdivisionDisplacementIsNonzero () const
 
const unsigned SubdivisionLevel () const
 

Static Public Member Functions

static const ON_SubDFacePtr FromVertices (const ON_SimpleArray< const ON_SubDVertex * > &vertex_list)
 
static const ON_SubDFacePtr FromVertices (const ON_SubDVertex *const *vertex_list, size_t face_vertices_count)
 
static const ON_2udex GetNgonSubPackRectSizeAndDelta (unsigned int ngon_edge_count, ON_2dVector ngon_face_pack_rect_size, ON_2dVector &ngon_sub_pack_rect_size, ON_2dVector &ngon_sub_pack_rect_delta)
 
static bool IsValidPackRect (ON_2dPoint pack_rect_origin, ON_2dVector pack_rect_size, int packing_rotation_degrees)
 
static double PackRectGapInPixels (double pack_rect_distance_in_pixels)
 
static bool Read (class ON_BinaryArchive &archive, class ON_SubD &subd, class ON_SubDFace *&face)
 
- Static Public Member Functions inherited from ON_SubDComponentBase
static int CompareId (const ON_SubDComponentBase *lhs, const ON_SubDComponentBase *rhs)
 

Public Attributes

ON_SubDEdgePtr m_edge4 [4]
 
unsigned short m_edge_count = 0
 
ON_SubDEdgePtrm_edgex = nullptr
 
unsigned short m_edgex_capacity = 0
 
unsigned int m_level_zero_face_id = 0
 id of level zero face More...
 
const class ON_SubDFacem_next_face = nullptr
 linked list of faces on this level More...
 
const class ON_SubDFacem_prev_face = nullptr
 m_prev_face, m_next_face must be the first data members of ON_SubDFace More...
 
- Public Attributes inherited from ON_SubDComponentBase
unsigned int m_group_id = 0U
 
unsigned int m_id = 0
 
ON_ComponentStatus m_status = ON_ComponentStatus::NoneSet
 
const class ON_SubDVertexm_subd_point1 = nullptr
 

Static Public Attributes

static const ON_SubDFace Empty
 
- Static Public Attributes inherited from ON_SubDComponentBase
static const ON_SubDComponentBase Unset
 

Friends

class ON_Internal_SubDFaceMeshFragmentAccumulator
 
class ON_SubDArchiveIdMap
 
class ON_SubDEdge
 
class ON_SubDHeap
 
class ON_SubDVertex
 

Additional Inherited Members

- Protected Types inherited from ON_SubDComponentBase
enum  ModifiedFlags : unsigned char { Modified1Bit = 0x01, Modified2Bit = 0x02, ModifiedFlagsMask = 0x03 }
 
enum  SavedPointsFlags : unsigned char { SubdivisionPointBit = 0x40, SurfacePointBit = 0x80, CachedPointMask = 0xC0 }
 
- Protected Member Functions inherited from ON_SubDComponentBase
void CopyBaseFrom (const ON_SubDComponentBase *src, bool bCopySymmetrySetNext)
 
void Internal_ClearModifiedFlags () const
 
void Internal_ClearSubdivisionPointAndSurfacePointFlags () const
 
void Internal_ClearSubdivisionPointFlag () const
 
void Internal_ClearSurfacePointFlag () const
 
bool Internal_Modified1IsSet () const
 
bool Internal_Modified1or2IsSet () const
 
void Internal_SetModified1Flag () const
 
void Internal_SetModified2Flag () const
 
void Internal_SetSavedSurfacePointFlag (bool bSavedSurfacePointFlag) const
 
bool Internal_SubdivisionPointFlag () const
 
bool Internal_SurfacePointFlag () const
 
void Internal_TransformComponentBase (bool bTransformationSavedSubdivisionPoint, const class ON_Xform &xform)
 
- Protected Attributes inherited from ON_SubDComponentBase
unsigned char m_level = 0U
 
unsigned char m_saved_points_flags = 0U
 
double m_saved_subd_point1 [3]
 GetSubdivisionPoint( bUseSavedSubdivisionPoint=true ) can change the value of m_cache_subd_P. More...
 

Detailed Description

ON_SubDFace