HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_Normal.h File Reference
#include "GEO_API.h"
#include <GA/GA_Handle.h>
#include <stddef.h>
+ Include dependency graph for GEO_Normal.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __GEO_Normal__
 
#define GEO_DEFAULT_CUSP_ANGLE   60.0
 
#define GEO_DEFAULT_ADJUSTED_CUSP_ANGLE   60.06
 

Enumerations

enum  GEO_NormalMethod { GEO_NormalMethod::UNIFORM_WEIGHTED, GEO_NormalMethod::ANGLE_WEIGHTED, GEO_NormalMethod::AREA_WEIGHTED }
 

Functions

void GEO_API GEOcomputeNormals (const GEO_Detail &detail, const GA_RWHandleV3 &normalattrib, const GA_Group *group=NULL, const float cuspangledegrees=GEO_DEFAULT_ADJUSTED_CUSP_ANGLE, const GEO_NormalMethod method=GEO_NormalMethod::ANGLE_WEIGHTED)
 
void GEO_API GEOcomputeNormals (const GEO_Detail &detail, const GA_ROHandleV3 &posattrib, const GA_RWHandleV3 &normalattrib, const GA_Group *group=NULL, const float cuspangledegrees=GEO_DEFAULT_ADJUSTED_CUSP_ANGLE, const GEO_NormalMethod method=GEO_NormalMethod::ANGLE_WEIGHTED)
 

Macro Definition Documentation

#define __GEO_Normal__

Definition at line 14 of file GEO_Normal.h.

#define GEO_DEFAULT_ADJUSTED_CUSP_ANGLE   60.06

Magic tolerance factor of 1.001 on GEO_DEFAULT_CUSP_ANGLE so that hexagonal tubes will be smooth by default, even with a bit of roundoff or slight deformation.

Definition at line 28 of file GEO_Normal.h.

#define GEO_DEFAULT_CUSP_ANGLE   60.0

Definition at line 23 of file GEO_Normal.h.

Enumeration Type Documentation

enum GEO_NormalMethod
strong

This determines how contributions from multiple vertices around a point get weighted when computing a normal for that point.

Enumerator
UNIFORM_WEIGHTED 
ANGLE_WEIGHTED 
AREA_WEIGHTED 

Definition at line 32 of file GEO_Normal.h.

Function Documentation

void GEO_API GEOcomputeNormals ( const GEO_Detail detail,
const GA_RWHandleV3 normalattrib,
const GA_Group group = NULL,
const float  cuspangledegrees = GEO_DEFAULT_ADJUSTED_CUSP_ANGLE,
const GEO_NormalMethod  method = GEO_NormalMethod::ANGLE_WEIGHTED 
)

Computes normals into given attribute using detail->getP(). If group is specified, only the associated elements are updated. If normalattrib is a detail attribute and group is given, it is only computed based on the primitives associated with the group. If vertex normals, a cusp angle of 0 or less cusps everything, and a cusp angle of 180 or more cusps nothing.

void GEO_API GEOcomputeNormals ( const GEO_Detail detail,
const GA_ROHandleV3 posattrib,
const GA_RWHandleV3 normalattrib,
const GA_Group group = NULL,
const float  cuspangledegrees = GEO_DEFAULT_ADJUSTED_CUSP_ANGLE,
const GEO_NormalMethod  method = GEO_NormalMethod::ANGLE_WEIGHTED 
)

Computes normals into given attribute using pos_attrib (owned by detail). If group is specified, only the associated elements are updated. If normalattrib is a detail attribute and group is given, it is only computed based on the primitives associated with the group. If vertex normals, a cusp angle of 0 or less cusps everything, and a cusp angle of 180 or more cusps nothing.