Search Results

Search found 16 results on 1 pages for 'scenegraph'.

Page 1/1 | 1 

  • Is there any decent OpenGL SceneGraph API/framework?

    - by JohnIdol
    I am new to OpenGL. Wondering if there is any good Scenegraph API/framework for OpenGL. At the moment I am using glut with a custom node based solution: I am setting children and siblings for each node the calling a traverse function. I'd like a more flexible solution when it comes to managing dynamic elements in the scene.

    Read the article

  • AS3 Event Bubbling outside of the Scenegraph/DisplayList

    - by Brian Heylin
    Hi just wondering if it is possible to take advantage of event bubbling in non display list classes in AS3. For example in the model of an application where there is a City class that contains many Cars. What methods are there to attach an event listener to a City object and receive events that bubble up from the child Cars. To clarify The City and Car objects are not part of the display list, they are not DisplayObjects. So can bubbling be implemented outside of the display list somehow? As far as I know, this is not possible without manually attaching event listeners to each Car object and re dispatching the event from the City object. Anyone else have a cleaner solution?

    Read the article

  • Certain transformations in Open Inventor(Coin3D)

    - by Marc
    Hi, I am quite new to Open Inventor(Coin3D) and have the following problem: I have a SoSelection holding a root node(also SoSeparator). And the root node holds a number of SoSeparator nodes. Each of these SoSeparator nodes holds a SoTransform node and a SoCube node. When I select one cube node I want all other cubes within a certain distance to the selected cube to arrange in a circle arround the selected cube. (Moreover all of the cubes should be on a plane than) An additional information: My cubes are always oriented in the camera direction with (cubeTransform_-rotation.connectFrom(&camera_-orientation) Assuming the selected cube is the center of the circle, how do I translate the other cubes in a circle on a plane(perpendicular to the vector between the selected cube and the camera)? Especially how do I find coordinates on the plain on which the circle should be which have a certain distance from the Axis (from center cube to camera). What I already did is to search for the for all cubes within a certain distance as soon as one cube is selected. As a result I already have the required separators (which are holding the according SoTransforms and SoCubes) in a SoPathList. Now I want to arrange the cubes by modifing the according SoTransform-translation values. Regards Mark

    Read the article

  • OpenGL/SharpGL - Points only on -near surface of Ortho projection?

    - by FTLPhysicsGuy
    When you create points using three dimensions for each point and you use an Ortho projection to view the points, would there be a reason that only the points on the -near surface would appear? For example, if you use (the SharpGL method) gl.Ortho(0, width, height, 0, -10, 10), only the points at z=10 (because the near surface is at -10) actually show up. I'm currently using SharpGL - but I'm hoping the issue I'm having isn't with that particular implementation/library. EDIT: I'm adding the code below that demonstrates the issue. Note that this example requires SharpGL and is in fact a modification of a WPF sample project that comes with the current SharpGL source code (the original sample project is called TwoDSample). The project requires a MainWindow.xaml and a MainWindow.xaml.cs. Here's the xaml: <Window x:Class="TwoDSample.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF"> <Grid> <my:OpenGLControl Name="openGLControl1" OpenGLDraw="openGLControl1_OpenGLDraw" OpenGLInitialized="openGLControl1_OpenGLInitialized" Resized="openGLControl1_Resized"/> </Grid> </Window> Here is the code behind: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using SharpGL.Enumerations; namespace TwoDSample { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } // NOTE: I use this to restrict the openGLControl1_OpenGLDraw method to // drawing only once after m_drawCount is set to zero; int m_drawCount = 0; private void openGLControl1_OpenGLDraw(object sender, SharpGL.SceneGraph.OpenGLEventArgs args) { // NOTE: Only draw once after m_drawCount is set to zero if (m_drawCount < 1) { // Get the OpenGL instance. var gl = args.OpenGL; gl.Color(1f, 0f, 0f); gl.PointSize(2.0f); // Draw 10000 random points. gl.Begin(BeginMode.Points); Random random = new Random(); for (int i = 0; i < 10000; i++) { double x = 10 + 400 * random.NextDouble(); double y = 10 + 400 * random.NextDouble(); double z = (double)random.Next(-10, 0); // Color the point according to z value gl.Color(0f, 0f, 1f); // default to blue if (z == -10) gl.Color(1f, 0f, 0f); // Red for z = -10 else if (z == -1) gl.Color(0f, 1f, 0f); // Green for z = -1 gl.Vertex(x, y, z); } gl.End(); m_drawCount++; } } private void openGLControl1_OpenGLInitialized(object sender, SharpGL.SceneGraph.OpenGLEventArgs args) { } private void openGLControl1_Resized(object sender, SharpGL.SceneGraph.OpenGLEventArgs args) { // NOTE: force the draw routine to happen again when resize occurs m_drawCount = 0; // Get the OpenGL instance. var gl = args.OpenGL; // Create an orthographic projection. gl.MatrixMode(MatrixMode.Projection); gl.LoadIdentity(); // NOTE: Basically no matter what I do, the only points I see are those at // the "near" surface (with z = -zNear)--in this case, I only see green points gl.Ortho(0, openGLControl1.ActualWidth, openGLControl1.ActualHeight, 0, 1, 10); // Back to the modelview. gl.MatrixMode(MatrixMode.Modelview); } } }

    Read the article

  • Physics engine that can handle multiple attractors?

    - by brice
    I'm putting together a game that will be played mostly with three dimensional gravity. By that I mean multiple planets/stars/moons behaving realistically, and path plotting and path prediction in the gravity field. I have looked at a variety of physics engines, such as Bullet, tokamak or Newton, but none of them seem to be suitable, as I'd essentially have to re-write the gravity engine in their framework. Do you know of a physics engine that is capable of dealing with multiple bodies all attracted to one another? I don't need scenegraph management, or rendering, just core physics. (collision detection would be a bonus, as would rigid body dynamics). My background is in physics, so I would be able to write an engine that uses Verlet integration or RK4 (or even Euler integration, if I had to) but I'd much rather adapt an off the shelf solution. [edit]: There are some great resources for physics simulation of n-body problems online, and on stackoverflow

    Read the article

  • Scene Graph Traversing Techniques

    - by Bunkai.Satori
    Scene Graph seems to be the most effective way of representing the game world. The game world usually tends to be as large as the memory and device can handle. In contrast, the screen of the device captures only a fraction of the Game World/Scene Graph. Ideally, I wish to process(update and render) only the visible game objects/nodes on per-frame basis. My question therefore is, how to traverse the scene graph so, that I will focus only on the game notes that are in the camera frustum? How to organize data so that I can easily focus only on the scene graph nodes visible to me? What are techniques to minimize scenegraph traversal time? Is there such way as more effective traversal, or do I have to traverse whole scene graph on per-frame basis?

    Read the article

  • Matrix multiplication - Scene Graphs

    - by bgarate
    I wrote a MatrixStack class in C# to use in a SceneGraph. So, to get the world matrix for an object I am suposed to use: WorldMatrix = ParentWorld * LocalTransform But, in fact, it only works as expected when I do the other way: WorldMatrix = LocalTransform * ParentWorld Mi code is: public class MatrixStack { Stack<Matrix> stack = new Stack<Matrix>(); Matrix result = Matrix.Identity; public void PushMatrix(Matrix matrix) { stack.Push(matrix); result = matrix * result; } public Matrix PopMatrix() { result = Matrix.Invert(stack.Peek()) * result; return stack.Pop(); } public Matrix Result { get { return result; } } public void Clear() { stack.Clear(); result = Matrix.Identity; } } Why it works this way and not the other? Thanks!

    Read the article

  • Is there a Java library with 3D spline functions?

    - by Liam
    In particular, I need a way to represent a curve/spline that passes through a set of known 3D points, and a way of finding other points on the curve/spline, by subdivision/interpolation. For example, if I have a set of points P0 to PN, I want to find 100 points between P0 and P1 that are on a spline that passes through P0 and P1. I see that Java3D's KBRotPosScaleSplinePathInterpolator performs such a calculation, but it is tied to that API's scenegraph model and I do not see how to return the values I need.

    Read the article

  • At the Java DEMOgrounds - JavaFX

    - by Janice J. Heiss
    JavaFX has made rapid progress in the last year, as is evidenced by the wealth of demos on display. A few questions appear to be prominent in the minds of JavaFX enthusiasts. Here are some questions with answers provided by Oracle’s JavaFX team.When will the rest of the JavaFX code be available in open source?Oracle has started to open source JavaFX. The existing platform code will finish being committed to OpenJFX by the end of the year.Why should I use JavaFX instead of HTML5?We see JavaFX as complementary to HTML5, and most companies we talk to react positively once they understand how they can benefit from a hybrid solution. As most HTML5 developers will tell you, the biggest obstacle to deploying HTML5 applications is fragmentation. JavaFX offers a convenient way to render HTML and JavaScript within its WebView component, which provides the same level of quality and features across Windows, Mac, and Linux. Additionally, JavaScript in WebView can make calls into the Java code, and vice versa, allowing developers to tap into the best of both worlds.What is the market penetration of JavaFX? It is currently limited, as we've just made available JavaFX on Mac and Linux in August, but we expect JavaFX to be present on millions of desktop-type systems now that JavaFX is included as part of the JRE. We have also significantly lowered the level of effort required to deploy an application bundling the JRE and JavaFX runtime libraries. Finally, we are seeing a lot of interest by companies operating in the embedded market, who have found it hard to develop compelling UIs with existing technologies.Below are summaries of JavaFX Demos on display at JavaOne 2012:JavaFX EnsembleEnsemble is a collection of over 100 JavaFX samples packaged as a JavaFX application. This demo is especially useful to those new to JavaFX, or those not familiar with its latest features (e.g. canvas, color picker). Ensemble is the reference for getting familiar with JavaFX functionality. Each sample can be run from within Ensemble, and the API for each sample, as well as the source code are available alongside the sample.The samples source code can be saved as a NetBeans project for convenience purposes, or can be copied as is in any other Java IDE. The version of Ensemble shown is packaged as a native Windows application, including the JRE and JavaFX libraries. It was created with the JavaFX packager, which provides multiple packaging options, and frees developers from the cumbersome and error-prone process of packaging a Java application.FX Experience ToolsFX Experience Tools is a JavaFX application that provides different utilities to create new skins for your JavaFX applications. One of the most powerful features of JavaFX is the ability to skin applications via CSS. Since not all Java developers are familiar with CSS, these utilities are a great starting point to create custom skins. JavaFX allows developers to easily customize the look and feel of their applications through CSS. FX Experience Tools makes it easy to create new themes for JavaFX applications, even if you are not familiar with CSS. FX Experience Tools is a JavaFX application packaged as a native application including the JRE and JavaFX runtime libraries. FX Experience tools shows how this type of deployment simplifies the packaging of Java applications without requiring developers to master the intricacies of Java application packaging. The download site for FX Experience Tools is http://fxexperience.com/2012/03/announcing-fx-experience-tools/ JavaFX Scene BuilderJavaFX Scene Builder is a visual layout tool that lets users quickly design the UI of your JavaFX application, without coding. Users can drag and drop UI components, modify their properties, apply style sheets, and the FXML code they create for the layout is automatically generated in the background. The result is an FXML file that can then be combined with a Java project by binding the UI to the application’s logic. Developers can easily create user interfaces for their application, as well as separate the application’s UI from the application logic for easier maintenance. Attendees can get this app by going to javafx.com and checking the link at top of the “Overview” page.Scene Builder allows developers to easily layout JavaFX UI controls, charts, shapes, and containers, so that you can quickly prototype user interfaces. It generates FXML, an XML-based markup language that enables users to define an application’s user interface, separately from the application logic. Scene Builder can be used in combination with any Java IDE, but is more tightly integrated with NetBeans IDE. It is written as a JavaFX application, with native desktop integration on Windows and Mac OS X. It’s a perfect example of a JavaFX application packages as a native application.Scene Builder is available for your preferred development platform. Besides the GA release on Windows and Mac, a Developer Preview of Scene Builder for Linux has just been made available.Scenic ViewScenic View is a tool that can be used to understand the current state of your application UI, and to also easily manipulate properties of the scenegraph without having to keep editing your code. Creating UIs is a complex process, and it can be hard and tedious detecting these issues, editing the code, and then compiling it to test the app again. Scenic View is a great diagnostics tool that helps developers identify these issues and correct them at runtime.Attendees can get Scenic View by going to javafx.com, selecting the “Community” tab, and clicking the link under the “Third Party Tools and Utilities” section.Scenic View allows developers to easily examine the state of a JavaFX application scenegraph while the application is running. Some of the latest features added to Scenic View include event monitoring, javadoc browsing, and contextual menus. The download site for Scenic View is available here: http://fxexperience.com/scenic-view/ Conference TourConference Tour is an application that lets users discover some of the major Java conferences throughout the world. The Conference Tour application shows how simple it is to mix JavaFX and HTML5 into a single, interactive application. Attendees get Conference Tour here.JavaFX includes a Web engine based on Webkit that provides a consistent web interface to render HTML5 across operating systems, within a JavaFX application. JavaFX features a bi-directional bridge that allows Java APIs to call JavaScript within WebView, or allows JavaScript to make calls to Java APIs. This allows developers to leverage the best of both worlds.Java EE developers can take advantage of WebView and the JavaScript-Java bridge to allow their HTML clients to seamlessly bypass Web browser’s sandbox to access native system resources, providing a richer user experience.FXMediaPlayerFXMediaPlayer is an application that lets developers check different media functionality in JavaFX, such as synthesizer or support for HTTP Live Streaming (HLS). This demo shows how developers can embed video content in their Java applications. JavaFX leverages the underlying video (e.g., H.264) and audio (e.g., AAC) codecs on the user’s computer. JavaFX APIs allow developers to interact with the video content (e.g. play/pause, or programmable markers). Some of the latest media features introduced in JavaFX 2.2 include HTTP Live Streaming (HLS). Obviously there is a lot for JavaFX enthusiasts to chew on!

    Read the article

  • Visual Studio compiles WPF application twice during build

    - by Brian Ensink
    I have a WPF app in VS2008 that compiles twice during the build. The two CSC command lines are similar but with some differences. The first CSC command line does not have an /resource options, the second has two /resource options on the command line. The second CSC command line has these additional arguments: /resource:"obj\Debug AutoCAD\VisualApp.g.resources" /resource:"obj\Debug AutoCAD\CAP.Visual.Properties.Resources.resources" I hate to post such a huge ugly compiler output but here are both command lines. 2>c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:..\BIN\RELEASE\FOO.Base.dll /reference:..\BIN\RELEASE\FOO.CAPArchiveHandler.dll /reference:..\BIN\RELEASE\FOO.CAPDOM.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.Docking.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.Navigation.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\UIAutomationProvider.dll" /reference:c:\project\FooStudio\BIN\DEBUGCAD\VS-3DEngine-Wrapper.dll /reference:c:\project\FooStudio\BIN\DEBUGCAD\VisualServiceClient.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll" /debug+ /debug:full /filealign:512 /out:"obj\Debug AutoCAD\VisualApp.exe" /target:winexe App.xaml.cs MainWindow.xaml.cs CameraAndLightingControl.xaml.cs CameraAndLightingViewModel.cs MainWindowViewModel.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs ScenarioToolsWindow.xaml.cs SceneGraph.cs ScenePart.cs ToolWindow.xaml.cs "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\CameraAndLightingControl.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\MainWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\ScenarioToolsWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\ToolWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\App.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\GeneratedInternalTypeHelper.g.cs" 2>Done building project "0ye0i4wb.tmp_proj". 2>c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:..\BIN\RELEASE\FOO.Base.dll /reference:..\BIN\RELEASE\FOO.CAPArchiveHandler.dll /reference:..\BIN\RELEASE\FOO.CAPDOM.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.Docking.dll" /reference:"C:\Program Files\Telerik\RadControls for WPF Q1 2010\Binaries\WPF\Telerik.Windows.Controls.Navigation.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\UIAutomationProvider.dll" /reference:c:\project\FooStudio\BIN\DEBUGCAD\VS-3DEngine-Wrapper.dll /reference:c:\project\FooStudio\BIN\DEBUGCAD\VisualServiceClient.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll" /debug+ /debug:full /filealign:512 /out:"obj\Debug AutoCAD\VisualApp.exe" /resource:"obj\Debug AutoCAD\VisualApp.g.resources" /resource:"obj\Debug AutoCAD\FOO.Visual.Properties.Resources.resources" /target:winexe App.xaml.cs MainWindow.xaml.cs CameraAndLightingControl.xaml.cs CameraAndLightingViewModel.cs MainWindowViewModel.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs ScenarioToolsWindow.xaml.cs SceneGraph.cs ScenePart.cs ToolWindow.xaml.cs "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\CameraAndLightingControl.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\MainWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\ScenarioToolsWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\ToolWindow.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\App.g.cs" "c:\project\FooStudio\VisualApp\obj\Debug AutoCAD\GeneratedInternalTypeHelper.g.cs" Any idea what could possibly cause this? I think this is causing a problem I posted about earlier today.

    Read the article

  • Engine Rendering pipeline : Making shaders generic

    - by fakhir
    I am trying to make a 2D game engine using OpenGL ES 2.0 (iOS for now). I've written Application layer in Objective C and a separate self contained RendererGLES20 in C++. No GL specific call is made outside the renderer. It is working perfectly. But I have some design issues when using shaders. Each shader has its own unique attributes and uniforms that need to be set just before the main draw call (glDrawArrays in this case). For instance, in order to draw some geometry I would do: void RendererGLES20::render(Model * model) { // Set a bunch of uniforms glUniformMatrix4fv(.......); // Enable specific attributes, can be many glEnableVertexAttribArray(......); // Set a bunch of vertex attribute pointers: glVertexAttribPointer(positionSlot, 2, GL_FLOAT, GL_FALSE, stride, m->pCoords); // Now actually Draw the geometry glDrawArrays(GL_TRIANGLES, 0, m->vertexCount); // After drawing, disable any vertex attributes: glDisableVertexAttribArray(.......); } As you can see this code is extremely rigid. If I were to use another shader, say ripple effect, i would be needing to pass extra uniforms, vertex attribs etc. In other words I would have to change the RendererGLES20 render source code just to incorporate the new shader. Is there any way to make the shader object totally generic? Like What if I just want to change the shader object and not worry about game source re-compiling? Any way to make the renderer agnostic of uniforms and attributes etc?. Even though we need to pass data to uniforms, what is the best place to do that? Model class? Is the model class aware of shader specific uniforms and attributes? Following shows Actor class: class Actor : public ISceneNode { ModelController * model; AIController * AI; }; Model controller class: class ModelController { class IShader * shader; int textureId; vec4 tint; float alpha; struct Vertex * vertexArray; }; Shader class just contains the shader object, compiling and linking sub-routines etc. In Game Logic class I am actually rendering the object: void GameLogic::update(float dt) { IRenderer * renderer = g_application->GetRenderer(); Actor * a = GetActor(id); renderer->render(a->model); } Please note that even though Actor extends ISceneNode, I haven't started implementing SceneGraph yet. I will do that as soon as I resolve this issue. Any ideas how to improve this? Related design patterns etc? Thank you for reading the question.

    Read the article

  • Crash when using datablocks

    - by scorcher24
    I have really throughly searched the net and could not find any solution for this so I ask for help here. Anyway, I have this datablock in datablocks.cs: datablock t2dSceneObjectDatablock(EnemyShipConfig) { canSaveDynamicFields = "1"; Layer = "3"; size = "64 64"; CollisionActiveSend = "1"; CollisionActiveReceive = "1"; CollisionCallback = true; CollisionLayers = "3"; CollisionDetectionMode = "POLYGON"; CollisionPolyList = "0.00 -0.791 0.756 0.751 -0.746 0.732"; UsesPhysics = "0"; Rotation = "-90"; WorldLimitMode = "KILL"; WorldLimitMax = "880 360"; WorldLimitMin = "-765 -436"; minFireRate = "2000"; maxFireRate = "1200"; laserSpeed = "800"; minSpeed = "100"; maxSpeed = "150"; }; This is an exact reproduction of an object that I have manually edited in the editor. So far, I just used clone() to get as many enemies as I need, while it was out of sight. It is a r-type style shooter, so I need a variable amount of enemies. Since clone() spams my log, I decided to use datablocks, since it is also more flexible. That's what I get when I use clone(): Con::execute - 0 has no namespace: onRemoveFromScene However, once spawning begins, my game freezes and crashes: function SpawnEnemy() { //%spawnedEnemy = EnemyShipMaster.clone(true); %spawnedEnemy = new t2dStaticSprite() { class = "EnemyShip"; sceneGraph = $global_sceneGraph; datablock = "EnemyShipConfig"; imageMap = "starshipImageMap"; layer = 3; }; %speed = getRandom(%spawnedEnemy.minSpeed, %spawnedEnemy.maxSpeed); %y = getRandom(-320, 320); // Set Properties %spawnedEnemy.setPositionX(700); %spawnedEnemy.setPositionY(%y); %spawnedEnemy.setVisible(true); %spawnedEnemy.setLinearVelocityX( -%speed ); %spawnedEnemy.setTimerOn( getRandom( %spawnedEnemy.maxFireRate, %spawnedEnemy.minFireRate ) ); } // Definition of $global_sceneGraph from game.cs: $global_sceneGraph = sceneWindow2D.loadLevel(%level); As I said, it works fine when I use clone() (which is commented out here), but my log gets spammed. I really hope someone can shed some light for me, this is driving me crazy.

    Read the article

  • C++ problem with assimp 3D model loader

    - by Brendan Webster
    In my game I have model loading functions for Assimp model loading library. I can load the model and render it, but the model displays incorrectly. The models load in as if they were using a seperate projection matrix. I have looked over my code over and over again, but I probably keep on missing the obvious reason why this is happening. Here is an image of my game: It's simply a 6 sided cube, but it's off big time! Here are my code snippets for rendering the cube to the screen: void C_MediaLoader::display(void) { float tmp; glTranslatef(0,0,0); // rotate it around the y axis glRotatef(angle,0.f,0.f,1.f); glColor4f(1,1,1,1); // scale the whole asset to fit into our view frustum tmp = scene_max.x-scene_min.x; tmp = aisgl_max(scene_max.y - scene_min.y,tmp); tmp = aisgl_max(scene_max.z - scene_min.z,tmp); tmp = (1.f / tmp); glScalef(tmp/5, tmp/5, tmp/5); // center the model //glTranslatef( -scene_center.x, -scene_center.y, -scene_center.z ); // if the display list has not been made yet, create a new one and // fill it with scene contents if(scene_list == 0) { scene_list = glGenLists(1); glNewList(scene_list, GL_COMPILE); // now begin at the root node of the imported data and traverse // the scenegraph by multiplying subsequent local transforms // together on GL's matrix stack. recursive_render(scene, scene->mRootNode); glEndList(); } glCallList(scene_list); } void C_MediaLoader::recursive_render (const struct aiScene *sc, const struct aiNode* nd) { unsigned int i; unsigned int n = 0, t; struct aiMatrix4x4 m = nd->mTransformation; // update transform aiTransposeMatrix4(&m); glPushMatrix(); glMultMatrixf((float*)&m); // draw all meshes assigned to this node for (; n < nd->mNumMeshes; ++n) { const struct aiMesh* mesh = scene->mMeshes[nd->mMeshes[n]]; apply_material(sc->mMaterials[mesh->mMaterialIndex]); if(mesh->mNormals == NULL) { glDisable(GL_LIGHTING); } else { glEnable(GL_LIGHTING); } for (t = 0; t < mesh->mNumFaces; ++t) { const struct aiFace* face = &mesh->mFaces[t]; GLenum face_mode; switch(face->mNumIndices) { case 1: face_mode = GL_POINTS; break; case 2: face_mode = GL_LINES; break; case 3: face_mode = GL_TRIANGLES; break; default: face_mode = GL_POLYGON; break; } glBegin(face_mode); for(i = 0; i < face->mNumIndices; i++) { int index = face->mIndices[i]; if(mesh->mColors[0] != NULL) glColor4fv((GLfloat*)&mesh->mColors[0][index]); if(mesh->mNormals != NULL) glNormal3fv(&mesh->mNormals[index].x); glVertex3fv(&mesh->mVertices[index].x); } glEnd(); } } // draw all children for (n = 0; n < nd->mNumChildren; ++n) { recursive_render(sc, nd->mChildren[n]); } glPopMatrix(); } Sorry there is so much code to look through, but I really cannot find the problem, and I would love to have help.

    Read the article

  • Problem with Assimp 3D model loader

    - by Brendan Webster
    In my game I have model loading functions for Assimp model loading library. I can load the model and render it, but the model displays incorrectly. The models load in as if they were using a seperate projection matrix. I have looked over my code over and over again, but I probably keep on missing the obvious reason why this is happening. Here is an image of my game: It's simply a 6 sided cube, but it's off big time! Here are my code snippets for rendering the cube to the screen: void C_MediaLoader::display(void) { float tmp; glTranslatef(0,0,0); // rotate it around the y axis glRotatef(angle,0.f,0.f,1.f); glColor4f(1,1,1,1); // scale the whole asset to fit into our view frustum tmp = scene_max.x-scene_min.x; tmp = aisgl_max(scene_max.y - scene_min.y,tmp); tmp = aisgl_max(scene_max.z - scene_min.z,tmp); tmp = (1.f / tmp); glScalef(tmp/5, tmp/5, tmp/5); // center the model //glTranslatef( -scene_center.x, -scene_center.y, -scene_center.z ); // if the display list has not been made yet, create a new one and // fill it with scene contents if(scene_list == 0) { scene_list = glGenLists(1); glNewList(scene_list, GL_COMPILE); // now begin at the root node of the imported data and traverse // the scenegraph by multiplying subsequent local transforms // together on GL's matrix stack. recursive_render(scene, scene->mRootNode); glEndList(); } glCallList(scene_list); } void C_MediaLoader::recursive_render (const struct aiScene *sc, const struct aiNode* nd) { unsigned int i; unsigned int n = 0, t; struct aiMatrix4x4 m = nd->mTransformation; // update transform aiTransposeMatrix4(&m); glPushMatrix(); glMultMatrixf((float*)&m); // draw all meshes assigned to this node for (; n < nd->mNumMeshes; ++n) { const struct aiMesh* mesh = scene->mMeshes[nd->mMeshes[n]]; apply_material(sc->mMaterials[mesh->mMaterialIndex]); if(mesh->mNormals == NULL) { glDisable(GL_LIGHTING); } else { glEnable(GL_LIGHTING); } for (t = 0; t < mesh->mNumFaces; ++t) { const struct aiFace* face = &mesh->mFaces[t]; GLenum face_mode; switch(face->mNumIndices) { case 1: face_mode = GL_POINTS; break; case 2: face_mode = GL_LINES; break; case 3: face_mode = GL_TRIANGLES; break; default: face_mode = GL_POLYGON; break; } glBegin(face_mode); for(i = 0; i < face->mNumIndices; i++) { int index = face->mIndices[i]; if(mesh->mColors[0] != NULL) glColor4fv((GLfloat*)&mesh->mColors[0][index]); if(mesh->mNormals != NULL) glNormal3fv(&mesh->mNormals[index].x); glVertex3fv(&mesh->mVertices[index].x); } glEnd(); } } // draw all children for (n = 0; n < nd->mNumChildren; ++n) { recursive_render(sc, nd->mChildren[n]); } glPopMatrix(); } Sorry there is so much code to look through, but I really cannot find the problem, and I would love to have help.

    Read the article

  • CodePlex Daily Summary for Tuesday, March 02, 2010

    CodePlex Daily Summary for Tuesday, March 02, 2010New ProjectsAcceptance Test Excel Addin: Acceptance Test Excel Addin is a tool to author, execute and analyze acceptance tests in Excel. The tester write tests using Given-When-Then (Gherk...Adrastus: Related to manage Issue/Item of any type. To be defined later TBDAn opportunity of upgrading Linux operating system: Want to add a new software in Linux operating system? Here is an opportunity. UFS (User Friendly Scheduler) has been designed to make the operating...AspNetPager: AspNetPager is a free custom paging control for ASP.NET web form application. It's one of the most popular ASP.NET third party controls used by chi...AzureRunMe: Run Java, Ruby, Python, [insert language of your choice] applications in Windows Azure. You provide a self contained ZIP file with a runme.bat f...DiffPlex - a .NET Diff Generator: DiffPlex is a combination of a .NET Diffing Library with both a Silverlight and HTML diff viewer.GPA WebClient: GPA project web client.Maintenance Service: A lot of projects need to have a windows service that execute different tasks. If am tired of creating the same service for all this project, so He...Marager Component Framework: Marager Component Framework (mcf)Pod Thrower: An application that gives a simple way to create podcast rss feeds from local computer folders.Rapidshare Episode Downloader: Rapidshare Episode Downloader is a software that enables you (yes, you!) to organize your many episodes of different TV shows in a nice list, prese...Resxus - Total .net string resource management tool: RESXUS is a resource file management tool which is being created under my job-experience of managing multilingual resx files. The first goal of th...SLFX: SLFXTheWhiteAmbit: Hybrid Scanline-Raytracing Engine. VisitorPattern based Scenegraph written in C++. DirectX9 or DirectX10 rendering is used for PrimaryRays and CUDA...TSqlMigrations: Yet another migrations platform right? This is purely sql based (tsql as it is only for Sql Server at this time). This tool is meant to help mana...WAFFLE: Windows Authentication Functional Framework (LE): WAFFLE - Windows Authentication Functional Framework (Light Edition) is a .NET library with a COM interface and a Java bridge that provides a worki...web lib api: This project aim, to pull together the major, web api/webservices for each relervant categorie.WSDLGenerator: A tool to generate a WSDL file from a c# dll which contains one more Microsoft WebServices. The project is build using VS2010RC and uses .net Fram...XNA Re-usable UI Components: The aim of this project is to create a re-usable set of UI game components helping reduce production time for your game. More information can be...YUI Compressor Custom Tool for Visual Studio: This EXTREMELY simple custom tool is used to automatically generate a *.min.css file from your existing code on save. It is merely a packaged versi...New ReleasesAcceptance Test Excel Addin: 1.0.0.0: How to Use Extract AcceptanceTestExcelAddIn-1.0.0.0.zip Run setup.exe Extract PasswordSample.zip Open Excel, your will see a new tab, "QA To...An opportunity of upgrading Linux operating system: UFS: The software provided by me is just a basic one that will run in the terminal through gcc compiler. The developers are therefore requested to make ...AspNetPager: Demo project: AspNetPager version 7.3.2 demo web site projectBusiness Framework: Formula Samples: A sample demonstrating textual language - Formula. It can be used is many business scenarios allowing end-user to configure or interact with the sy...Deblector: Deblector 1.1: This build fixes compatibility with .NET Reflector 6.Desktop Dimmer: March 2010: First release, March 2010EasyDump: EasyDump 1.0.1: Easy Dump 1.0.1 fix duplicate output when execute twiceExtensia: Extensia: Extensia is a very large list of extension methods and a few helper types. Many methods have practical utility (e.g. console parsing) whilst some ...Fluent Assertions: Fluent Assertions release 1.0: The first release of the Fluent Assertions. It contains assertions for the most common types and has several extension points.FolderSize: FolderSize.Win32.1.0.6.0: FolderSize.Win32.1.0.6.0 A simple utility intended to be used to scan harddrives for the folders that take most place and display this to the user...GamerShots.com Screenshot Capture: GamerShots.com Screenshot Capture: Windows Form application written in C# ASP.Net. Allows the user to capture a screen by pressing the "Print Scrn" key or by user input. Then uses ...Jet Login Tool (JetLoginTool): Stopped - 1.5.3713.17328: Fixed: Engine will now actually stop when the "Stop" button is hitJolt Environment - RuneScape Emulator: Jolt Environment 1.0.6000 GOLD: Features since 1.0.3200: - Account Creation via client - Character Saving/Loading (via MySQL serialization) - Ground Objects - Ground Items (with m...jQuery Library for SharePoint Web Services: SPServices 0.5.2: NOTE: While I work on new releases, I post alpha versions. Usually the alpha versions are here to address a particular need. I DO NOT recommend us...LINQ to XSD: 1.0.0: The LINQ to XSD technology provides .NET developers with support for typed XML programming. LINQ to XSD contributes to the LINQ project (.NET Langu...Maintenance Service: Alpha Release: Alpha Release of the SoftwareMDownloader: MDownloader-0.15.5.56206: Fixed many gathered bugs;MDownloader: MDownloader-0.15.6.56217: Fixed retrieving hotfile data using registered accounts.MRDS Services for HiTechnic: HiTechnic Controllers: The HiTechnic Controllers package contains services for MRDS that work with the LEGO NXT and TETRIX Servo and Motor Controllers. Initial ReleaseCo...Open NFe: DANFE 1.9.2: Correções do DANFE que serão incluídas na versão 1.9.2PROGRAMMABLE SOFTWARE DEVELOPMENT ENVIRONMENT: PROGRAMMABLE SOFTWARE DEVELOPMENT ENVIRONMENT-2.4: While testing a standard software parts kit library for strict portability, The following error condition occurred when using the Windows version ...Rapidshare Episode Downloader: RED 0.8: This is an almost fully working version of the software. What DOESN'T work: Showing the list of rapidshare search results (but query is being made...Reusable Library: V1.0.4: A collection of reusable abstractions for enterprise application developer.SharePoint LogViewer: SharePointLogViewer 1.5.1: Follwoing bugs are fixed Bookmarks deleted on refresh/reload Bookmarks not properly navigated on filtered list. Disabled toolbar buttons did n...SharePoint Taxonomy Extensions: SharePoint Taxonomy Extensions 1.1-1: - Some bugfixes - Possibility to switch between alphanummeric und manual sortingSilverSynth - Digital Audio Synthesis for Silverlight: SilverSynth 1.1: SilverSynth 1.1 is a zip file of the source code and includes an updated version of the demo application including presets.SQL Server Reporting Services MSBuild Tasks: Release 1.1.14669: New Features New Task added for Integrated and Native mode: DeleteReportUser Task ReportUserExists TaskTellago DevLabs: BizTalk Data Services v0.2: This release is the first version of the BizTalk Data Services API, a RESTful API for BizTalk Server based on the Open Data (OData) Protocol. The ...VCC: Latest build, v2.1.30301.0: Automatic drop of latest buildWAFFLE: Windows Authentication Functional Framework (LE): 1.2: Build 1.2.4217.0, initial open-source release. - Account lookup locally and in Active Directory. - Enumerating Active Directory domains. - Returns...Watermarker: 0.87: 01.03.2010: • FIXED: some stability fixes • ADDED: ability to choose any number of pictures and folder to save them after the operation completesWSDLGenerator: WSDLGenerator 0.0.0.1: Initial versionXNA Re-usable UI Components: Re-usable Game Components V1.0: First public release of the source codeYUI Compressor Custom Tool for Visual Studio: YUI Compressor Custom Tool with Installer v0.1a: Initial release with alpha installer - documentation to follow.Most Popular ProjectsMetaSharpRawrWBFS ManagerAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)Microsoft SQL Server Community & SamplesASP.NETImage Resizer Powertoy Clone for WindowsMost Active ProjectsRawrBlogEngine.NETMapWindow GISpatterns & practices – Enterprise LibraryjQuery Library for SharePoint Web ServicesSharpMap - Geospatial Application Framework for the CLRRapid Entity Framework (ORM). CTP 2DiffPlex - a .NET Diff GeneratorMDT Web FrontEndWPF Dialogs

    Read the article

1