#include <SimplygonSDK.h>
Repairs normals on a processed geometry.
Definition at line 10113 of file SimplygonSDK.h.
◆ GetBorderFlagsMask()
virtual unsigned int SimplygonSDK::INormalRepairer::GetBorderFlagsMask |
( |
| ) |
|
|
pure virtual |
Get the use borders flag mask. Edges with a matching BorderFlag will be "hard". If for example SGBORDER_TEXCOORD0 is being used, all edges with an UV border will be hard shaded.
- Returns
- the current value of the BorderFlagsMask
◆ GetClass()
virtual const char* SimplygonSDK::INormalRepairer::GetClass |
( |
| ) |
|
|
virtual |
GetClass returns the name of the class of the object.
- Returns
- the name of the actual class of the object, as a const char string
Reimplemented from SimplygonSDK::IProcessingObject.
◆ GetDetectPrimitiveNormals()
virtual SGDEPRECATED bool SimplygonSDK::INormalRepairer::GetDetectPrimitiveNormals |
( |
| ) |
|
|
pure virtual |
◆ GetFlipFacesAndNormals()
virtual unsigned int SimplygonSDK::INormalRepairer::GetFlipFacesAndNormals |
( |
| ) |
|
|
pure virtual |
Get setting for whether and how to flip the faces and or normals in the scene. SG_FLIPFACESANDNORMALS_NONE - Don't flip SG_FLIPFACESANDNORMALS_AUTOMATIC - Automatically detect and fix backfaces per part SG_FLIPFACESANDNORMALS_MAKEDOUBLESIDED
- Append inverted winded triangles with inverted normals to the geometry SG_FLIPFACESANDNORMALS_INVERTFACES
- Invert the winding of the triangles SG_FLIPFACESANDNORMALS_INVERTNORMALS
- Invert the vertex normals SG_FLIPFACESANDNORMALS_INVERTFACESANDNORMALS - Invert winding of all triangles and vertex normals
◆ GetGeometry()
Get the Geometry object.
- Returns
- the current geometry object
◆ GetHardEdgeAngleInRadians()
virtual real SimplygonSDK::INormalRepairer::GetHardEdgeAngleInRadians |
( |
| ) |
|
|
pure virtual |
Get the edge angle above which an edge is considered "hard". Note! The angle is in radians.
- Returns
- the current value of HardEdgeAngleInRadians
◆ GetProcessSelectionSetName()
virtual rstring SimplygonSDK::INormalRepairer::GetProcessSelectionSetName |
( |
| ) |
|
|
pure virtual |
Selects which SelectionSet should be processed. If set to NULL, all geometries in the scene will be processed. If both ID and Name are set, ID will be used.
- Returns
- the current SelectionSet name
◆ GetRecalculateNormals()
virtual bool SimplygonSDK::INormalRepairer::GetRecalculateNormals |
( |
| ) |
|
|
pure virtual |
Get whether to recalculate new normals.
- Returns
- the current value of RecalculateNormals
◆ GetRepairOnlyInvalidNormals()
virtual bool SimplygonSDK::INormalRepairer::GetRepairOnlyInvalidNormals |
( |
| ) |
|
|
pure virtual |
Get the RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.
- Returns
- the current value of the RepairOnlyInvalidNormals bool
◆ GetScaleByAngle()
virtual bool SimplygonSDK::INormalRepairer::GetScaleByAngle |
( |
| ) |
|
|
pure virtual |
Get the ScaleByAngle flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex.
- Returns
- the current value of the ScaleByAngle bool
◆ GetScaleByArea()
virtual bool SimplygonSDK::INormalRepairer::GetScaleByArea |
( |
| ) |
|
|
pure virtual |
Get the ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
- Returns
- the current value of the ScaleByArea bool
◆ GetScene()
Get the scene
- Returns
- the input scene
◆ GetSelectionSetID()
virtual rid SimplygonSDK::INormalRepairer::GetSelectionSetID |
( |
| ) |
|
|
pure virtual |
Set the ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected
- Returns
- the ID of the SelectionSet
◆ GetSnapNormalsToFlatSurfaces()
virtual bool SimplygonSDK::INormalRepairer::GetSnapNormalsToFlatSurfaces |
( |
| ) |
|
|
pure virtual |
Get the SnapNormalsToFlatSurfaces flag. If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface.
- Returns
- the current value of the SnapNormalsToFlatSurfaces
◆ IsA()
virtual bool SimplygonSDK::INormalRepairer::IsA |
( |
const char * |
type | ) |
const |
|
virtual |
The IsA function returns true if the object is a or is a descendant of the class named as the type parameter
- Parameters
-
type | is the name of the class to check if the object is, or is a descendant of |
- Returns
- true if the object is of the specified class, false if not
Reimplemented from SimplygonSDK::IProcessingObject.
◆ IsClassA()
static bool SimplygonSDK::INormalRepairer::IsClassA |
( |
const char * |
type | ) |
|
|
inlinestatic |
The IsClassA function returns true if INormalRepairer is a or is a descendant of the class named as the type parameter
- Parameters
-
type | is the name of the class to check if the class is, or is a descendant of |
- Returns
- true if the class is of the specified class, false if not
Definition at line 10134 of file SimplygonSDK.h.
◆ SafeCast()
SafeCast makes sure the pointer is of a class that can be cast into a INormalRepairer pointer, and if this is possible, returns the cast pointer.
- Parameters
-
- Returns
- a pointer to the INormalRepairer object, if the cast can be made, and a NULL pointer otherwise
Definition at line 10147 of file SimplygonSDK.h.
◆ SetAutoCorrectionAllowsDoubleSided()
virtual void SimplygonSDK::INormalRepairer::SetAutoCorrectionAllowsDoubleSided |
( |
bool |
value | ) |
|
|
pure virtual |
Set true to allow for double sided triangles
- Parameters
-
value | the desired value of the flag |
◆ SetAutoCorrectionRatioThreshold()
virtual void SimplygonSDK::INormalRepairer::SetAutoCorrectionRatioThreshold |
( |
real |
value | ) |
|
|
pure virtual |
Set the threshold ratio for auto correction
- Parameters
-
value | the desired threshold ratio |
◆ SetAutoCorrectionSingleSidedThreshold()
virtual void SimplygonSDK::INormalRepairer::SetAutoCorrectionSingleSidedThreshold |
( |
real |
value | ) |
|
|
pure virtual |
Set the threshold ratio for auto correction to treat triangle as single sided
- Parameters
-
value | the desired threshold |
◆ SetBorderFlagsMask()
virtual void SimplygonSDK::INormalRepairer::SetBorderFlagsMask |
( |
unsigned int |
value | ) |
|
|
pure virtual |
Set the use borders flag mask. Edges with a matching BorderFlag will be "hard". If for example SGBORDER_TEXCOORD0 is being used, all edges with an UV border will be hard shaded.
- Parameters
-
value | is the value to which the BorderFlagsMask is to be set |
◆ SetDetectPrimitiveNormals()
virtual SGDEPRECATED void SimplygonSDK::INormalRepairer::SetDetectPrimitiveNormals |
( |
bool |
detectPrimitiveNormals | ) |
|
|
pure virtual |
- Deprecated:
- Method is marked as deprecated and will be removed in future version. Use SetSnapNormalsToFlatSurfaces() instead. Use SetSnapNormalsToFlatSurfaces instead.
- Parameters
-
detectPrimitiveNormals | the desired flag value |
◆ SetFlipFacesAndNormals()
virtual void SimplygonSDK::INormalRepairer::SetFlipFacesAndNormals |
( |
unsigned int |
value | ) |
|
|
pure virtual |
Get setting for whether and how to flip the faces and or normals in the scene. SG_FLIPFACESANDNORMALS_NONE - Don't flip SG_FLIPFACESANDNORMALS_AUTOMATIC - Automatically detect and fix backfaces per part SG_FLIPFACESANDNORMALS_MAKEDOUBLESIDED
- Append inverted winded triangles with inverted normals to the geometry SG_FLIPFACESANDNORMALS_INVERTFACES
- Invert the winding of the triangles SG_FLIPFACESANDNORMALS_INVERTNORMALS
- Invert the vertex normals SG_FLIPFACESANDNORMALS_INVERTFACESANDNORMALS - Invert winding of all triangles and vertex normals
- Parameters
-
value | the desired flag value |
◆ SetGeometry()
virtual void SimplygonSDK::INormalRepairer::SetGeometry |
( |
IGeometryData * |
value | ) |
|
|
pure virtual |
Set the Geometry object.
- Parameters
-
value | is the geometry that is to be repaired |
◆ SetHardEdgeAngleInRadians()
virtual void SimplygonSDK::INormalRepairer::SetHardEdgeAngleInRadians |
( |
real |
value | ) |
|
|
pure virtual |
Set the edge angle above which an edge is considered "hard". Note! The angle is in radians.
- Parameters
-
value | is the value to which HardEdgeAngleInRadians is to be set |
◆ SetProcessSelectionSetName()
virtual void SimplygonSDK::INormalRepairer::SetProcessSelectionSetName |
( |
const char * |
value | ) |
|
|
pure virtual |
Selects which SelectionSet should be processed. If SetName is not found, all geometries in the scene will be processed. If both ID and Name are set, ID will be used.
- Parameters
-
value | the desired SelectionSet name |
◆ SetRecalculateNormals()
virtual void SimplygonSDK::INormalRepairer::SetRecalculateNormals |
( |
bool |
value | ) |
|
|
pure virtual |
Set whether to recalculate new normals.
- Parameters
-
value | the new value of RecalculateNormals |
◆ SetRepairOnlyInvalidNormals()
virtual void SimplygonSDK::INormalRepairer::SetRepairOnlyInvalidNormals |
( |
bool |
value | ) |
|
|
pure virtual |
Set the RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.
- Parameters
-
value | is the value to which the RepairOnlyInvalidNormals bool is to be set |
◆ SetScaleByAngle()
virtual void SimplygonSDK::INormalRepairer::SetScaleByAngle |
( |
bool |
value | ) |
|
|
pure virtual |
Set the ScaleByAngle flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex.
- Parameters
-
value | is the value to which the ScaleByAngle bool is to be set |
◆ SetScaleByArea()
virtual void SimplygonSDK::INormalRepairer::SetScaleByArea |
( |
bool |
value | ) |
|
|
pure virtual |
Set the ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
- Parameters
-
value | is the value to which the ScaleByArea bool is to be set |
◆ SetScene()
virtual void SimplygonSDK::INormalRepairer::SetScene |
( |
IScene * |
value | ) |
|
|
pure virtual |
Set the scene
- Parameters
-
value | the scene object to use |
◆ SetSelectionSetID()
virtual void SimplygonSDK::INormalRepairer::SetSelectionSetID |
( |
rid |
value | ) |
|
|
pure virtual |
Set the ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected
- Parameters
-
value | the selection set id to use |
◆ SetSnapNormalsToFlatSurfaces()
virtual void SimplygonSDK::INormalRepairer::SetSnapNormalsToFlatSurfaces |
( |
bool |
value | ) |
|
|
pure virtual |
Set the SnapNormalsToFlatSurfaces flag. If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface.
- Parameters
-
value | to use for SnapNormalsToFlatSurfaces |
The documentation for this class was generated from the following file: