3ds Max C++ API Reference
RNormal Class Reference

#include <mesh.h>

+ Inheritance diagram for RNormal:

Public Member Functions

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

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.

75 { 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.
78 { 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.
81 { normal += nor; }

◆ normalize()

void normalize ( void  )
inline

Converts the normal to a unit vector.

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

85 { return normal; }

◆ getNormal() [2/2]

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

◆ setSmGroup()

void setSmGroup ( DWORD  g)
inline

Sets the smoothing group to the specified value.

Parameters
gThe smoothing group value to set.
89 { 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.
93 { smGroup |= g; }

◆ getSmGroup()

DWORD getSmGroup ( void  )
inline

Returns the smoothing group value.

95 { return smGroup; }

◆ setMtlIndex()

void setMtlIndex ( MtlID  i)
inline

Sets the material index to the specified value.

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

◆ getMtlIndex()

MtlID getMtlIndex ( void  )
inline

Returns the material index.

100 { return mtlIndex; }

◆ setRGB()

void setRGB ( Point3 clr)
inline

Sets the RGB value.

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

◆ getRGB() [1/2]

Point3& getRGB ( void  )
inline

Returns the RGB value.

105 { return rgb; }

◆ getRGB() [2/2]

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