Mesh Rotation

Dec 8, 2009 at 9:12 PM

Cool, i'm glad that most of Dependency Properties have been implemented and i can use storyboards...

Too bad Mesh dont have a property for Rotation as it has for Position or Scale...

If have a gameclass of my own i can use the update method and some math do simulate that...

But i notice that the Game class in the following example as no Update method to override...

<balder:Game x:Name="_game" Width="800" Height="600"  >
                <balder:Mesh x:Name="_evolve" AssetName="/Portfolio;component/Assets/evolve.ase"/>
</balder:Game>

 

thxs

Coordinator
Dec 9, 2009 at 4:49 AM

Hi,

one of the issues I had before the release of 0.8.8.0 was that I needed to create all the controls separately and they having reference to the "real" objects in Balder.Core. I couldn't figure out a better way to do this. But last sunday, I had a revelation. :) 

Next version will have a lot better support for this, as the Core (real) objects will be exposed as Controls instead. That means that you can derive from game and create your own game class and implement Update and so forth, and then put this in your Xaml directly.
I will also look into exposing an Update routed event.

Another thing I'm looking into is to provide a Transform object on Node that will contain Rotation and Scale - much like the CombinedTransform that will be in Silverlight 4 for 2D manipulations. That way one can storyboard rotation and scaling of objects as well.

I'm considering putting out a interim build (0.8.8.5) so provide this sooner than a 0.8.9.0 version. Can't make any promises yet, but these are the goals at least.  

Dec 10, 2009 at 7:15 PM

Supercool, i'll be awaiting...

I try to use mygameapp like this:

   <Grid>
<balder:Game Width="800" Height="600">
<balder:Game.GameClass>
<local:MyGameClass/>
</balder:Game.GameClass>
</balder:Game>
</Grid>

Can i use a mesh inside GameClass like this?

   <Grid>
<balder:Game Width="800" Height="600">
<balder:Game.GameClass>
            <local:MyGameClass/>
<Balder:Mesh />
            </local:MyGameClass>

</balder:Game.GameClass>
</balder:Game>
</Grid>

Cause i can add a mesh in MyGame.cs class, and use its update method,only im having troubles acessing that mesh in MainPage.cs class.

Thx
Coordinator
Dec 11, 2009 at 12:09 PM

You can't add the mesh to the gameclass like that. 

In the next version, the concept of GameClass as a property will be gone, you will simply put your own Game as a Xaml straight into your page.

e.g.: 

<Grid>
    <local:MyGameClass>
        <geometries:Mesh AssetName="teapot.ase"/>
   </local>
</Grid>

That way the same object will be accessible straight from your Game class, and your Xaml.

I managed to get all this up and running yesterday, only have an issue with the Camera to fix and I'll be getting it out the door. I have a dedicated day on Monday (12 hours),
I guess I'll have a new version out then.  

Dec 11, 2009 at 6:59 PM

Nice :)

Keep up the excellent work !!!

Balder rocks :D

Coordinator
Dec 11, 2009 at 9:02 PM

Thanks a lot. 

Its a great joy to work on this project with all the great feedback people like you are giving. Makes me want to quit my day job and do nothing else. :)