Navigation: Scripting Reference Manual > Functions & Subroutines > FacetedSurfSetUseVertexNormals

 

FacetedSurfSetUseVertexNormals

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine sets the flag for a Faceted Surface that specifies whether the surface should use vertex normal data.

 

 

Syntax

FacetedSurfSetUseVertexNormals( fsNode, useNormals )

 

 

Parameters

fsNode As Long

Node number of the faceted surface being modified.

 

useNormals As Boolean

Flag specifying whether the surface should use vertex normal data.

 

 

Example

The following example queries a faceted surface for vertex normal data and then sets the flag for their use as appropriate.

 

Sub Main

    Dim fsNode As Long

    Dim hasNormals As Boolean

    fsNode     = FindFullName( "Geometry.Elem 1.Faceted Surface Test" )

    hasNormals = FacetedSurfGetHasVertexNormals( fsNode )

    If hasNormals Then

FacetedSurfSetUseVertexNormals( fsNode, True )

Else

          FacetedSurfSetUseVertexNormals( fsNode, False )

End If

 

End Sub

 

 

See Also

FacetedSurfCreateFromFile

FacetedSurfExportToObjFile

FacetedSurfGetUseVertexNormals

FacetedSurfGetHasVertexNormals

FacetedSurfSetFromFile

FacetedSurfaceGetFacetCount

 

 

 

 

 

 

Copyright © Photon Engineering, LLC