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

#include <opennurbs_pointgrid.h>

Inheritance diagram for ON_PointGrid:
ON_Geometry ON_Object

Public Member Functions

 ON_PointGrid ()
 
 ON_PointGrid (const ON_PointGrid &)
 
 ON_PointGrid (int, int)
 
virtual ~ON_PointGrid ()
 
bool Create (int, int)
 
void Destroy ()
 
int Dimension () const override
 ON_Geometry overrides. More...
 
void Dump (ON_TextLog &) const override
 for debugging More...
 
void EmergencyDestroy ()
 call if memory used by point grid becomes invalid More...
 
bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
More...
 
bool GetPoint (int, int, ON_3dPoint &) const
 
bool GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const override
 virtual ON_Geometry GetTightBoundingBox override
More...
 
void Initialize (void)
 zeros all fields More...
 
bool IsClosed (int) const
 Interface. More...
 
bool IsDeformable () const override
 virtual ON_Geometry::IsDeformable() override More...
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 ON_Object overrides. More...
 
bool MakeDeformable () override
 virtual ON_Geometry::MakeDeformable() override More...
 
ON::object_type ObjectType () const override
 
ON_PointGridoperator= (const ON_PointGrid &)
 
ON_3dPointoperator[] (int)
 point_grid[i][j] returns GetPoint(i,j) More...
 
const ON_3dPointoperator[] (int) const
 0 <= index < PointCount(0) More...
 
ON_3dPointPoint (int, int)
 
ON_3dPoint Point (int, int) const
 
double * PointArray ()
 
const double * PointArray () const
 
int PointArrayStride (int) const
 
int PointCount (int) const
 
int PointCount (void) const
 
bool Read (ON_BinaryArchive &) override
 
bool Reverse (int)
 
bool SetPoint (int, int, const ON_3dPoint &)
 
bool SwapCoordinates (int, int) override
 
bool Transform (const ON_Xform &) override
 
bool Transpose ()
 transpose grid points More...
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_Geometry
 ON_Geometry ()=default
 
 ON_Geometry (const ON_Geometry &)=default
 
 ~ON_Geometry ()=default
 
ON_BoundingBox BoundingBox () const
 
virtual class ON_BrepBrepForm (class ON_Brep *brep=nullptr) const
 
virtual void ClearBoundingBox ()
 
virtual ON_COMPONENT_INDEX ComponentIndex () const
 
virtual bool EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const
 
bool GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const
 
bool GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const
 
virtual bool HasBrepForm () const
 
virtual bool IsMorphable () const
 
virtual bool Morph (const class ON_SpaceMorph &morph)
 
ON_Geometryoperator= (const ON_Geometry &)=default
 
bool Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Scale (double scale_factor)
 
bool Translate (const ON_3dVector &translation_vector)
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
virtual unsigned int SizeOf () const
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Protected Attributes

ON_3dPointArray m_point
 
int m_point_count [2]
 Implementation. More...
 
int m_point_stride0
 >= m_point_count[1] More...
 

Additional Inherited Members

- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 
- Static Public Attributes inherited from ON_Geometry
const static ON_Geometry Unset
 

Detailed Description

NoKeywords

/ / Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved. / OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert / McNeel & Associates. / / THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. / ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF / MERCHANTABILITY ARE HEREBY DISCLAIMED. /
/ For complete openNURBS copyright information see http://www.opennurbs.org. / //////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ ON_PointGrid() [1/3]

ON_PointGrid::ON_PointGrid ( )

◆ ON_PointGrid() [2/3]

ON_PointGrid::ON_PointGrid ( const ON_PointGrid )

◆ ON_PointGrid() [3/3]

ON_PointGrid::ON_PointGrid ( int  ,
int   
)

◆ ~ON_PointGrid()

virtual ON_PointGrid::~ON_PointGrid ( )
virtual

Member Function Documentation

◆ Create()

bool ON_PointGrid::Create ( int  ,
int   
)

◆ Destroy()

void ON_PointGrid::Destroy ( )

◆ Dimension()

int ON_PointGrid::Dimension ( ) const
overridevirtual

ON_Geometry overrides.

Reimplemented from ON_Geometry.

◆ Dump()

void ON_PointGrid::Dump ( ON_TextLog ) const
overridevirtual

for debugging

Reimplemented from ON_Object.

◆ EmergencyDestroy()

void ON_PointGrid::EmergencyDestroy ( )

call if memory used by point grid becomes invalid

◆ GetBBox()

bool ON_PointGrid::GetBBox ( double *  boxmin,
double *  boxmax,
bool  bGrowBox = false 
) const
overridevirtual

virtual ON_Geometry GetBBox override

Reimplemented from ON_Geometry.

◆ GetPoint()

bool ON_PointGrid::GetPoint ( int  ,
int  ,
ON_3dPoint  
) const

◆ GetTightBoundingBox()

bool ON_PointGrid::GetTightBoundingBox ( class ON_BoundingBox tight_bbox,
bool  bGrowBox = false,
const class ON_Xform xform = nullptr 
) const
overridevirtual

virtual ON_Geometry GetTightBoundingBox override

Reimplemented from ON_Geometry.

◆ Initialize()

void ON_PointGrid::Initialize ( void  )

zeros all fields

◆ IsClosed()

bool ON_PointGrid::IsClosed ( int  ) const

Interface.

◆ IsDeformable()

bool ON_PointGrid::IsDeformable ( ) const
overridevirtual

virtual ON_Geometry::IsDeformable() override

Reimplemented from ON_Geometry.

◆ IsValid()

bool ON_PointGrid::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

ON_Object overrides.

Reimplemented from ON_Geometry.

◆ MakeDeformable()

bool ON_PointGrid::MakeDeformable ( )
overridevirtual

virtual ON_Geometry::MakeDeformable() override

Reimplemented from ON_Geometry.

◆ ObjectType()

ON::object_type ON_PointGrid::ObjectType ( ) const
overridevirtual

Description: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

Returns: ON::object_type enum value.

Remarks: The default implementation of this virtual function returns ON::unknown_object_type

Reimplemented from ON_Object.

◆ operator=()

ON_PointGrid& ON_PointGrid::operator= ( const ON_PointGrid )

◆ operator[]() [1/2]

ON_3dPoint* ON_PointGrid::operator[] ( int  )

point_grid[i][j] returns GetPoint(i,j)

0 <= index < PointCount(0)

◆ operator[]() [2/2]

const ON_3dPoint* ON_PointGrid::operator[] ( int  ) const

0 <= index < PointCount(0)

◆ Point() [1/2]

ON_3dPoint& ON_PointGrid::Point ( int  ,
int   
)

◆ Point() [2/2]

ON_3dPoint ON_PointGrid::Point ( int  ,
int   
) const

◆ PointArray() [1/2]

double* ON_PointGrid::PointArray ( )

◆ PointArray() [2/2]

const double* ON_PointGrid::PointArray ( ) const

◆ PointArrayStride()

int ON_PointGrid::PointArrayStride ( int  ) const

◆ PointCount() [1/2]

int ON_PointGrid::PointCount ( int  ) const

◆ PointCount() [2/2]

int ON_PointGrid::PointCount ( void  ) const

◆ Read()

bool ON_PointGrid::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ Reverse()

bool ON_PointGrid::Reverse ( int  )

◆ SetPoint()

bool ON_PointGrid::SetPoint ( int  ,
int  ,
const ON_3dPoint  
)

◆ SwapCoordinates()

bool ON_PointGrid::SwapCoordinates ( int  i,
int  j 
)
overridevirtual

Description: Swaps object coordinate values with indices i and j.

Parameters: i - [in] coordinate index j - [in] coordinate index

Remarks: The default implementation uses the virtual Transform() function to calculate the result. If you are creating an object where Transform() is slow, coordinate swapping will be frequently used, and coordinate swapping can be quickly accomplished, then override this function.

Example:

     ON_Point point(7,8,9);
     point.SwapCoordinates(0,2);
     ///< point = (9,8,7) 

Reimplemented from ON_Geometry.

◆ Transform()

bool ON_PointGrid::Transform ( const ON_Xform xform)
overridevirtual

Description: Transforms the object.

Parameters: xform - [in] transformation to apply to object. If xform.IsSimilarity() is zero, then you may want to call MakeSquishy() before calling Transform.

Remarks: When overriding this function, be sure to include a call to ON_Object::TransformUserData() which takes care of transforming any ON_UserData that may be attached to the object.

See Also: ON_Geometry::IsDeformable();

Remarks: Classes derived from ON_Geometry should call ON_Geometry::Transform() to handle user data transformations and then transform their definition.

Reimplemented from ON_Geometry.

◆ Transpose()

bool ON_PointGrid::Transpose ( )

transpose grid points

◆ Write()

bool ON_PointGrid::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Member Data Documentation

◆ m_point

ON_3dPointArray ON_PointGrid::m_point
protected

◆ m_point_count

int ON_PointGrid::m_point_count[2]
protected

Implementation.

number of points (>=1)

◆ m_point_stride0

int ON_PointGrid::m_point_stride0
protected

>= m_point_count[1]