-
Posts
1,133 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by ZioRed
-
-
That doesn't seem to have worked.
I'm creating several physics bodies (as in the bodies tutorial) and out of the hundred, only one is affected.
I tried against the code of the tutorial "Introduction to Models" and have 101 entities count using "ENTITY_MODEL | ENTITY_BODY":
#include "engine.h" #include <cstdio> #include <sstream> int entities = 0; void _stdcall myfunc( TEntity entity, BP extra ) { entities++; } inline float rnd( float min=0.0, float max=1.0 ) { return min + ((float)rand()/RAND_MAX)*(max-min); } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { Initialize() ; RegisterAbstractPath("D:/LE/2.32"); SetAppTitle( "ConsoleCPP" ) ; Graphics( 800, 600 ) ; TWorld world = CreateWorld() ; if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); return Terminate(); } TBuffer gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); //Create a camera TCamera cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); PositionEntity(cam,Vec3(0,2,-10)); //Create a light TLight light=CreateDirectionalLight(); RotateEntity(light,Vec3(45,45,0)); //Create a render buffer TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TModel model=LoadModel("abstract::oildrum.gmf"); if (!model) { MessageBoxA(0,"Error","Failed to load mesh.",0); goto exitapp; } SetBodyMass(model, 1); for ( int n=1; n<=100; n++ ) { model=CopyEntity(model); PositionEntity(model,Vec3(rnd(-5,5),rnd(5,15),rnd(-5,5))); RotateEntity(model,Vec3(rnd(0,360),rnd(0,360),rnd(0,360))); SetBodyMass(model, 1); } //Main loop while(!KeyHit(KEY_ESCAPE)) { //Update the world UpdateWorld(); //Render the scene SetBuffer(buffer); RenderWorld(); //Render lighting SetBuffer(BackBuffer()); RenderLights(buffer); entities = 0; ForEachEntityDo(reinterpret_cast<byte*>(myfunc), 0, ENTITY_MODEL | ENTITY_BODY); //std::string s; std::stringstream out; out << entities; //s = out.str(); DrawText(0, 30, out.str().c_str()); //Swap the front and back buffer Flip(); } exitapp: return Terminate(); }
-
Don't know if it's the correct way, but have you tried to pass ENTITY_BODY to ForEachEntityDo() as last parameter?
-
As far as I remember the collision type parameter that you pass to the pick function is not the one of the "pickable entity" but of the raycast itself.
-
I wrote a simple program which I use as base for some editors (it uses 1.32 version of wrapper and LETKControl).
-
Is there a tutorial/guide somewhere to set up LE with C#?
Visual Studio 2010 is looking fantastic.
I don't know how will be different the code from the new incoming wrapper, but I wrote a "getting started" which used the 1.32 version of the wrapper (I don't think the new wrapper will be enough different to invalidate that tutorial or the other one I wrote for Lights, if needed I will update them when the new will be released).
-
I cannot find a definition for TList in engine.h and never succeeded to access them from neither a TWorld nor a World, so I thought those could be deprecated from an old version.
-
C# headers for 2.3x will be released soon, Tyler and Lazlo are working on a new huge version, so I think you will waste your time if you create your own wrapper because their will be the "official" as soon as it's stable enough
-
I haven't tried, but from its description it seems ForEachEntityInAABBDo is useful for this.
-
The last code works for me, I see a white cube in the center of the black window (used 800/600 for width/height)
-
That usually happens when you don't have the light/ambient models and lua scripts in your dir. Try to set the AbstractPath to your SDK path.
-
AccessViolation is generally symptom of a zero-value pointer (I think GetChild returns such nullpointer entity instead of null if the child has not been found, but not sure on this).
-
Last time I heard Tyler, he said it was most done and should be ready in some days/week.
-
I have checked out the SVN version.
When loading the solution in VS2010 it complains about a missing project file
The new wrapper has been moved to Assembla, but it seems to be still under development and locked, so we cannot download it. If you want the source for the version 1.32.8 (latest before the new coming) I can send it to you, let me know. Else we need to wait for a stable release of the new wrapper.
-
Well, in a struct you cannot declare default values for members which must be fully assigned in the constructor (but the constructor parameters can have a default value with NET 4.0), so I see it mostly unuseful too, except very rare cases in which you have only few variables and fewer methods (well a vector class has very few variables so it could be used).
-
I removed this file, however that version was not build from your last code, it was before your all new stuff.
-
What does it mean "does not interact"? Also may be more helpful if you post the code.
-
are there really some persons using dotNOT?
Me for sure and may be few others coming.
Are you really wasting a "Dual Intel Xeon X5670 (8 Cores : ~24GHz); 32 GB DDR3-1600 (ECC, Fully Buffered); PNY Quadro FX 4600 SDI 1536 MB GDDR3" with a Linux? ok stop the common OS war
-
As promised I superficially tested the control and was able to select a mesh from a scene loaded in the control and update some TextBoxes and NumericUpDowns, if you're still interested you can download a sample program here (requires VC# 2010, it already contains the engine and wrapper DLLs in its debug directory so you need only to start debugging from the IDE or launch the compiled debug exe).
In that example you can rotate the camera with holding the right button and select a mesh/terrain with left button.
EDIT: the example assumes that your SDK folder is "C:\Leadwerks Engine SDK", else you need to change the code in the Init event of the control.
-
File Name: .NET Leadwerks 1.32.8
File Submitter: ZioRed
File Submitted: 14 Jul 2010
File Category: Tools and Utilities
This is a compiled build 1.32.8 of the .NET wrapper for Leadwerks.
-
It's a custom User Control which deeply use the C# wrapper classes. However the source is free available on the Google Code space (you should use a SVN client like TortoiseSVN to download the branch: /trunk/Leadwerks.Controls).
EDIT: I'm writing some tutorials on C# in the C# Programming section of tutorials, more coming next.
RE-EDIT: the thing you're speaking about (adjusting controls on a form when something happens on the LE's control) should be simple in C#, I would try something later since I need a kind of little editor too.
-
I do not fully understand how this is possible though.
Because SetPosition is a method and not a global function (LE's is PositionEntity) of a model object and your classes are not extending it but are new classes
-
I am definitely not a senior game developer (I'm still newbie in game development), but I agree with someone else who said in another thread that currently LE is more a renderer engine than a game engine, and I think this is the focus of those negative comments. As pretty "game engine" LE still lacks some features that are exposed in many others, first but not last some AI and GUI specific. However I agree with Rick, probably most of the negatives' authors were probably non-programmers and the programmers among them were mostly complaining about a protracted period during which Josh did changes to the code invalidating something that worked before (and this seems to be true in the past as I read in many posts on this forum, even if I have no personal experience since I started with 2.31).
-
Cannot you just set the beam as parent of both towers and free it when the last tower is freed?
-
@Ziored: I was thinking about that, but then I face a problem. This is the current function:
--Place the button on an X and Y position. Also adjusts the position according to the resolution. function LuaGui:Position(x,y) self.buttonX = x * self.scaleX self.buttonY = y * self.scaleY end
The x and y position are adjusted according to the resolution. If I remove these 2 lines, the correct position is no longer calculated. Perhaps I can fit it in the UpdateButton(). Thanks!
I was only speaking about the name of the method, not its code content... I don't know very well how Lua works, perhaps there is already a global "SetPosition" method for any new object?
Middlewerks - Model Converter
in Showcase
Posted
Nice work, could be even nicer if you expose configuration settings to the plugin such as the SDK path (most plugins can use the SDK converters so we can write Forms to enable/disable the command-line options). If you would like to add the configuration settings, then it would be useful to allow a plugin to be configured too in the same option Form.