×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    rotating a image using 3D api

    Hi everyone!

    I need to rotate a image using the 3D api. To do this, I have build a texture
    based on this image and associate it to a 3D object(a cube). Then I tryed
    to make just one cube surface visible on the screen in order to simulate
    a simple 2D image painting operation.

    The problem is to set the proper appearence for the camera, in order to
    optain a 1:1 scale, so the initial image should not suffer 3D api
    transformations that could affect the qulity of the image. The image size is 128x128 pixels and I need to show it on a viewport with the same size.

    Dose anyone knows how to set the proper camera parametes in order to be
    able to see the initial image without transformations?

    Any other solutions in rotating a image on the phone are welcome. Thanks!

    Best Regards
    /arical

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    Re: rotating a image using 3D api

    Hi again.

    It seems that no good solution can be found for roating a image on a
    cellphone.
    A rotating algorithm can be used for processing and transforming
    the RGB bytes of an image, but this will result in slow, inefficinet
    painting operations.

    Rotating the same image with 3D api is much more better - just that
    I don't know how to show the initial image(without rotating it) with no
    transformations, as if the image was drawn with the Graphics.drawImage()
    method

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    4

    Re: rotating a image using 3D api

    Hi,

    Why don't you use Graphics.drawRegion() that comes with MIDP 2.0? It takes a transform parameter that lets you rotate an image.

    If you want to rotate a texture in M3G, swiveling the texture coordinates is probably the fastest way to do it.

    CU,
    Claus

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    Re: rotating a image using 3D api

    Quote Originally Posted by choefele
    Hi,

    Why don't you use Graphics.drawRegion() that comes with MIDP 2.0? It takes a transform parameter that lets you rotate an image.

    If you want to rotate a texture in M3G, swiveling the texture coordinates is probably the fastest way to do it.

    CU,
    Claus

    Hi,

    Thanks for your answer.

    I cannot use the Graphics.drawRegion() method because the transform
    parameter can have just a multiple of 45 degrees value. I need an arbitrary
    angle.

    Using 3D api this can be done - with lose of quality of course

    /arical

Similar Threads

  1. Showing Part of Image from ByteArray (No Native API)
    By vishwas_dot_h in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2009-08-27, 12:17
  2. PC Suite error: (Code: Init IMediaControl2) HELP?!
    By chunkyspudmonkey in forum General Development Questions
    Replies: 29
    Last Post: 2008-06-30, 11:47
  3. Replies: 0
    Last Post: 2005-09-13, 10:10
  4. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 09:58
  5. rotating a image
    By manik_jandial in forum Mobile Java General
    Replies: 3
    Last Post: 2004-04-02, 07:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •