Jump to content

Au3IrrLicht


A. Percy
 Share

Recommended Posts

And if you saw the help file and found that airplane, yes, I'm making a flight simulator in autoit.

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

  • Replies 231
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Greeeeaaat update :P

The new features looks awesome!

Keep it up :P

Thank you! :o

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

  • 3 weeks later...

Thank you! Tomorrow I'll restart my programming routine. Finally I did the revalidation of my pilot licence ;)

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

Link to comment
Share on other sites

Awesome, A.Percy, and congratulations. Flying must be a lot of fun ;)

Thank you! :D

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

Just finished copying & pasting all the functions from the helpfile to the au3.api file in scites install dir.

This gives code completion for the Au3Irrlicht functions!

Just add these lines to Autoit install dir\SciTe\api\au3.api

CODE

AddAnimator( NodePtr, AnimatorPtr ) Adds an animator which should animate this node.

CreateCollisionResponseAnimator( SelectorPtr, NodePtr, EllipsoidRadiusX, EllipsoidRadiusY, EllipsoidRadiusZ, GravityPerSecondX, GravityPerSecondY, GravityPerSecondZ, EllipsoidTranslationX, EllipsoidTranslationY, EllipsoidTranslationZ ) Creates a special scene node animator for doing automatic collision detection and response.

CreateFlyCircleAnimator( CenterX, CenterY, CenterZ, Radius, Speed, UpDirectionX, UpDirectionY, UpDirectionZ ) Creates a fly circle animator, which lets the attached scene node fly around a center.

CreateFlyStraightAnimator( StartX, StartY, StartZ, EndX, EndY, EndZ, Time, Loop ) Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points.

CreateRotationAnimator( RotationPerSecondX, RotationPerSecondY, RotationPerSecondZ ) Creates a rotation animator, which rotates the attached scene node around itself.

DropAnimator( AnimatorPtr ) Drops the object. Decrements the reference counter by one.

AddCameraSceneNode( ParentNode, PosX, PosY, PosZ, TargetX, TargetY, TargetZ ) Adds a camera scene node to the scene graph and sets it as active camera.

AddCameraSceneNodeFPS( ParentNode, RotateSpeed, MoveSpeed, NoVerticalMovement, JumpSpeed ) Adds a camera scene node which is able to be controlled with the mouse and keys like in most first person shooters (FPS).

AddCameraSceneNodeMaya( ParentNode, RotateSpeed, ZoomSpeed, TranslationSpeed ) Adds a maya style user controlled camera scene node to the scene graph.

GetActiveCamera( ) Returns the current active camera.

SetActiveCamera( CameraPtr )

SetFarValue( CameraPtr, ZFarValue ) Sets the value of the far clipping plane (default: 2000.0).

SetTarget( CameraPtr, PosX, PosY, PosZ ) Sets the look at target of the camera.

CreateOctTreeTriangleSelector( MeshPtr, NodePtr, MinPolysPerNode ) Creates a Triangle Selector, optimized by an octtree.

CreateTerrainTriangleSelector( NodePtr[, LOD ] ) Creates a triangle selector which can select triangles from a terrain scene node.

CreateTriangleSelector( MeshPtr, NodePtr ) Triangle selectors can be used for doing collision detection.

GetSceneNodeFromCameraBB( CameraNodePtr ) Returns the scene node nearest to the camera, which collides with the ray.

GetSceneNodeFromRayBB( StartX, StartY, StartZ, EndX, EndY, EndZ ) Returns the scene node nearest to start position (first 3 parameters), which collides with the ray.

SetGravity( AnimatorPtr, GravityX, GravityY, GravityZ ) Sets the gravity of the environment.

SetTriangleSelector( NodePtr, SelectorPtr ) Sets the triangle selector of the scene node.

SetWorld( AnimatorPtr, SelectorPtr ) Sets a triangle selector holding all triangles of the world with which the scene node may collide.

CreateDevice( Type, Width, Heigh, BitColour, FullScreen [, StencilBuffer [, Vsync ]] ) Does de more important thing: creates the Irrlicht device.

CreateDeviceOnWindow( ParentHwnd, Type, Left, Top, Width, Heigh, BitColour [, StencilBuffer [, Vsync ]] ) Creates the Irrlicht device attached to another window.

IrrRun( ) Runs the device. Also increments the virtual timer.

SetRenderTarget( TexturePtr [, ClearBackBuffer [, ClearZBuffer [, Alpha [, Red [, Green [, Blue ]]]]]] ) Sets a new render target.

SetViewPort( X, Y, X2, Y2 ) Sets a new viewport. Every rendering operation is done into this new area.

SetWindowCaption( "Title" ) Sets Irrlicht window title.

AddImage( TexturePtr, PosX, PosY [, UseAlphaChannel [, ParentPtr ]] ) Adds an image element to gui.

AddStaticText( "Text", X, Y, X2, Y2 [, Border [, WordWrap [, iParent [, FillBackground ]]]] ) Adds a static text.

SetText( GuiElementPtr, "Text" ) Sets the new caption of this element.

GuiDraw( ) Draws all gui elements. It's a friendly name (in AutoIt) for original "drawAll" from IrrLicht.

AddTexture( "Name", ImagePtr ) Creates a texture from a loaded Image.

CreateImageFromFile( "FilePath" ) Creates a software image from a file.

CreateRenderTargetTexture( Width, Height ) Creates a render target texture.

GetTexture( "FilePath" ) Returns a pointer to a texture.

AddNewSLight( CastShadows, Falloff, InnerCone, OuterCone, Radius [, Type ] ) Creates a dinamic light.

SetLightData( LightNodePtr, SLightPtr ) Sets the light data associated with a LightNode.

SetLightAmbientColor( SLightPtr, Red, Green, Blue ) Ambient color emitted by the light.

SetLightDiffuseColor( SLightPtr, Red, Green, Blue ) Diffuse color emitted by the light.

SetLightSpecularColor( SLightPtr, Red, Green, Blue ) Specular color emitted by the light.

GetMaterial( NodePtr, Num ) Returns the material based on the zero based index i.

GetMaterialCount( NodePtr ) Returns amount of materials used by this scene node.

SetMaterialFlag( NodePtr, Flag, NewValue ) Sets all material flags at once to a new value. Helpful for example, if you want to be the whole mesh to be lighted by.

SetMaterialTexture( NodePtr, TextureLayer, TexturePtr ) Sets the texture of the specified layer in all materials of this scene node to the new texture.

SetMaterialType( NodePtr, Type ) Sets the material type of all materials s32 this scene node to a new material type.

SetAmbientColor( MaterialPtr, Alpha, Red, Green, Blue ) How much ambient light (a global light) is reflected by this material.

SetDiffuseColor( MaterialPtr, Alpha, Red, Green, Blue ) How much diffuse light coming from a light source is reflected by this material.

SetEmissiveColor( MaterialPtr, Alpha, Red, Green, Blue ) Light emitted by this material. Default is to emitt no light.

SetSpecularColor( MaterialPtr, Alpha, Red, Green, Blue ) How much specular light (highlights from a light) is reflected.

AddHillPlaneMesh( "MeshName", TileSizeX, TileSizeY, TileCountX, TileCountY [, Material [, HillHeight, [CountHillsX [, CountHillsY [, TextureRepeatCountX[, TextureRepeatCountY ]]]]]] ) Adds a Hill Plane mesh to the mesh pool.

AddTerrainMesh( "MeshName", TexturePtr, HeightMapPtr, StretchX, StretchY, MaxHeight, DefaultVertexBlockSizeX, DefaultVertexBlockSizeY ) Adds a static terrain mesh to the mesh pool.

AddZipFileArchive( "FilePath" ) Adds an zip archive to the file system.

GetMesh( "FilePath" ) Loads the file if not loaded already.

GetQ3Shader( MeshPtr, EnumType ) Loads Quake 3 map shaders. It's an adaptation of getMesh method from getMesh.

ScaleMesh( MeshPtr, ScaleX, ScaleY, ScaleZ ) Scales the whole mesh.

AddAnimatedMeshSceneNode( MeshPtr ) Adds a scene node for rendering an animated mesh model.

AddChild( ParentNodePtr, ChildNodePtr ) Adds a child to this scene node. If the scene node already has got a parent, it is removed from there as child.

AddCubeSceneNode( [ Size [, ParentPtr ]] ) Adds a test scene node for test purposes to the scene.

AddLightSceneNode( ParentNode, PosX, PosY, PosZ, Red, Green, Blue, Radius ) Add a light to scene.

AddMeshSceneNode( MeshPtr ) Adds a scene node for rendering a static mesh.

AddOctTreeSceneNode( MeshPtr ) Adds a scene node for rendering using a octtree to the scene graph.

AddSkyBoxSceneNode( TopTexturePtr, BottomTexturePtr, LeftTexturePtr, RightTexturePtr, FrontTexturePtr, BackTexturePtr [, ParentPtr ] ) Adds a skybox scene node to the scene graph.

AddTerrainSceneNode( "HeightMapFile" [, ParentPtr [, MaxLOD [, PatchSize [, SmoothFactor [, AddAlsoIfHeightmapEmpty ]]]]] ) Adds a terrain scene node to the scene graph.

AddWaterSurfaceSceneNode( MeshPtr, WaveHeight, WaveSpeed, WaveLength [, Parent] ) Adds a scene node for rendering a animated water surface mesh.

GetPosition( NodePtr, "Axis" ) Gets the position of the node.

GetRotation( NodePtr, "Axis" ) Gets the rotation of the node.

ScaleTexture( NodePtr [, Scale [, Scale2 ]] ) Scales the base texture.

SetAnimationSpeed( NodePtr, FramesPerSecond ) Sets the speed with witch the animation is played.

SetMD2Animation( NodePtr, Animation ) Starts a default MD2 animation.

SetLoopMode( NodePtr, Option ) Sets looping mode which is on by default. If set to 0, animations will not be played looped.

SetPosition( NodePtr, PosX, PosY, PosZ ) Sets the position of the node.

SetRotation( NodePtr, AngleX, AngleY, AngleZ ) Sets the rotation of the node.

SetRotationByAxis( NodePtr, "Axis", Angle ) Sets the rotation of the node through specified axis.

SetRotationByTime( NodePtr, "Axis", StartAngle, EndAngle, ExecTime ) Sets the rotation of the node through specified axis in especified time.

SetScale( NodePtr, ScaleX, ScaleY, ScaleZ ) Sets the scale of the scene node.

SetVisible( NodePtr, IsVisible ) Sets if the node should be visible or not.

BeginScene( backBuffer, zBuffer, Alpha, Red, Green, Blue ) Application must call this method before performing any rendering.

EndScene( ) Presents the rendered image on the screen.

SceneDraw( ) Draws all scene elements. It's a friendly name (in AutoIt) for original "drawAll" from IrrLicht.

SetFog( [ Red [, Green [, Blue [, LinearFog [, Start [, End [, Density [, PixelFog [, RangeFog ]]]]]]]]] ) Sets the fog mode.

;)

Edited by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Just finished copying & pasting all the functions from the helpfile to the au3.api file in scites install dir.

This gives code completion for the Au3Irrlicht functions!

Just add these lines to Autoit install dir\SciTe\api\au3.api

...

;)

Perfect and very useful. Thank you! :D

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

  • 4 weeks later...

Hi Alexsandro!

How do I stretch a texture so it is only drawn once on a node?

:)

Hi!

Try use:

ScaleTexture( NodePtr [, Scale [, Scale2 ]] )

>_<

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

Yeah, I tried using that function, but I didn't quite get how it works.

I tried extremely high values, low values and values very near zero but nothing >_<

Hmmm... :) Take a look on "sea.au3" example.

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

Hmmm... :) Take a look on "sea.au3" example.

Hmm, I don't know, I just don't get it.

Maybe it's something wrong with my code?

#include "IrrlichtPluginUtils.au3"

CreateDevice($EDT_DIRECT3D9,640,480,32,0,0,0)

SetWindowCaption("Shooter!")



$light = AddLightSceneNode( 0, 0, 0, -2000, 1, 1, 1, 10000 )
$camera = AddCameraSceneNodeFPS( 0, 100, 200, 1, 0.08 )
SetPosition( $camera, 0, 100, -500 )
SetTarget( $camera, 0, 0, 0 )




$cube=GetMesh(@ScriptDir&"\cube.3ds")


$node=AddAnimatedMeshSceneNode($cube)
SetScale($node,1.10,1.10,1.10)
SetMaterialTexture($node,0,GetTexture(@ScriptDir&"\texture.jpg"))
ScaleTexture($node,0)
SetPosition($node,0,1, 0 )


While IrrRun()
    
    BeginScene(true,true,255,255,255,255)
    
    SceneDraw()
    GUIDraw()
    EndScene()
    

WEnd

Here's the resources I used:

http://monoceres.se/Uploads/texture.jpg

http://monoceres.se/Uploads/cube.3ds

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

I didn't find a solution, but I'll develop this feature today. :)

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

@A. Percy

How are things going with the flight simulator you said you were working on in post101??

Hi!

The flight simulator development is paused until I make this function work: getCollisionResultPosition

To make some meshes a bit more rounded, I finished the conversion of CreateMeshWelded, so the aircraft will have more softness in the forms.

:)

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...