3ds Max C++ API Reference
Loading...
Searching...
No Matches
MeshNormalSpec Class Reference

This class is an interface used to store user-specified normals (such as those created in the Edit Normals modifier). More...

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/MeshNormalSpec.h>

Inheritance diagram for MeshNormalSpec:

Public Member Functions

 MeshNormalSpec ()
 ~MeshNormalSpec ()
void SetFlag (DWORD fl, bool val=true)
 Sets flags in the MeshNormalSpec.
void ClearFlag (DWORD fl)
 Clears the flags given. See GetFlag for more details on MeshNormalSpec flags.
bool GetFlag (DWORD fl) const
 Gets flags in the MeshNormalSpec.
DllExport void Initialize ()
 Initializes all data members - do not use if already allocated!
DllExport bool NAlloc (int num, bool keep=TRUE)
DllExport void NShrink ()
 shrinks allocation down to actual number of normals.
DllExport bool FAlloc (int num, bool keep=TRUE)
DllExport void FShrink ()
DllExport void Clear ()
 Deletes everything.
DllExport void ClearAndFree ()
 Deletes everything, frees all memory.
int GetNumFaces () const
DllExport bool SetNumFaces (int numFaces)
int GetNumNormals () const
DllExport bool SetNumNormals (int numNormals)
const Point3 & Normal (int normID) const
Point3 & Normal (int normID)
const Point3 * GetNormalArray () const
Point3 * GetNormalArray ()
bool GetNormalExplicit (int normID) const
void SetNormalExplicit (int normID, bool value)
bool AnyExplicitNormalsSet () const
 Returns true if there are any explicit normals set.
void SetAllExplicit (bool value=true)
 Set all normals to be explicit.
const MeshNormalFaceFace (int faceID) const
MeshNormalFaceFace (int faceID)
const MeshNormalFaceGetFaceArray () const
MeshNormalFaceGetFaceArray ()
void SetParent (Mesh *pMesh)
DllExport const Point3 & GetNormal (int face, int corner) const
DllExport Point3 & GetNormal (int face, int corner)
DllExport void SetNormal (int face, int corner, Point3 &normal)
DllExport int GetNormalIndex (int face, int corner) const
DllExport void SetNormalIndex (int face, int corner, int normalIndex)
DllExport int NewNormal (Point3 normal, bool explic=true)
DllExport void SetSelection (BitArray &newSelection)
const BitArray & GetSelection () const
BitArray & GetSelection ()
void SetDisplayLength (float displayLength)
float GetDisplayLength () const
DllExport void Display (GraphicsWindow *gw, bool showSel)
DllExport bool HitTest (GraphicsWindow *gw, HitRegion *hr, DWORD flags, SubObjHitList &hitList)
DllExport Box3 GetBoundingBox (const Matrix3 *tm=NULL, bool selectedOnly=false) const
DllExport void ClearNormals ()
 This method dumps all unspecified normals. Best to use only from within CheckNormals.
DllExport void BuildNormals ()
 Fills in the mpSpecNormal data by building all the unspecified normals, and computing non-explicit ones.
DllExport void ComputeNormals ()
 This method just recomputes the directions of non-explicit normals, without rebuilding the normal list.
DllExport void CheckNormals ()
 This checks our flags and calls BuildNormals, ComputeNormals as needed.
DllExport MeshNormalSpecoperator= (const MeshNormalSpec &from)
DllExport void CopySpecified (const MeshNormalSpec &from)
DllExport bool CopySpecified (const MeshNormalSpec &sourceNormals, const Tab< int > &faceIndexMap, int offset=0)
 For each face index map entry faceIndexMap[f] which is valid, i.e.
DllExport MeshNormalSpecoperator+= (const MeshNormalSpec &from)
DllExport void MyDebugPrint (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 () override
DllExport void DeleteInterface () override
DllExport BaseInterfaceGetInterface (Interface_ID id) override
DllExport BaseInterfaceCloneInterface (void *remapDir=NULL) override
DllExport void ShallowCopy (IPipelineClient *from, ChannelMask channels) override
DllExport void DeepCopy (IPipelineClient *from, ChannelMask channels) override
DllExport void NewAndCopyChannels (ChannelMask channels) override
DllExport void FreeChannels (ChannelMask channels, int zeroOthers=1) override
DllExport void ZeroChannels (ChannelMask channels) override
DllExport void AppendAllChannels (IPipelineClient *from) override
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)
Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor.
virtual LifetimeType LifetimeControl ()
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
virtual BaseInterfaceAcquireInterface ()
virtual void ReleaseInterface ()
Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
template<class InterfaceType>
InterfaceType * GetTypedInterface ()

Additional Inherited Members

Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
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.
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.
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.
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 voidoperator 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 voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
static UtilExport voidaligned_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.

Detailed Description

This class is an interface used to store user-specified normals (such as those created in the Edit Normals modifier).

These normals have very limited pipeline support. They are used for viewport display, but not for rendering.

The MeshNormalSpec contains three types of normals:

  • Unspecified - these are the usual normals that are computed from smoothing groups. All normals are unspecified by default.
  • Specified - these are normals that are intended for use by particular corners of particular faces, without regard to smoothing groups. For instance, you can create a box, apply Edit Normals, select a group of normals at a particular vertex, and click "Unify". Now those three faces are told to specifically use that one unified normal, and they ignore their smoothing groups at that vertex (which would normally tell them they should each have their own normal).
  • Explicit - these are normals that are set to particular values. For instance, if the user wants to use the Edit Normals Move or Rotate commands to set a normal to something other than its default value, it has to be made explicit, so it won't be recomputed based on the face normals. All explicit normals are also considered to be specified..

Constructor & Destructor Documentation

◆ MeshNormalSpec()

MeshNormalSpec ( )
inline
183 : mpFace(NULL)
184 , mpNormal(NULL)
185 , mNumNormalAlloc(0)
186 , mNumFaceAlloc(0)
187 , mNumNormals(0)
188 , mNumFaces(0)
189 , mpParent(NULL)
190 , mFlags(0)
191 , mDisplayLength(MESH_NORMAL_LENGTH_DEFAULT)
192 {
193 }
#define MESH_NORMAL_LENGTH_DEFAULT
Definition MeshNormalSpec.h:138
#define NULL
Definition autoptr.h:18

◆ ~MeshNormalSpec()

~MeshNormalSpec ( )
inline
195 {
196 ClearAndFree();
197 }
DllExport void ClearAndFree()
Deletes everything, frees all memory.

Member Function Documentation

◆ SetFlag()

void SetFlag ( DWORD fl,
bool val = true )
inline

Sets flags in the MeshNormalSpec.

Generally, the only flag that clients should set is the MESH_NORMAL_MODIFIER_SUPPORT flag. See GetFlag for more details.

202 {
203 if (val)
204 mFlags |= fl;
205 else
206 mFlags &= ~fl;
207 }

◆ ClearFlag()

void ClearFlag ( DWORD fl)
inline

Clears the flags given. See GetFlag for more details on MeshNormalSpec flags.

211 {
212 mFlags &= ~fl;
213 }

◆ GetFlag()

bool GetFlag ( DWORD fl) const
inline

Gets flags in the MeshNormalSpec.

Remarks
MeshNormalSpec supports the following flags: MESH_NORMAL_NORMALS_BUILT Indicates that non-specified normals have been constructed using smoothing groups. If not set, non-specified normals may be invalid. MESH_NORMAL_NORMALS_COMPUTED Indicates that non-explicit normals have been computed using geometrically computed face normals. (If not set, only explicit normals may be assumed to be pointing the right direction.) MESH_NORMAL_MODIFIER_SUPPORT This flag should be set by modifiers that want to support the edited normals. See class TriObjectNormalModifier for more details. If this flag is not specifically set in a modifier that alters PART_GEOM or PART_TOPO of a TriObject, any specified normals will be cleared after the modifier is evaluated.
231 {
232 return (mFlags & fl) ? true : false;
233 }

◆ Initialize()

DllExport void Initialize ( )

Initializes all data members - do not use if already allocated!

◆ NAlloc()

DllExport bool NAlloc ( int num,
bool keep = TRUE )

◆ NShrink()

DllExport void NShrink ( )

shrinks allocation down to actual number of normals.

◆ FAlloc()

DllExport bool FAlloc ( int num,
bool keep = TRUE )

◆ FShrink()

DllExport void FShrink ( )

◆ Clear()

DllExport void Clear ( )

Deletes everything.

◆ ClearAndFree()

DllExport void ClearAndFree ( )

Deletes everything, frees all memory.

◆ GetNumFaces()

int GetNumFaces ( ) const
inline
252 {
253 return mNumFaces;
254 }

◆ SetNumFaces()

DllExport bool SetNumFaces ( int numFaces)

◆ GetNumNormals()

int GetNumNormals ( ) const
inline
258 {
259 return mNumNormals;
260 }

◆ SetNumNormals()

DllExport bool SetNumNormals ( int numNormals)

◆ Normal() [1/2]

const Point3 & Normal ( int normID) const
inline
264 {
265 return mpNormal[normID];
266 }

◆ Normal() [2/2]

Point3 & Normal ( int normID)
inline
268 {
269 return mpNormal[normID];
270 }

◆ GetNormalArray() [1/2]

const Point3 * GetNormalArray ( ) const
inline
273 {
274 return mpNormal;
275 }

◆ GetNormalArray() [2/2]

Point3 * GetNormalArray ( )
inline
277 {
278 return mpNormal;
279 }

◆ GetNormalExplicit()

bool GetNormalExplicit ( int normID) const
inline
282 {
283 return mNormalExplicit[normID] ? true : false;
284 }

◆ SetNormalExplicit()

void SetNormalExplicit ( int normID,
bool value )
inline
286 {
287 mNormalExplicit.Set(normID, value);
288 }

◆ AnyExplicitNormalsSet()

bool AnyExplicitNormalsSet ( ) const
inline

Returns true if there are any explicit normals set.

291{ return mNormalExplicit.AnyBitSet(); }

◆ SetAllExplicit()

void SetAllExplicit ( bool value = true)
inline

Set all normals to be explicit.

Parameters
value- If true, all normals will be set to explicit. If false, all normals will be set to non-explicit
296 {
297 if (value)
298 mNormalExplicit.SetAll();
299 else
300 mNormalExplicit.ClearAll();
301 }

◆ Face() [1/2]

const MeshNormalFace & Face ( int faceID) const
inline
304 {
305 return mpFace[faceID];
306 }

◆ Face() [2/2]

MeshNormalFace & Face ( int faceID)
inline
308 {
309 return mpFace[faceID];
310 }

◆ GetFaceArray() [1/2]

const MeshNormalFace * GetFaceArray ( ) const
inline
313 {
314 return mpFace;
315 }

◆ GetFaceArray() [2/2]

MeshNormalFace * GetFaceArray ( )
inline
317 {
318 return mpFace;
319 }

◆ SetParent()

void SetParent ( Mesh * pMesh)
inline
322 {
323 mpParent = pMesh;
324 }

◆ GetNormal() [1/2]

DllExport const Point3 & GetNormal ( int face,
int corner ) const

◆ GetNormal() [2/2]

DllExport Point3 & GetNormal ( int face,
int corner )

◆ SetNormal()

DllExport void SetNormal ( int face,
int corner,
Point3 & normal )

◆ GetNormalIndex()

DllExport int GetNormalIndex ( int face,
int corner ) const

◆ SetNormalIndex()

DllExport void SetNormalIndex ( int face,
int corner,
int normalIndex )

◆ NewNormal()

DllExport int NewNormal ( Point3 normal,
bool explic = true )

◆ SetSelection()

DllExport void SetSelection ( BitArray & newSelection)

◆ GetSelection() [1/2]

const BitArray & GetSelection ( ) const
inline
338 {
339 return mNormalSel;
340 }

◆ GetSelection() [2/2]

BitArray & GetSelection ( )
inline
342 {
343 return mNormalSel;
344 }

◆ SetDisplayLength()

void SetDisplayLength ( float displayLength)
inline
347 {
348 mDisplayLength = displayLength;
349 }

◆ GetDisplayLength()

float GetDisplayLength ( ) const
inline
351 {
352 return mDisplayLength;
353 }

◆ Display()

DllExport void Display ( GraphicsWindow * gw,
bool showSel )

◆ HitTest()

DllExport bool HitTest ( GraphicsWindow * gw,
HitRegion * hr,
DWORD flags,
SubObjHitList & hitList )

◆ GetBoundingBox()

DllExport Box3 GetBoundingBox ( const Matrix3 * tm = NULL,
bool selectedOnly = false ) const

◆ ClearNormals()

DllExport void ClearNormals ( )

This method dumps all unspecified normals. Best to use only from within CheckNormals.

◆ BuildNormals()

DllExport void BuildNormals ( )

Fills in the mpSpecNormal data by building all the unspecified normals, and computing non-explicit ones.

Remarks
Does nothing if normal faces not allocated yet!

Requires an accurate mpParent pointer.

◆ ComputeNormals()

DllExport void ComputeNormals ( )

This method just recomputes the directions of non-explicit normals, without rebuilding the normal list.

Remarks
Requires an accurate mpParent pointer.

◆ CheckNormals()

DllExport void CheckNormals ( )

This checks our flags and calls BuildNormals, ComputeNormals as needed.

Remarks
Requires an accurate mpParent pointer.

◆ operator=()

DllExport MeshNormalSpec & operator= ( const MeshNormalSpec & from)

◆ CopySpecified() [1/2]

DllExport void CopySpecified ( const MeshNormalSpec & from)

◆ CopySpecified() [2/2]

DllExport bool CopySpecified ( const MeshNormalSpec & sourceNormals,
const Tab< int > & faceIndexMap,
int offset = 0 )

For each face index map entry faceIndexMap[f] which is valid, i.e.

faceIndexMap[f] >= 0, the face targetFace = faceIndexMap[f] + offset 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 targetFace is allocated if necessary, 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 for any f we have the conditions 0 <= faceIndexMap[f], targetFace < faceIndexMap.Count(), and faceIndexMap[targetFace] >= 0.

Parameters
[in]sourceNormalsspecified normals object containing the source face data
[in]faceIndexMapmap from source to target faces; the condition faceIndexMap[f] < 0 indicates that source face f is not to be copied
[in]offsetindex offset to be applied to all valid entries of faceIndexMap in order to obtain the target face index; note that nnegative values are invalid, and will result in failure and a false return value
Returns
Flag indicating whether copy operation was successful.

◆ operator+=()

DllExport MeshNormalSpec & operator+= ( const MeshNormalSpec & from)

◆ MyDebugPrint()

DllExport void MyDebugPrint ( bool printAll = false)

◆ CheckAllData()

DllExport bool CheckAllData ( int numParentFaces)

◆ Save() [1/2]

DllExport IOResult Save ( ISave * isave)

◆ Save() [2/2]

DllExport IOResult Save ( ISave * isave,
ChannelMask channels )

◆ Load() [1/2]

DllExport IOResult Load ( ILoad * iload)

◆ Load() [2/2]

DllExport IOResult Load ( ILoad * iload,
ChannelMask channels )

◆ GetID()

Interface_ID GetID ( )
inlineoverridevirtual
Remarks
This method returns the unique interface ID.

Reimplemented from IPipelineClient.

418 {
420 }
#define MESH_NORMAL_SPEC_INTERFACE
Definition MeshNormalSpec.h:33

◆ DeleteInterface()

DllExport void DeleteInterface ( )
overridevirtual
Remarks
This method can be used as a direct interface delete request.
Default Implementation:
{ }

Reimplemented from BaseInterface.

◆ GetInterface()

DllExport BaseInterface * GetInterface ( Interface_ID id)
overridevirtual
Remarks
Returns a pointer to the interface whose ID is specified.
Parameters:
Interface_ID id

The ID of the interface to return.
Default Implementation:
{ return NULL; }

Reimplemented from BaseInterface.

◆ CloneInterface()

DllExport BaseInterface * CloneInterface ( void * remapDir = NULL)
overridevirtual
Remarks
This method allows you to clone the base interface.
Parameters:
void* remapDir

The RemapDir passed to the clone method.
Default Implementation:
{ return NULL; }

Reimplemented from BaseInterface.

◆ ShallowCopy()

DllExport void ShallowCopy ( IPipelineClient * from,
ChannelMask channels )
overridevirtual

Implements IPipelineClient.

◆ DeepCopy()

DllExport void DeepCopy ( IPipelineClient * from,
ChannelMask channels )
overridevirtual

Implements IPipelineClient.

◆ NewAndCopyChannels()

DllExport void NewAndCopyChannels ( ChannelMask channels)
overridevirtual

Implements IPipelineClient.

◆ FreeChannels()

DllExport void FreeChannels ( ChannelMask channels,
int zeroOthers = 1 )
overridevirtual

Implements IPipelineClient.

◆ ZeroChannels()

DllExport void ZeroChannels ( ChannelMask channels)
overridevirtual

Implements IPipelineClient.

◆ AppendAllChannels()

DllExport void AppendAllChannels ( IPipelineClient * from)
overridevirtual

Implements IPipelineClient.

◆ Transform()

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.

Parameters
[in]transformMatmatrix representing the transformation to be applied
[in]useSelelectionwhen true, only selected normals are altered, otherwise, the transformation is applied to all defined normals
[in]normalSelectionwhen useSelection is true, the selected normals are defined by normalSelection if not null, or the usual member selection, otherwise
[in]isGeomTransformwhen true, matrix transformMat is interpreted as a transformation applied to the associated geometry, as discussed above
Returns
Flag indicating whether any normals were altered. In particular, if the specified values of transformMat and isGeomTransform indicate an identity transformation, we will return false.

◆ Translate()

DllExport bool Translate ( Point3 & translate,
BOOL useSel = true,
BitArray * normalSelection = NULL )

◆ BreakNormals()

DllExport bool BreakNormals ( BOOL useSel = true,
BitArray * normalSelection = NULL,
BOOL toAverage = false )

◆ UnifyNormals()

DllExport bool UnifyNormals ( BOOL useSel = true,
BitArray * normalSelection = NULL,
BOOL toAverage = false )

◆ AverageNormals()

DllExport bool AverageNormals ( BOOL useThresh = false,
float threshold = 0.0f,
BOOL useSel = true,
BitArray * normalSelection = NULL )

◆ SpecifyNormals()

DllExport bool SpecifyNormals ( BOOL useSel = true,
BitArray * normalSelection = NULL )

◆ MakeNormalsExplicit()

DllExport bool MakeNormalsExplicit ( BOOL useSel = true,
BitArray * normalSelection = NULL,
bool value = true )

◆ ResetNormals()

DllExport bool ResetNormals ( BOOL useSel = true,
BitArray * normalSelection = NULL )