BasicGL for Blitz

Blitz3D Forums/Blitz3D Programming/BasicGL for Blitz

"arkon" - how do you flip a mesh? Let's suppose I create a cube, but I want the cube to be a room - how do you view the room when the camera is inside the cube - can the mesh be flipped in some way? I'm seeing if I can resolve the reproducing geometry, with regard to the mirrors, by using a room.

I mean turn a mesh (cube or other) inside out.

I'm just wondering if the following can be inside a room to stop the geometry reproducing:
;###################################################################
;                                                              
;                 		Basic GL For BlitzBasic © 2004               
;  		Creator: Albert Khakimov (arkon)  arkon@...             
;  		Support: Korolyov Sergey (ventru) ventrual@...       					      
;  		Sample: Mirror                                              								      
;	  	Version: 0.1                                              									    						
; 	 	Date: 18.11.04                        
;                      									                        										
;###################################################################
;
; Edited by "puki"
;
;###################################################################

Include "../../Constants.bb"
Include "../../KeyCodes.bb"

Global Camera, CameraPV, Light
Global Mirror, Torus, Plane, Ex  


;3d graphics initialization
gInitGraphics(640, 480, 32, 0, 0)

;S C E N E
;------------------------------------------------------------------------
gAmbientColor 0.2, 0.2, 0.1
gBackColor 0.0, 0.1, 0.2
;Create Camera
CameraPV = gCreateDummy(0)
Camera = gDefaultCamera()
gSetPosition Camera, 0, 1, 3
gSetParent Camera, CameraPV
;Create Light
Light = gCreateLight(0)
gSetPosition Light, -1, 5, 1
;Create Torus
Torus = gCreateTorus(0)
gSetTargetObject Camera, Torus
;Create Plane
Plane = gCreatePlane(5, 5, 0)
gLoadObjectTexture Plane, "..\..\media\back1.jpg"
gPlaneTiles Plane, 5, 5
gSetAbsDir Plane, 0, 1, 0
gSetAbsPos Plane, 0, -2, 0
;Create Mirror
Mirror = gCreateMirror(3, 3, 0)
gSetAbsDir mirror, 0, 0, 1
gSetAbsPos mirror, 0, 0, -2.5
;gObjDiffuse mirror, 0, 0, 1, 0.8
gLoadObjectTexture mirror, "..\..\media\back2.jpg"
;Create Extrusion
Ex = gCreateExtrusion(mirror)
gObjDiffuse Ex, 1, 0.1, 0, 1
gExHeight Ex, 0.1
gExParts Ex, 1, 1, 1, 1
gAddExContour Ex, ""
gExContAddNode Ex, 0, -1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, 1.5, 0
gExContAddNode Ex, 0, -1.5, 1.5, 0
gAddExContour Ex, ""
gExContAddNode Ex, 1, -1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, 1.4, 0
gExContAddNode Ex, 1, -1.4, 1.4, 0 
;Create Another Mirror
Mirror2 = gCreateMirror(3, 3, 0)
gSetAbsDir mirror2, 0, 0, -1
gSetAbsPos mirror2, 0, 0, 2.5
;gObjDiffuse mirror, 0, 0, 1, 0.8
gLoadObjectTexture mirror2, "..\..\media\back2.jpg"
;Create Another Extrusion
Ex = gCreateExtrusion(mirror2)
gObjDiffuse Ex, 1, 0.1, 0, 1
gExHeight Ex, 0.1
gExParts Ex, 1, 1, 1, 1
gAddExContour Ex, ""
gExContAddNode Ex, 0, -1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, 1.5, 0
gExContAddNode Ex, 0, -1.5, 1.5, 0
gAddExContour Ex, ""
gExContAddNode Ex, 1, -1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, 1.4, 0
gExContAddNode Ex, 1, -1.4, 1.4, 0 
;Create Another Mirror
Mirror3 = gCreateMirror(3, 3, 0)
gSetAbsDir mirror3, -1, 0, 0
gSetAbsPos mirror3, 2.5, 0, 0
;gObjDiffuse mirror, 0, 0, 1, 0.8
gLoadObjectTexture mirror3, "..\..\media\back2.jpg"
;Create Another Extrusion
Ex = gCreateExtrusion(mirror3)
gObjDiffuse Ex, 1, 0.1, 0, 1
gExHeight Ex, 0.1
gExParts Ex, 1, 1, 1, 1
gAddExContour Ex, ""
gExContAddNode Ex, 0, -1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, 1.5, 0
gExContAddNode Ex, 0, -1.5, 1.5, 0
gAddExContour Ex, ""
gExContAddNode Ex, 1, -1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, 1.4, 0
gExContAddNode Ex, 1, -1.4, 1.4, 0 
;Create Another Mirror
Mirror4 = gCreateMirror(3, 3, 0)
gSetAbsDir mirror4, 1, 0, 0
gSetAbsPos mirror4, -2.5, 0, 0
;gObjDiffuse mirror, 0, 0, 1, 0.8
gLoadObjectTexture mirror4, "..\..\media\back2.jpg"
;Create Another Extrusion
Ex = gCreateExtrusion(mirror4)
gObjDiffuse Ex, 1, 0.1, 0, 1
gExHeight Ex, 0.1
gExParts Ex, 1, 1, 1, 1
gAddExContour Ex, ""
gExContAddNode Ex, 0, -1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, -1.5, 0
gExContAddNode Ex, 0, 1.5, 1.5, 0
gExContAddNode Ex, 0, -1.5, 1.5, 0
gAddExContour Ex, ""
gExContAddNode Ex, 1, -1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, -1.4, 0
gExContAddNode Ex, 1, 1.4, 1.4, 0
gExContAddNode Ex, 1, -1.4, 1.4, 0 

While gKeyHit(KEY_ESCAPE) = 0 And gProgress() = 1

	newTime# = gGetNewTime() * 40
	deltaTime# = gGetDeltaTime()

    	gRotate Torus, deltaTime * 100, 0, 0
    	gTurn CameraPV, deltaTime * 20

Wend

gCloseGraphics()