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

#include <mesh.h>

+ Inheritance diagram for RNormal:

Public Member Functions

 RNormal ()
 Constructor.
 
void setNormal (const Point3 &nor)
 Sets the normal to the specified value.
 
void addNormal (const Point3 &nor)
 Adds the specified value to the value of the normal.
 
void normalize (void)
 Converts the normal to a unit vector.
 
Point3getNormal (void)
 Returns the normal.
 
const Point3getNormal () const
 
void setSmGroup (DWORD g)
 Sets the smoothing group to the specified value.
 
void addSmGroup (DWORD g)
 ORs the specified smoothing group value to the existing value.
 
DWORD getSmGroup (void)
 Returns the smoothing group value.
 
void setMtlIndex (MtlID i)
 Sets the material index to the specified value.
 
MtlID getMtlIndex (void)
 Returns the material index.
 
void setRGB (Point3 &clr)
 Sets the RGB value.
 
Point3getRGB (void)
 Returns the RGB value.
 
const Point3getRGB () const
 

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.
 
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

The 'rendered' normal class. RNormals are stored as unit vectors in object space. An instance of this class is maintained by the RVertex class since the RVertex is what gets rendered (lit), and the lighting methods need to know about the normals. All methods of this class are implemented by the system. Note:This class is used internally by 3ds Max. Developers who need to compute face and vertex normals for a mesh should instead refer to the Advanced Topics section "Computing Face and Vertex Normals".

See also
Class Mesh, Class RVertex, Class GraphicsWindow.

Constructor & Destructor Documentation

◆ RNormal()

RNormal ( )
inline

Constructor.

The smoothing group and material index are set to zero.

77{ smGroup = mtlIndex = 0; }

Member Function Documentation

◆ setNormal()

void setNormal ( const Point3 nor)
inline

Sets the normal to the specified value.

Parameters
norThe normal value to set.
80{ normal = nor; }

◆ addNormal()

void addNormal ( const Point3 nor)
inline

Adds the specified value to the value of the normal.

Parameters
norThe normal value to add to the existing value.
83{ normal += nor; }

◆ normalize()

void normalize ( void  )
inline

Converts the normal to a unit vector.

85{ normal = Normalize(normal); }
DPoint2 Normalize(const DPoint2 &p)
Returns a unit vector.
Definition: dpoint2.h:302

◆ getNormal() [1/2]

Point3 & getNormal ( void  )
inline

Returns the normal.

87{ return normal; }

◆ getNormal() [2/2]

const Point3 & getNormal ( ) const
inline
88{ return normal; }

◆ setSmGroup()

void setSmGroup ( DWORD  g)
inline

Sets the smoothing group to the specified value.

Parameters
gThe smoothing group value to set.
91{ smGroup = g; }

◆ addSmGroup()

void addSmGroup ( DWORD  g)
inline

ORs the specified smoothing group value to the existing value.

Parameters
gThe smoothing group bits to set.
95{ smGroup |= g; }

◆ getSmGroup()

DWORD getSmGroup ( void  )
inline

Returns the smoothing group value.

97{ return smGroup; }

◆ setMtlIndex()

void setMtlIndex ( MtlID  i)
inline

Sets the material index to the specified value.

Parameters
iThe material index value to set.
100{ mtlIndex = i; }

◆ getMtlIndex()

MtlID getMtlIndex ( void  )
inline

Returns the material index.

102{ return mtlIndex; }

◆ setRGB()

void setRGB ( Point3 clr)
inline

Sets the RGB value.

Parameters
clrThe RGB color to set.
105{ rgb = clr; };

◆ getRGB() [1/2]

Point3 & getRGB ( void  )
inline

Returns the RGB value.

107{ return rgb; }

◆ getRGB() [2/2]

const Point3 & getRGB ( ) const
inline
108{ return rgb; }