Jump to content

OpenGl Plugin - Update 2007/08/31


A. Percy
 Share

Recommended Posts

  • Replies 166
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

One more thing, Can you tell me what Vars are what in the functions such as:

SetCamera( 0, 80, 300, 0, 0, 0 )

RotateObject( "Cube2", 10, -20, 0 )

TranslateObject( "Cube2", -40, 40, -10 )

and is there a way to create an opengl object in autoit like objcreate()

Thanks

Ok! ;)

SetCamera( X_position, Y_position, Z_position, X_target, Y_target, Z_target )

RotateObject( "Cube2", X_rotate_angle, Y_rotate_angle, Z_rotate_angle )

TranslateObject( "Cube2", X_translate, Y_translate, Z_translate )

about objcreate():

I didn't export the functions of opengl, I only created some specific functions for autoit.

É isso aí! :lmao:

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Thank you,

but what are the Params for:

AddTriangle( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $V3[0], $V3[1], $V3[2], $Normal[0], $Normal[1], $Normal[2], $Red, $Green, $Blue, $Alpha )

is it:

AddTriangle( "Tri", $x1, $y1, $z1, $x2, $y2, $z2, $x3, $y3, $z3 $Normal[0]???, $Normal[1]???, $Normal[2]???, $Red, $Green, $Blue, $Alpha??? )

what is Normal and alpha.

Check out ConsultingJoe.com
Link to comment
Share on other sites

Thank you,

but what are the Params for:

AddTriangle( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $V3[0], $V3[1], $V3[2], $Normal[0], $Normal[1], $Normal[2], $Red, $Green, $Blue, $Alpha )

is it:

AddTriangle( "Tri", $x1, $y1, $z1, $x2, $y2, $z2, $x3, $y3, $z3 $Normal[0]???, $Normal[1]???, $Normal[2]???, $Red, $Green, $Blue, $Alpha??? )

what is Normal and alpha.

"Normal" is usually short for surface normal and "Alpha" is short for alpha channel or alpha blending. These are technical 3D terms.

Surface normal refers to an imaginary line perpendicular to the "surface" (the plane created by the combination of the vertices of that surface) of a polygon which is used to calculate the reflectivity of a light source shining on said surface. There are different ways of calculating how the surfaces of these normals should be shaded and that's what "normal" in this usage refers to.

For more help on surface normals, I suggest further reading:

http://www.tjhsst.edu/~dhyatt/supercomp/n310.html

http://www.opengl.org/resources/faq/technical/lights.htm

http://en.wikipedia.org/wiki/Surface_normals

Alpha blending is a technique used to give a surface a certain level of transparency, by blending it with the background of the scene:

http://en.wikipedia.org/wiki/Alpha_channel

Try adjusting these parameters in the example script to see what affect they'll have on the boxes.

-S

Edited by Locodarwin
(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Link to comment
Share on other sites

I made a rectangle function!

Click and drag the rectangle!

;AutoItSetOption( "TrayIconHide", 1 )
#include <GUIConstants.au3>
#include <misc.au3>
Global Const $TBS_REVERSED = 0x200
$handle = PluginOpen( @ScriptDir & "\Au3GlPlugin.dll" )

;--------------------------------------------------------------------------------------------
Func _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    If UBound( $V1 ) and UBound( $V2 ) and UBound( $V3 ) and UBound( $Normal ) Then
        AddTriangle( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $V3[0], $V3[1], $V3[2], $Normal[0], $Normal[1], $Normal[2], $Red, $Green, $Blue, $Alpha )
    EndIf
EndFunc

;--------------------------------------------------------------------------------------------
Func _CreateRect( $Name, $Red, $Green, $Blue, $Alpha, $width, $height, $depth )
    
    AddObject( $Name )
    
    Local $V1[3] = [ -($width/2),  $height/2, -($depth/2)]
    Local $V2[3] = [  $width/2,  $height/2, -($depth/2)]
    Local $V3[3] = [ -($width/2), -($height/2), -($depth/2)]
    Local $V4[3] = [  $width/2, -($height/2), -($depth/2)]
    Local $V5[3] = [ -($width/2),  $height/2,  $depth/2]
    Local $V6[3] = [  $width/2,  $height/2,  $depth/2]
    Local $V7[3] = [ -($width/2), -($height/2),  $depth/2]
    Local $V8[3] = [  $width/2, -($height/2),  $depth/2]
    
    Local $Normal[3] = [ 0, 0, 1 ]
    _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 1, 0, 0 ]
    _AddTriangleEx( $Name, $V6, $V2, $V8, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V8, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 0,-1 ]
    _AddTriangleEx( $Name, $V6, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V7, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [-1, 0, 0 ]
    _AddTriangleEx( $Name, $V5, $V1, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V5, $V7, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 1, 0 ]
    _AddTriangleEx( $Name, $V1, $V6, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V1, $V2, $V6, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0,-1, 0 ]
    _AddTriangleEx( $Name, $V3, $V8, $V7, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V8, $V4, $Normal, $Red, $Green, $Blue, $Alpha )
EndFunc
;--------------------------------------------------------------------------------------------
$title = "AutoIt OpenGl Experiment"
DefineGlWindow( @DesktopWidth, @DesktopHeight, $title )
SetCamera( 0, 0, 100, 0, 0, 0 )
SetClearColor( 0.5, 0.5, 0.5 )
AddObject( "a" )
AddObject( "b" )
AddObject( "c" )
AddObject( "d" )
_CreateRect( "a", 0.4, 0.4, 1.0, 5.5, 10, 20, 50 )
GlMainLoop( )
WinWait( $title )
WinSetState( $title, "", @SW_MAXIMIZE )
$y = 0
$x = 0
$up_down = 1
$left_right = 1
$X_Axis = 2
$Y_Axis = -6
$Z_Axis = 153
While 1
    $pos = WinGetPos( $title )
    $mouse = MouseGetPos()
    If WinActive( $title ) And $mouse[0] > $pos[0] And $mouse[0] < $pos [2] And $mouse[1] > $pos[1] And $mouse[1] < $pos [3] And _IsPressed("01") Then
        $X_Axis = $mouse[1]
        $Y_Axis = $mouse[0]
        TrayTip("", "X: " & $Y_Axis & @CRLF & "Y: " & $X_Axis, 1, 16 )
    EndIf
    If Not WinExists( $title ) Then ExitLoop
        RotateObject( "a", $X_Axis, $Y_Axis, $Z_Axis )

Wend

PluginClose( $handle )
Check out ConsultingJoe.com
Link to comment
Share on other sites

Examples of more rectangles:

drag to move

;AutoItSetOption( "TrayIconHide", 1 )
#include <GUIConstants.au3>
#include <misc.au3>
Global Const $TBS_REVERSED = 0x200
$handle = PluginOpen( @ScriptDir & "\Au3GlPlugin.dll" )

;--------------------------------------------------------------------------------------------
Func _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    If UBound( $V1 ) and UBound( $V2 ) and UBound( $V3 ) and UBound( $Normal ) Then
        AddTriangle( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $V3[0], $V3[1], $V3[2], $Normal[0], $Normal[1], $Normal[2], $Red, $Green, $Blue, $Alpha )
    EndIf
EndFunc

;--------------------------------------------------------------------------------------------
Func _CreateRect( $Name, $Red, $Green, $Blue, $Alpha, $width, $height, $depth )
    
    AddObject( $Name )
    
    Local $V1[3] = [ -($width/2),  $height/2, -($depth/2)]
    Local $V2[3] = [  $width/2,  $height/2, -($depth/2)]
    Local $V3[3] = [ -($width/2), -($height/2), -($depth/2)]
    Local $V4[3] = [  $width/2, -($height/2), -($depth/2)]
    Local $V5[3] = [ -($width/2),  $height/2,  $depth/2]
    Local $V6[3] = [  $width/2,  $height/2,  $depth/2]
    Local $V7[3] = [ -($width/2), -($height/2),  $depth/2]
    Local $V8[3] = [  $width/2, -($height/2),  $depth/2]
    
    Local $Normal[3] = [ 0, 0, 1 ]
    _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 1, 0, 0 ]
    _AddTriangleEx( $Name, $V6, $V2, $V8, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V8, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 0,-1 ]
    _AddTriangleEx( $Name, $V6, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V7, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [-1, 0, 0 ]
    _AddTriangleEx( $Name, $V5, $V1, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V5, $V7, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 1, 0 ]
    _AddTriangleEx( $Name, $V1, $V6, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V1, $V2, $V6, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0,-1, 0 ]
    _AddTriangleEx( $Name, $V3, $V8, $V7, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V8, $V4, $Normal, $Red, $Green, $Blue, $Alpha )
EndFunc
;--------------------------------------------------------------------------------------------
$title = "AutoIt OpenGl Experiment"
DefineGlWindow( @DesktopWidth, @DesktopHeight, $title )
SetCamera( 0, 0, 300, 0, 0, 0 )
SetClearColor( 0.5, 0.5, 0.5 )
AddObject( "a" )
AddObject( "b" )
AddObject( "c" )
AddObject( "d" )
_CreateRect( "a", 3.4, 0.4, 1.0, 5.5, 10, 200, 50 )
_CreateRect( "b", 0.8, 0.8, 1.3, 1, 100, 10, 10 )
_CreateRect( "c", 1.8, 1, 2.3, 1, 21, 5, 100 )
GlMainLoop( )
WinWait( $title )
WinSetState( $title, "", @SW_MAXIMIZE )
$y = 0
$x = 0
$up_down = 1
$left_right = 1
$X_Axis = 2
$Y_Axis = -6
$Z_Axis = 153
While 1
    $pos = WinGetPos( $title )
    $mouse = MouseGetPos()
    If WinActive( $title ) And $mouse[0] > $pos[0] And $mouse[0] < $pos [2] And $mouse[1] > $pos[1] And $mouse[1] < $pos [3] And _IsPressed("01") Then
        $X_Axis = $mouse[1]
        $Y_Axis = $mouse[0]
        TrayTip("", "X: " & $Y_Axis & @CRLF & "Y: " & $X_Axis, 1, 16 )
    EndIf
    If Not WinExists( $title ) Then ExitLoop
        RotateObject( "a", $X_Axis, $Y_Axis, $Z_Axis )
        RotateObject( "b", $X_Axis, $Y_Axis, $Z_Axis )
        RotateObject( "c", $X_Axis, $Y_Axis, $Z_Axis )

Wend

PluginClose( $handle )
Check out ConsultingJoe.com
Link to comment
Share on other sites

Cool!!!!!!! Very nice! ;)

About the plugin, for now I'm programing some "line" functions and correcting some bugs.

Bye!

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

The source was updated. See more in first post.

Here's a new sample to demonstrate new funcionality:

AutoItSetOption( "TrayIconHide", 1 )

$handle = PluginOpen( @ScriptDir & "\Au3GlPlugin.dll" )

;--------------------------------------------------------------------------------------------
Func _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    If UBound( $V1 ) and UBound( $V2 ) and UBound( $V3 ) and UBound( $Normal ) Then
        AddTriangle( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $V3[0], $V3[1], $V3[2], $Normal[0], $Normal[1], $Normal[2], $Red, $Green, $Blue, $Alpha )
    EndIf
EndFunc

;--------------------------------------------------------------------------------------------
Func _AddLineEx( $Name, $V1, $V2, $Red, $Green, $Blue )
    If UBound( $V1 ) and UBound( $V2 ) Then
        AddLine( $Name, $V1[0], $V1[1], $V1[2], $V2[0], $V2[1], $V2[2], $Red, $Green, $Blue )
    EndIf
EndFunc

;--------------------------------------------------------------------------------------------
Func _CreateCube( $Name, $OrX, $OrY, $OrZ, $DeX, $DeY, $DeZ ,$Red, $Green, $Blue, $Alpha )
    
    AddObject( $Name )
    
    Local $V1[3] = [ $OrX, $OrY, $OrZ ]
    Local $V2[3] = [ $DeX, $OrY, $OrZ ]
    Local $V3[3] = [ $OrX, $DeY, $OrZ ]
    Local $V4[3] = [ $DeX, $DeY, $OrZ ]
    Local $V5[3] = [ $OrX, $OrY, $DeZ ]
    Local $V6[3] = [ $DeX, $OrY, $DeZ ]
    Local $V7[3] = [ $OrX, $DeY, $DeZ ]
    Local $V8[3] = [ $DeX, $DeY, $DeZ ]
    
    Local $Normal[3] = [ 0, 0,-1 ]
    If $OrZ < $DeZ Then
        $Normal[2] = -1
    else
        $Normal[2] = 1
    EndIf
    _AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 1, 0, 0 ]
    If $DeX > $OrX Then
        $Normal[0] = 1
    else
        $Normal[0] = -1
    EndIf
    _AddTriangleEx( $Name, $V6, $V2, $V8, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V8, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 0, 1 ]
    If $OrZ < $DeZ Then
        $Normal[2] = 1
    else
        $Normal[2] = -1
    EndIf
    _AddTriangleEx( $Name, $V6, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V7, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [-1, 0, 0 ]
    If $DeX > $OrX Then
        $Normal[0] = -1
    else
        $Normal[0] = 1
    EndIf
    _AddTriangleEx( $Name, $V5, $V1, $V3, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V5, $V7, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0, 1, 0 ]
    If $OrY > $DeY Then
        $Normal[1] = 1
    else
        $Normal[1] = -1
    EndIf
    _AddTriangleEx( $Name, $V1, $V6, $V5, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V1, $V2, $V6, $Normal, $Red, $Green, $Blue, $Alpha )

    Local $Normal[3] = [ 0,-1, 0 ]
    If $OrY > $DeY Then
        $Normal[1] = -1
    else
        $Normal[1] = 1
    EndIf
    _AddTriangleEx( $Name, $V3, $V8, $V7, $Normal, $Red, $Green, $Blue, $Alpha )
    _AddTriangleEx( $Name, $V3, $V8, $V4, $Normal, $Red, $Green, $Blue, $Alpha )
EndFunc

;--------------------------------------------------------------------------------------------
Func _CreateWireCube( $Name, $OrX, $OrY, $OrZ, $DeX, $DeY, $DeZ ,$Red, $Green, $Blue )
    
    AddObject( $Name )
    
    Local $V1[3] = [ $OrX, $OrY, $OrZ ]
    Local $V2[3] = [ $DeX, $OrY, $OrZ ]
    Local $V3[3] = [ $OrX, $DeY, $OrZ ]
    Local $V4[3] = [ $DeX, $DeY, $OrZ ]
    Local $V5[3] = [ $OrX, $OrY, $DeZ ]
    Local $V6[3] = [ $DeX, $OrY, $DeZ ]
    Local $V7[3] = [ $OrX, $DeY, $DeZ ]
    Local $V8[3] = [ $DeX, $DeY, $DeZ ]
    
    _AddLineEx( $Name, $V1, $V2, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V2, $V6, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V6, $V5, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V5, $V1, $Red, $Green, $Blue )
    
    _AddLineEx( $Name, $V3, $V4, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V4, $V8, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V8, $V7, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V7, $V3, $Red, $Green, $Blue )
    
    _AddLineEx( $Name, $V2, $V4, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V6, $V8, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V5, $V7, $Red, $Green, $Blue )
    _AddLineEx( $Name, $V1, $V3, $Red, $Green, $Blue )
    
EndFunc
;--------------------------------------------------------------------------------------------

DefineGlWindow( 500, 400, "OpenGl Plugin - experiment" )
SetClearColor( 0.5, 0.5, 0.5 )

_CreateCube( "Cube1", -30, 30, -30, 30, -30, 30 , 0.4, 0.4, 1.0, 1.0 )
_CreateWireCube( "Cube1", -40, 40, -40, 40, -40, 40 , 1.0, 1.0, 0.4 )

_CreateCube( "Cube2", -40, 40, -40, 40, -40, 40 , 0.4, 1.0, 0.4, 1.0 )
TranslateObject( "Cube2", 120, 0, 120 )

SetCamera( 0, 80, 300, 0, 0, 0 )

GlMainLoop( )

$Y_Axis = 0
While 1
    sleep( 10 )
    
    ;Rotate box
    RotateObject( "Cube1", $Y_Axis, $Y_Axis, 0 )
    RotateObject( "Cube2", 0, $Y_Axis, 0 )
    $Y_Axis = $Y_Axis + 2
    If $Y_Axis = 360 Then $Y_Axis = 0
    If $Y_Axis > 360 Then $Y_Axis = $Y_Axis - 360   
Wend

PluginClose( $handle )

;)

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

great plugin, great examples, great progress :lmao:

For avoiding warning in au3check you can add this to start of script:

#compiler_plugin_funcs=DefineGlWindow, SetClearColor, SetCamera, GlMainLoop, AddLine, AddTriangle, AddObject, RotateObject, TranslateObject

It's AutoIt3Wrapper directive.

Thanks! :evil:

In next samples, I will create some UDFs that calls plugin and add that directive.

;)

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

impressive !!

Erh... would I dare ask for a sphere ?

Thanks :lmao:

Apzo.

Thanks!

Spheres are coming soon ;)

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

I can't wait. Thanks a lot. That compiler note was great thanks.

BTW dont forget to add something like objectdelete() and objectedit()

I will make the docs for you if you want

Thanks!

Look at the first post! I released an update again. Now with spheres. Forgive me about objectdelete() and objectedit(). I will work on it.

Bye!

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Thanks!

Look at the first post! I released an update again. Now with spheres. Forgive me about objectdelete() and objectedit(). I will work on it.

Bye!

Thanks. one more thing, the alpha doesn't seem to be doing anything, am i doing something wrong?

Updated Rectangles: Now with x,y,z of set.

CODE
Func _CreateRect( $Name, $Red, $Green, $Blue, $Alpha, $width, $height, $depth, $x, $y, $z )

AddObject( $Name )

Local $V1[3] = [ -($width/2)+$x, $height/2+$y, -($depth/2)+$z]

Local $V2[3] = [ $width/2+$x, $height/2+$y, -($depth/2)+$z]

Local $V3[3] = [ -($width/2)+$x, -($height/2)+$y, -($depth/2)+$z]

Local $V4[3] = [ $width/2+$x, -($height/2)+$y, -($depth/2)+$z]

Local $V5[3] = [ -($width/2)+$x, $height/2+$y, $depth/2+$z]

Local $V6[3] = [ $width/2+$x, $height/2+$y, $depth/2+$z]

Local $V7[3] = [ -($width/2)+$x, -($height/2)+$y, $depth/2+$z]

Local $V8[3] = [ $width/2+$x, -($height/2)+$y, $depth/2+$z]

Local $Normal[3] = [ 0, 0, 1 ]

_AddTriangleEx( $Name, $V1, $V2, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V3, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

Local $Normal[3] = [ 1, 0, 0 ]

_AddTriangleEx( $Name, $V6, $V2, $V8, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V8, $V4, $V2, $Normal, $Red, $Green, $Blue, $Alpha )

Local $Normal[3] = [ 0, 0,-1 ]

_AddTriangleEx( $Name, $V6, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V7, $V8, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

Local $Normal[3] = [-1, 0, 0 ]

_AddTriangleEx( $Name, $V5, $V1, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V5, $V7, $V3, $Normal, $Red, $Green, $Blue, $Alpha )

Local $Normal[3] = [ 0, 1, 0 ]

_AddTriangleEx( $Name, $V1, $V6, $V5, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V1, $V2, $V6, $Normal, $Red, $Green, $Blue, $Alpha )

Local $Normal[3] = [ 0,-1, 0 ]

_AddTriangleEx( $Name, $V3, $V8, $V7, $Normal, $Red, $Green, $Blue, $Alpha )

_AddTriangleEx( $Name, $V3, $V8, $V4, $Normal, $Red, $Green, $Blue, $Alpha )

EndFunc

Check out ConsultingJoe.com
Link to comment
Share on other sites

Try the new version!

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

great job but, it seems now that I get the same sphere and sqares no mater what, is that a glitch

Alpha... ;)

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...