3ds Max C++ API Reference
PatchVert Class Reference

#include <patch.h>

+ Inheritance diagram for PatchVert:

Public Member Functions

CoreExport PatchVert ()
 
CoreExport PatchVert (PatchVert &from)
 
 ~PatchVert ()
 
CoreExport PatchVertoperator= (PatchVert &from)
 
CoreExport void ResetData ()
 
CoreExport int FindVector (int index)
 
CoreExport void AddVector (int index)
 
CoreExport void DeleteVector (int index)
 
CoreExport int FindPatch (int index)
 
CoreExport void AddPatch (int index)
 
CoreExport void DeletePatch (int index)
 
CoreExport int FindEdge (int index)
 
CoreExport void AddEdge (int index)
 
CoreExport void DeleteEdge (int index)
 
void Transform (Matrix3 &tm)
 
CoreExport void SetHidden (BOOL sw=TRUE)
 
BOOL IsHidden ()
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 

Public Attributes

Point3 p
 
IntTab vectors
 
IntTab patches
 
IntTab edges
 
DWORD flags
 
int aux1
 
int aux2
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
Class PatchMesh, Template Class Tab, Patches and Faces.
Description:
This class stores the information associated with a patch vertex and provides methods to access the data associated with this vertex. All methods of this class are implemented by the system.
Data Members:
Point3 p;

The vertex location.

IntTab vectors;

The list of vectors attached to this vertex. There can be any number of vectors attached to a vertex. For example consider the north pole of a sphere made from a set of triangular patches. If there were 16 patches meeting at this point there would be 16 vectors. The table contains the indices of these vectors. This is set up automatically when a developer calls buildLinkages().

Note: typedef Tab<int> IntTab;

Note that the methods below allow a developer to manipulate the tables of this class. Developers must be careful when doing so as it is easy to corrupt the patch data structures. It may be easier for developers to manipulate the patches, delete vertices, etc., by manipulating them in the PatchMesh and then call buildLinkages() again. The methods below do work however and may be used.

IntTab patches;

The list of patches using this vertex.

IntTab edges;

This data member is available in release 4.0 and later only.

The list of edges using this vertex. This table will be set up automatically when a developer calls buildLinkages().

DWORD flags;

The patch vertex flags

PVERT_COPLANAR

This constrains things such that this vertex and all the vectors that are attached to it are coplanar. If this is set, and you call ApplyConstraints(), the system will adjust the vectors to the average plane that they are in and then constrain them to it.

PVERT_CORNER

The vertex is a corner.

PVERT_HIDDEN

The vertex is hidden.

int aux1;

Used to track topo changes during editing (Edit Patch).

int aux2;

Used to track topology changes during editing (PatchMesh).

Constructor & Destructor Documentation

◆ PatchVert() [1/2]

Remarks
Constructor. The location is set to 0,0,0. The flags are set to 0.

◆ PatchVert() [2/2]

Remarks
Constructor. The data members are copied from the from PatchVert.
Parameters:
PatchVert &from

The source PatchVert.

◆ ~PatchVert()

~PatchVert ( )
inline
Remarks
Destructor. Deletes the elements from the vectors table and patches table.
249 { ResetData(); }
CoreExport void ResetData()

Member Function Documentation

◆ operator=()

CoreExport PatchVert& operator= ( PatchVert from)
Remarks
Assignment operator.
Parameters:
PatchVert& from

The patch vertex to copy from.

◆ ResetData()

CoreExport void ResetData ( )
Remarks
This method deletes the elements from the vectors table and patches table.

◆ FindVector()

CoreExport int FindVector ( int  index)
Remarks
Returns the index in this classes vectors table of the vector whose index is passed. If not found, -1 is returned.
Parameters:
int index

The index in the PatchMesh class vectors table (vecs) of the vector to find.

◆ AddVector()

CoreExport void AddVector ( int  index)
Remarks
Adds the specified vector to this vector table.
Parameters:
int index

The index in the PatchMesh class vectors table (vecs) of the vector to add.

◆ DeleteVector()

CoreExport void DeleteVector ( int  index)
Remarks
Deletes the specified vector from this vector table.
Parameters:
int index

The index in the PatchMesh class vectors table (vecs) of the vector to delete.

◆ FindPatch()

CoreExport int FindPatch ( int  index)
Remarks
Returns the index in this classes patches table of the patch whose index is passed. If not found, -1 is returned.
Parameters:
int index

The index in the PatchMesh class patches table (patches) of the patch to find.

◆ AddPatch()

CoreExport void AddPatch ( int  index)
Remarks
Adds the specified patch to this vector table.
Parameters:
int index

The index in the PatchMesh class patches table (patches) of the patch to add.

◆ DeletePatch()

CoreExport void DeletePatch ( int  index)
Remarks
Deletes the patch specified by the index.
Parameters:
int index

The index in the PatchMesh class patches table (patches) of the patch to delete.

◆ FindEdge()

CoreExport int FindEdge ( int  index)
Remarks
Returns the index in this classes edges table of the patch whose index is passed. If not found, -1 is returned.
Parameters:
int index

The index in the PatchMesh class edges table (edges) of the edge to find.

◆ AddEdge()

CoreExport void AddEdge ( int  index)
Remarks
Adds the specified edge to this vector table.
Parameters:
int index

The index in the PatchMesh class edges table (edges) of the edge to add.

◆ DeleteEdge()

CoreExport void DeleteEdge ( int  index)
Remarks
Deletes the edge specified by the index.
Parameters:
int index

The index in the PatchMesh class edges table (edges) of the edge to delete.

◆ Transform()

void Transform ( Matrix3 tm)
inline
Remarks
This method is available in release 3.0 and later only.

Transform the vertex by the specified matrix.
Parameters:
Matrix3 &tm

The matrix which transforms the point.
321 { p = p * tm; }
Point3 p
Definition: patch.h:231

◆ SetHidden()

CoreExport void SetHidden ( BOOL  sw = TRUE)
inline
Remarks
This method is available in release 3.0 and later only.

Sets the hidden state of the vertex.
Parameters:
BOOL sw = TRUE

TRUE to set to hidden; FALSE for visible.
331  {
332  if(sw)
333  flags |= PVERT_HIDDEN;
334  else
335  flags &= ~PVERT_HIDDEN;
336  }
DWORD flags
Definition: patch.h:235
#define PVERT_HIDDEN
Definition: patch.h:175

◆ IsHidden()

BOOL IsHidden ( )
inline
Remarks
This method is available in release 3.0 and later only.

Returns TRUE if the vertex is hidden; otherwise FALSE.
341 { return (flags & PVERT_HIDDEN) ? TRUE : FALSE; }

◆ Save()

CoreExport IOResult Save ( ISave isave)
Remarks
This method is used internally to save the class data to disk storage.

◆ Load()

CoreExport IOResult Load ( ILoad iload)
Remarks
This method is used internally to load the class data from disk storage.
Operators:

Member Data Documentation

◆ p

Point3 p

◆ vectors

IntTab vectors

◆ patches

IntTab patches

◆ edges

IntTab edges

◆ flags

DWORD flags

◆ aux1

int aux1

◆ aux2

int aux2