3ds Max C++ API Reference
PatchVec Class Reference

#include <patch.h>

+ Inheritance diagram for PatchVec:

Public Member Functions

CoreExport PatchVec ()
 
CoreExport PatchVec (PatchVec &from)
 
void ResetData ()
 
CoreExport BOOL AddPatch (int index)
 
CoreExport PatchVecoperator= (PatchVec &from)
 
void Transform (Matrix3 &tm)
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 

Public Attributes

Point3 p
 
int vert
 
IntTab patches
 
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, Patches and Faces.

Description:
This class represents a patch vector. This can be either an interior vector or an edge vector. All methods of this class are implemented by the system.
Data Members:
Point3 p;

The vertex location.

int vert;

The vertex which owns this vector.

IntTab patches;

These are the patches that share this vector. If the edge is open there will only be one patch. In this case patches[0] will be used and patches[1] will be -1. Note: As of R4.0 the previous array of [2] has been replaced with the IntTab because vectors can now be used by more than two patches.

DWORD flags;

The patch vector flag:

PVEC_INTERIOR

This indicates the vector is an interior vector. These are the three vectors inside a tri patch or the four inside a quad patch.

int aux1;

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

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

int aux2;

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

Used to track topology changes during editing (PatchMesh).

Constructor & Destructor Documentation

◆ PatchVec() [1/2]

Remarks
Constructor. The location is set to 0,0,0. The vertex owner is set to undefined. The patches using the vector is set to undefined. The flags are set to 0.

◆ PatchVec() [2/2]

Remarks
Constructor. The data members are initialized to those of the from patch vector.
Parameters:
PatchVec &from

The vector to copy from.

Member Function Documentation

◆ ResetData()

void ResetData ( )
inline
Remarks
Resets the data members. The vertex owner is set to undefined. The patches using the vector is set to undefined.
int vert
Definition: patch.h:122
IntTab patches
Definition: patch.h:123
int Delete(int start, int num)
Deletes items from the Tab.
Definition: tab.h:322
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
#define PATCH_UNDEFINED
Definition: patch.h:32

◆ AddPatch()

CoreExport BOOL 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.
Returns
Returns TRUE if the patch was added; otherwise FALSE.

◆ operator=()

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

The patch vector to copy from.

◆ Transform()

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

Transforms the vertex location p by the specified matrix.
Parameters:
Matrix3 &tm

The matrix to transform the vertex.
158 { p = p * tm; }
Point3 p
Definition: patch.h:121

◆ Save()

CoreExport IOResult Save ( ISave isave)
Remarks
This is used internally to save the data to the .MAX file.

◆ Load()

CoreExport IOResult Load ( ILoad iload)
Remarks
This is used internally to load the data from the .MAX file.
Operators:

Member Data Documentation

◆ p

Point3 p

◆ vert

int vert

◆ patches

IntTab patches

◆ flags

DWORD flags

◆ aux1

int aux1

◆ aux2

int aux2