FlipNormals

This function reverses the triangle order and inverts the normals of the entire surface, effectively "lipping" the surface inside out.

Syntax

Returns

Returns the number of vertices in the surface.

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
local camera = Camera:Create()
camera:SetRotation(35,0,0)
camera:Move(0,0,-3)
local light = DirectionalLight:Create()
light:SetRotation(35,35,0)

local model = Model:Box()
model:SetColor(1.0,0.0,0.0)
local surface = model:GetSurface(0)
surface:FlipNormals()

while true do

if window:Closed() or window:KeyHit(Key.Escape) then return false end

Time:Update()
world:Update()
world:Render()
context:Sync()

end