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

#include <opennurbs_xform.h>

Public Member Functions

 ON_ClippingRegionPoints ()=default
 
 ON_ClippingRegionPoints (const ON_ClippingRegionPoints &src)
 
 ~ON_ClippingRegionPoints ()
 
bool AppendClipPoint (const class ON_ClippingRegion &clipping_region, ON_3dPoint world_point)
 
bool AppendClipPoint (ON_3dPoint clip_point, unsigned int clip_flag)
 
bool AppendClipPoints (const class ON_ClippingRegion &clipping_region, const ON_SimpleArray< ON_3dPoint > &world_points)
 
bool AppendClipPoints (const class ON_ClippingRegion &clipping_region, size_t world_point_count, const ON_3dPoint *world_points)
 
bool AppendClipPoints (const class ON_ClippingRegion &clipping_region, size_t world_point_count, size_t world_point_stride, const double *world_points)
 
void Clear ()
 
unsigned int ClipFlag (unsigned int point_index) const
 
ON_3dPoint ClipPoint (unsigned int point_index) const
 
void Destroy ()
 
ON_ClippingRegionPointsoperator= (const ON_ClippingRegionPoints &src)
 
unsigned int PointCapacity () const
 
unsigned int PointCout () const
 
bool ReserveBufferPointCapacity (size_t buffer_point_capacity)
 

Public Attributes

unsigned int m_and_clip_flags = 0
 
unsigned int * m_clip_flags = nullptr
 
ON_3dPointm_clip_points = nullptr
 
unsigned int m_or_clip_flags = 0
 
unsigned int m_point_capacity = 0
 
unsigned int m_point_count = 0
 

Static Public Attributes

static const ON_ClippingRegionPoints Empty
 

Detailed Description

Description: ON_ClippingRegionPoints is a container for storing or referencing clip points and clip flags. The values are typically calcuated by ON_ClippingRegion.TransformPoint().

Constructor & Destructor Documentation

◆ ON_ClippingRegionPoints() [1/2]

ON_ClippingRegionPoints::ON_ClippingRegionPoints ( )
default

◆ ~ON_ClippingRegionPoints()

ON_ClippingRegionPoints::~ON_ClippingRegionPoints ( )

◆ ON_ClippingRegionPoints() [2/2]

ON_ClippingRegionPoints::ON_ClippingRegionPoints ( const ON_ClippingRegionPoints src)

Member Function Documentation

◆ AppendClipPoint() [1/2]

bool ON_ClippingRegionPoints::AppendClipPoint ( const class ON_ClippingRegion clipping_region,
ON_3dPoint  world_point 
)

Description: Append the clipping point and clipping flag calculated by clipping_region.TransformPoint(world_point,...).

◆ AppendClipPoint() [2/2]

bool ON_ClippingRegionPoints::AppendClipPoint ( ON_3dPoint  clip_point,
unsigned int  clip_flag 
)

Description: Append the clipping point and clipping flag value.

◆ AppendClipPoints() [1/3]

bool ON_ClippingRegionPoints::AppendClipPoints ( const class ON_ClippingRegion clipping_region,
const ON_SimpleArray< ON_3dPoint > &  world_points 
)

Description: Append the clipping points and clipping flags calculated by clipping_region.TransformPoint(world_point,...) for every input world point.

◆ AppendClipPoints() [2/3]

bool ON_ClippingRegionPoints::AppendClipPoints ( const class ON_ClippingRegion clipping_region,
size_t  world_point_count,
const ON_3dPoint world_points 
)

Description: Append the clipping points and clipping flags calculated by clipping_region.TransformPoint(world_point,...) for every input world point.

◆ AppendClipPoints() [3/3]

bool ON_ClippingRegionPoints::AppendClipPoints ( const class ON_ClippingRegion clipping_region,
size_t  world_point_count,
size_t  world_point_stride,
const double *  world_points 
)

Description: Append the clipping points and clipping flags calculated by clipping_region.TransformPoint(world_point,...) for every input world point.

◆ Clear()

void ON_ClippingRegionPoints::Clear ( )

Description: Sets point count and aggragate flags falues to zero but does not deallocate the memory buffer. When an ON_ClippingRegionPoints will be used multiple times, it is more efficient to call Clear() between uses than calling Destroy().

◆ ClipFlag()

unsigned int ON_ClippingRegionPoints::ClipFlag ( unsigned int  point_index) const

Returns: Clip flag

◆ ClipPoint()

ON_3dPoint ON_ClippingRegionPoints::ClipPoint ( unsigned int  point_index) const

Returns: Clip point location.

◆ Destroy()

void ON_ClippingRegionPoints::Destroy ( )

Description: Clear() and deallocate the memory buffer.

◆ operator=()

ON_ClippingRegionPoints& ON_ClippingRegionPoints::operator= ( const ON_ClippingRegionPoints src)

◆ PointCapacity()

unsigned int ON_ClippingRegionPoints::PointCapacity ( ) const

◆ PointCout()

unsigned int ON_ClippingRegionPoints::PointCout ( ) const

◆ ReserveBufferPointCapacity()

bool ON_ClippingRegionPoints::ReserveBufferPointCapacity ( size_t  buffer_point_capacity)

These functions and data members are public so they can be used by experts to reference information that is managed by other entities. If you access or modify them, you are responsible for making sure you do it correctly. All the interface functions above assume the values below are correctly set. Reserve buffer capacity.

Member Data Documentation

◆ Empty

const ON_ClippingRegionPoints ON_ClippingRegionPoints::Empty
static

◆ m_and_clip_flags

unsigned int ON_ClippingRegionPoints::m_and_clip_flags = 0

◆ m_clip_flags

unsigned int* ON_ClippingRegionPoints::m_clip_flags = nullptr

◆ m_clip_points

ON_3dPoint* ON_ClippingRegionPoints::m_clip_points = nullptr

◆ m_or_clip_flags

unsigned int ON_ClippingRegionPoints::m_or_clip_flags = 0

◆ m_point_capacity

unsigned int ON_ClippingRegionPoints::m_point_capacity = 0

◆ m_point_count

unsigned int ON_ClippingRegionPoints::m_point_count = 0

All the information below is automatically managed if you use the AppendClipPoint() or AppendClipPoints() functions to add clipping points.