3ds Max C++ API Reference
|
#include <MNNormalSpec.h>
Public Member Functions | |
MNNormalSpec () | |
~MNNormalSpec () | |
DllExport void | Initialize () |
DllExport bool | NAlloc (int num, bool keep=TRUE) |
DllExport void | NShrink () |
DllExport bool | FAlloc (int num, bool keep=TRUE) |
DllExport void | FShrink () |
DllExport void | Clear () |
DllExport void | ClearAndFree () |
int | GetNumFaces () const |
DllExport bool | SetNumFaces (int numFaces) |
int | GetNumNormals () const |
DllExport bool | SetNumNormals (int numNormals) |
Point3 & | Normal (int normID) const |
Point3 * | GetNormalArray () const |
bool | GetNormalExplicit (int normID) const |
bool | AnyExplicitNormalsSet () const |
void | SetNormalExplicit (int normID, bool value) |
void | SetAllExplicit (bool value=true) |
Set all normals in this MNNormalSpec to be explicit. | |
MNNormalFace & | Face (int faceID) const |
MNNormalFace * | GetFaceArray () const |
void | SetParent (MNMesh *pMesh) |
DllExport Point3 & | GetNormal (int face, int corner) |
DllExport void | SetNormal (int face, int corner, Point3 &normal) |
DllExport int | GetNormalIndex (int face, int corner) |
DllExport void | SetNormalIndex (int face, int corner, int normalIndex) |
DllExport int | NewNormal (Point3 &normal, bool explic=true) |
DllExport void | SetSelection (BitArray &newSelection) |
BitArray & | GetSelection () |
void | SetDisplayLength (float displayLength) |
float | GetDisplayLength () |
DllExport void | CollapseDeadFaces () |
DllExport void | Display (GraphicsWindow *gw, bool showSel) |
DllExport bool | HitTest (GraphicsWindow *gw, HitRegion *hr, DWORD flags, SubObjHitList &hitList) |
DllExport Box3 | GetBoundingBox (Matrix3 *tm=NULL, bool selectedOnly=false) |
DllExport void | ClearNormals () |
DllExport void | BuildNormals () |
DllExport void | ComputeNormals () |
DllExport void | CheckNormals () |
DllExport void | AdjustToParent (bool doCheckDegree=true) |
Adjusts the number and topology of the normal faces to match the parent mesh. | |
DllExport MNNormalSpec & | operator= (const MNNormalSpec &from) |
DllExport void | CopySpecified (const MNNormalSpec &from) |
DllExport bool | CopySpecified (const MNNormalSpec &sourceNormals, const IntTab &faceIndexMap) |
For each face index map entry faceIndexMap[f] which is valid, i.e. | |
DllExport MNNormalSpec & | operator+= (const MNNormalSpec &from) |
DllExport void | MNDebugPrint (bool printAll=false) |
DllExport bool | CheckAllData (int numParentFaces) |
DllExport IOResult | Save (ISave *isave) |
DllExport IOResult | Save (ISave *isave, ChannelMask channels) |
DllExport IOResult | Load (ILoad *iload) |
DllExport IOResult | Load (ILoad *iload, ChannelMask channels) |
Interface_ID | GetID () |
DllExport void | DeleteInterface () |
DllExport BaseInterface * | GetInterface (Interface_ID id) |
DllExport BaseInterface * | CloneInterface (void *remapDir=NULL) |
DllExport void | ShallowCopy (IPipelineClient *from, ChannelMask channels) |
DllExport void | DeepCopy (IPipelineClient *from, ChannelMask channels) |
DllExport void | NewAndCopyChannels (ChannelMask channels) |
DllExport void | FreeChannels (ChannelMask channels, int zeroOthers=1) |
DllExport void | ZeroChannels (ChannelMask channels) |
DllExport void | AppendAllChannels (IPipelineClient *from) |
DllExport bool | Transform (const Matrix3 &transformMat, bool useSelelection=false, const BitArray *normalSelection=nullptr, bool isGeomTransform=true) |
Transforms the normals. | |
DllExport bool | Translate (Point3 &translate, BOOL useSel=true, BitArray *normalSelection=NULL) |
DllExport bool | BreakNormals (BOOL useSel=true, BitArray *normalSelection=NULL, BOOL toAverage=false) |
DllExport bool | UnifyNormals (BOOL useSel=true, BitArray *normalSelection=NULL, BOOL toAverage=false) |
DllExport bool | AverageNormals (BOOL useThresh=false, float threshold=0.0f, BOOL useSel=true, BitArray *normalSelection=NULL) |
DllExport bool | SpecifyNormals (BOOL useSel=true, BitArray *normalSelection=NULL) |
DllExport bool | MakeNormalsExplicit (BOOL useSel=true, BitArray *normalSelection=NULL, bool value=true) |
DllExport bool | ResetNormals (BOOL useSel=true, BitArray *normalSelection=NULL) |
virtual void | ShallowCopy (IPipelineClient *from, ChannelMask channels)=0 |
virtual void | DeepCopy (IPipelineClient *from, ChannelMask channels)=0 |
virtual void | NewAndCopyChannels (ChannelMask channels)=0 |
virtual void | FreeChannels (ChannelMask channels, int zeroOthers=1)=0 |
virtual void | ZeroChannels (ChannelMask channels)=0 |
virtual void | AppendAllChannels (IPipelineClient *from)=0 |
virtual Interface_ID | GetID () |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
![]() | |
FlagUser ()=default | |
FlagUser (const FlagUser &)=default | |
FlagUser (FlagUser &&)=default | |
FlagUser & | operator= (const FlagUser &)=default |
FlagUser & | operator= (FlagUser &&)=default |
void | SetFlag (DWORD fl, bool val=TRUE) |
void | ClearFlag (DWORD fl) |
bool | GetFlag (DWORD fl) const |
void | ClearAllFlags () |
void | CopyFlags (DWORD fl) |
void | CopyFlags (const FlagUser &fu) |
void | CopyFlags (const FlagUser *fu) |
void | CopyFlags (DWORD fl, DWORD mask) |
void | CopyFlags (const FlagUser &fu, DWORD mask) |
void | CopyFlags (const FlagUser *fu, DWORD mask) |
void | OrFlags (const FlagUser &fu) |
void | OrFlags (const FlagUser *fu) |
void | AndFlags (const FlagUser &fu) |
void | AndFlags (const FlagUser *fu) |
bool | FlagMatch (DWORD fmask, DWORD fl) const |
bool | FlagMatch (DWORD fmask, const FlagUser &fu) const |
bool | FlagMatch (DWORD fmask, const FlagUser *fu) const |
DWORD | ExportFlags () const |
void | ImportFlags (DWORD fl) |
IOResult | WriteFlags (ISave *isave, ULONG *nb) const |
IOResult | ReadFlags (ILoad *iload, ULONG *nb) |
Additional Inherited Members | |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set all normals in this MNNormalSpec to be explicit.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
DllExport void Display | ( | GraphicsWindow * | gw, |
bool | showSel | ||
) |
DllExport bool HitTest | ( | GraphicsWindow * | gw, |
HitRegion * | hr, | ||
DWORD | flags, | ||
SubObjHitList & | hitList | ||
) |
Adjusts the number and topology of the normal faces to match the parent mesh.
For new faces added, or if doCheckDegree is true, for any faces encountered whose degree does not match the corresponding face of the parent mesh, all normals are set unspecified. If the parent mesh pointer is not set, does nothing.
[in] | doCheckDegree | when true, the degree of each already-created normal face is checked against the corresponding face in the parent mesh |
DllExport MNNormalSpec & operator= | ( | const MNNormalSpec & | from | ) |
DllExport void CopySpecified | ( | const MNNormalSpec & | from | ) |
DllExport bool CopySpecified | ( | const MNNormalSpec & | sourceNormals, |
const IntTab & | faceIndexMap | ||
) |
For each face index map entry faceIndexMap[f] which is valid, i.e.
faceIndexMap[f] >= 0, the target face faceIndexMap[f] of this object is defined as a copy of source face f of object sourceNormals, which may be the same as this object. In particular, face faceIndexMap[f] is allocated if necessary, set to the same degree as the source face, and any vertex normals which are set as specified for the source face are copied to the corresponding vertices of the target face. The explicitness of normals is also preserved in the copy. Note that the operation will fail if sourceNormals is the same as this object, and the index map contains undefined copies, i.e. if 0 <= faceIndexMap[f] < faceIndexMap.Count() for any f, and faceIndexMap[faceIndexMap[f]] >= 0.
[in] | sourceNormals | specified normals object containing the source face data |
[in] | faceIndexMap | map from source to target faces; the condition faceIndexMap[f] < 0 indicates that source face f is not to be copied |
DllExport MNNormalSpec & operator+= | ( | const MNNormalSpec & | from | ) |
DllExport IOResult Save | ( | ISave * | isave, |
ChannelMask | channels | ||
) |
DllExport IOResult Load | ( | ILoad * | iload, |
ChannelMask | channels | ||
) |
|
inlinevirtual |
Reimplemented from BaseInterface.
|
virtual |
Reimplemented from BaseInterface.
|
virtual |
Reimplemented from BaseInterface.
|
virtual |
Implements IPipelineClient.
|
virtual |
Implements IPipelineClient.
|
virtual |
Implements IPipelineClient.
|
virtual |
Implements IPipelineClient.
|
virtual |
Implements IPipelineClient.
|
virtual |
Implements IPipelineClient.
DllExport bool Transform | ( | const Matrix3 & | transformMat, |
bool | useSelelection = false , |
||
const BitArray * | normalSelection = nullptr , |
||
bool | isGeomTransform = true |
||
) |
Transforms the normals.
If isGeomTransform is true, the normals are transformed consistent with the transformation defined by matrix transformMat being applied to the geometry, meaning that the normal vectors are multiplied by transpose of the inverse of transformMat. If isGeomTransform is false, then the matrix portion of transformMat is simply applied directly. In both cases, we disregard the translation vector, and renormalize the affected normal vectors. Note that if transformMat represents a rotation, then the result is independent of the choice of isGeomTransform, since the matrix will be orthogonal.
[in] | transformMat | matrix representing the transformation to be applied |
[in] | useSelelection | when true, only selected normals are altered, otherwise, the transformation is applied to all defined normals |
[in] | normalSelection | when useSelection is true, the selected normals are defined by normalSelection if not null, or the usual member selection, otherwise |
[in] | isGeomTransform | when true, matrix transformMat is interpreted as a transformation applied to the associated geometry, as discussed above |
DllExport bool Translate | ( | Point3 & | translate, |
BOOL | useSel = true , |
||
BitArray * | normalSelection = NULL |
||
) |
DllExport bool BreakNormals | ( | BOOL | useSel = true , |
BitArray * | normalSelection = NULL , |
||
BOOL | toAverage = false |
||
) |
DllExport bool UnifyNormals | ( | BOOL | useSel = true , |
BitArray * | normalSelection = NULL , |
||
BOOL | toAverage = false |
||
) |
DllExport bool AverageNormals | ( | BOOL | useThresh = false , |
float | threshold = 0.0f , |
||
BOOL | useSel = true , |
||
BitArray * | normalSelection = NULL |
||
) |
DllExport bool MakeNormalsExplicit | ( | BOOL | useSel = true , |
BitArray * | normalSelection = NULL , |
||
bool | value = true |
||
) |