Simplygon C++ API  8.3.35800.0
SimplygonSDK::INormalRepairer Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::INormalRepairer:
SimplygonSDK::IProcessingObject SimplygonSDK::IObject

Public Member Functions

virtual unsigned int GetBorderFlagsMask ()=0
 
virtual const char * GetClass ()
 
virtual SGDEPRECATED bool GetDetectPrimitiveNormals ()=0
 
virtual unsigned int GetFlipFacesAndNormals ()=0
 
virtual CountedPointer< IGeometryDataGetGeometry ()=0
 
virtual real GetHardEdgeAngleInRadians ()=0
 
virtual rstring GetProcessSelectionSetName ()=0
 
virtual bool GetRecalculateNormals ()=0
 
virtual bool GetRepairOnlyInvalidNormals ()=0
 
virtual bool GetScaleByAngle ()=0
 
virtual bool GetScaleByArea ()=0
 
virtual CountedPointer< ISceneGetScene ()=0
 
virtual rid GetSelectionSetID ()=0
 
virtual bool GetSnapNormalsToFlatSurfaces ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetAutoCorrectionAllowsDoubleSided (bool value)=0
 
virtual void SetAutoCorrectionRatioThreshold (real value)=0
 
virtual void SetAutoCorrectionSingleSidedThreshold (real value)=0
 
virtual void SetBorderFlagsMask (unsigned int value)=0
 
virtual SGDEPRECATED void SetDetectPrimitiveNormals (bool detectPrimitiveNormals)=0
 
virtual void SetFlipFacesAndNormals (unsigned int value)=0
 
virtual void SetGeometry (IGeometryData *value)=0
 
virtual void SetHardEdgeAngleInRadians (real value)=0
 
virtual void SetProcessSelectionSetName (const char *value)=0
 
virtual void SetRecalculateNormals (bool value)=0
 
virtual void SetRepairOnlyInvalidNormals (bool value)=0
 
virtual void SetScaleByAngle (bool value)=0
 
virtual void SetScaleByArea (bool value)=0
 
virtual void SetScene (IScene *value)=0
 
virtual void SetSelectionSetID (rid value)=0
 
virtual void SetSnapNormalsToFlatSurfaces (bool value)=0
 
- Public Member Functions inherited from SimplygonSDK::IProcessingObject
virtual void Clear ()=0
 
virtual real GetPercentDone ()=0
 
virtual void RunProcessing ()=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static INormalRepairerSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IProcessingObject
static bool IsClassA (const char *type)
 
static IProcessingObjectSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

Repairs normals on a processed geometry.

Definition at line 10113 of file SimplygonSDK.h.

Member Function Documentation

◆ 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
Deprecated:
Method is marked as deprecated and will be removed in future version. Use GetSnapNormalsToFlatSurfaces() instead. Use GetSnapNormalsToFlatSurfaces instead.

◆ 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()

virtual CountedPointer<IGeometryData> SimplygonSDK::INormalRepairer::GetGeometry ( )
pure virtual

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()

virtual CountedPointer<IScene> SimplygonSDK::INormalRepairer::GetScene ( )
pure virtual

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
typeis 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
typeis 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()

static INormalRepairer* SimplygonSDK::INormalRepairer::SafeCast ( IObject ptr)
inlinestatic

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
ptris the pointer to be cast into a INormalRepairer pointer
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
valuethe desired value of the flag

◆ SetAutoCorrectionRatioThreshold()

virtual void SimplygonSDK::INormalRepairer::SetAutoCorrectionRatioThreshold ( real  value)
pure virtual

Set the threshold ratio for auto correction

Parameters
valuethe 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
valuethe 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
valueis 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
detectPrimitiveNormalsthe 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
    valuethe desired flag value

◆ SetGeometry()

virtual void SimplygonSDK::INormalRepairer::SetGeometry ( IGeometryData value)
pure virtual

Set the Geometry object.

Parameters
valueis 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
valueis 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
valuethe desired SelectionSet name

◆ SetRecalculateNormals()

virtual void SimplygonSDK::INormalRepairer::SetRecalculateNormals ( bool  value)
pure virtual

Set whether to recalculate new normals.

Parameters
valuethe 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
valueis 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
valueis 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
valueis 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
valuethe 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
valuethe 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
valueto use for SnapNormalsToFlatSurfaces

The documentation for this class was generated from the following file: