About
A NormalTag stores normal vectors for a (polygon) object. For each polygon a set of four vectors is stored (NormalStruct). The class NormalTag is based on VariableTag so the typical workflows on handling tags apply, see BaseTag and VariableTag Manual.
NormalTag objects are an instance of Tnormal.
Allocation/Deallocation
NormalTag instances are created with the usual tools.
  
  
 
  if (normalTag == nullptr)
  {
 
    if (normalTag == nullptr)
 
  }
  
Edit
The normal vectors stored in a NormalTag are accessed by obtaining data handles that are used with static functions:
  
 
  
  {
    if (phongTag == nullptr)
  }
 
 
 
  for (
Int32 i = 0; i < polygonCount; ++i)
 
  {
 
    
 
 
    
    normal.
x += ((random.
Get01() * 0.2) - 0.1);
 
    normal.
y += ((random.
Get01() * 0.2) - 0.1);
 
    normal.
z += ((random.
Get01() * 0.2) - 0.1);
 
 
    
 
  }
 
  
Further Reading
 
 
 
#define Tnormal
Definition: ge_prepass.h:1259
 
void Normalize()
Normalizes this vector, so that GetLength()==1.0.
Definition: vec.h:431
 
#define Tphong
Phong.
Definition: ge_prepass.h:1227
 
Represents a polygon that can be either a triangle or a quadrangle.
Definition: c4d_baseobject.h:39
 
Definition: c4d_basetag.h:40
 
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:66
 
static void Set(NormalHandle dataptr, Int32 i, const NormalStruct &s)
Definition: c4d_basetag.h:547
 
BaseTag * MakeTag(Int32 type, BaseTag *pred=nullptr)
 
#define MSG_UPDATE
Must be sent if the bounding box has to be recalculated. (Otherwise use MSG_CHANGE....
Definition: c4d_baselist.h:335
 
Vector d
The vertex normal for the fourth point.
Definition: operatingsystem.h:560
 
static NormalTag * Alloc(Int32 count)
 
Represents a Point Normal tag.
Definition: c4d_basetag.h:477
 
Vector b
The vertex normal for the second point.
Definition: operatingsystem.h:560
 
maxon::Int32 Int32
Definition: ge_sys_math.h:45
 
Bool Message(Int32 type, void *data=nullptr)
Definition: c4d_baselist.h:1350
 
Vector a
The vertex normal for the first point.
Definition: operatingsystem.h:560
 
BaseTag * GetTag(Int32 type, Int32 nr=0)
Definition: c4d_baseobject.h:646
 
NormalHandle GetDataAddressW(void)
 
void * NormalHandle
Handle for normal data. See also: NormalTag.
Definition: operatingsystem.h:456
 
Definition: c4d_tools.h:807
 
Definition: operatingsystem.h:529
 
Int32 GetPolygonCount(void)
Definition: c4d_baseobject.h:1692
 
void InsertTag(BaseTag *tp, BaseTag *pred=nullptr)
 
Vector c
The vertex normal for the third point.
Definition: operatingsystem.h:560
 
Vector CalcFaceNormal(const Vector *padr, const CPolygon &v)
Definition: c4d_baseobject.h:2250