Androiod, openGL, and 3 dimensional vectors

Hi,
I am learning java for the android phones. I got to a part in my book that deals very lightly with 3d graphics(OpenGL) and I am trying to convert some code from DirectX. The problem I am having is finding the equivalent of a 3 dimensional Vector in
the subset of java for the android platform. An example would be converting these vectors to their equivalent in the Android platform and java code:
        public Vector3 Position;
        public Vector3 Normal;
        public Vector3 Tangent;
        public Vector2 TextureCoordinate;What are the equivalents in java and the android platform?
Thanks in advance for help with this.

Just as a Vector can be used instead of a single dimension array, a Vector containing Vector objects can be used instead of a 2 dimensional array.
So in your example ...
Vector rowVector = new Vector();
while(myresultset.next()) {
ResultSetMetaData rsmd=myresultset.getMetaData();
int numOfColumns=rsmd.getColumnCount();
Vector columnVector = new Vector();
for(int columnCtr=0; columnCtr<numOfColumns; columnCtr++) {
columnVector.add(myresultset.getString(columnCtr+1));
rowVector.add(columnVector);
int numberOfRows = rowVector.size();
int numberOfColumnsInRow1 = ((Vector)rowVector.get(0)).size();
String column3ForRow1 = (numberOfColumnsInRow1 >= 3) ? (String)((Vector)rowVector.get(0)).get(2) : null;

Similar Messages

  • Two Dimensional Vector ?

    Hya,
    Is it possible to have two dimensional Vectors ?
    if yes, how would be declared ?
    I have a class called pencil,
    I want to put each 12 pencils in 1 Vector (pencil box)
    then add each of those vectors into a vector (box of pencil boxes)
    thanks in advance

    There's not really any such thing as a 2D vector
    (unless you create such a class) but you can create a
    Vector of Vectors. You can just add pencils to
    vector and add that vector to another vector.
    You might want to consider creating a PencilBox
    class, rather than using a Vector to hold the
    pencils.
    You should also use ArrayList rather than Vector.When should an arrayList be used ? or when should a Vector be used?
    thanks

  • Difference  between null vector and empty Vector

    What is the diffrence between null vector and empty vector.

    null vector means the JVM doesn't allocate memory.It doesn't exist
    in memory. NO instance!
    empty vector means the JVM allocated memory.It exists in memory.
    it's a instance than is accessabel.But only have on elements.
    GL&HF.

  • What is the purpose of the chain (lock symbol) between a solid color layer and its vector mask?

    What is the purpose of the chain (lock symbol) between a solid color layer and its vector mask in the layer panel when creating shape layers with a shape tool? I'm just curious when locking or unlocking the solid color layer and its vector mask can make a difference.

    I don't understand what you said and your shape layer looks different then mine using CS5.
    When the chain is deselected, I can't do anything with the move tool on the shape layer. This is the only difference I can find. Making the solid color uniform or not doesn't change anything.
    Your example shows that you moved the position of the solid color, how did you do that? I can create a solid color layer and change its uniform look by applying an effect like gradient but I can't move the solid color itself around. How is this possible?

  • Why Apple don't systematically support the latest version of OpenGL and OpenCL with a new OS release?

    Why Apple don't systematically support the latest version of OpenGL and OpenCL with a new OS release?

    Maybe because it's necessary to build on a version that's been out long enough to be stable before releasing? Who knows?
    Are there specific features you're missing?

  • OpenGL and GLX on Solaris Intel

    Can OpenGL and GLX be added to Solaris Intel without having to use Xfree86?
    I have built the Mesa libraries but still need the GLX extensions.
    Does any one know of an easy solution?

    Hi Senthilkumar,
    Thanks for reply!
    I found a couple of intel 10/100 network cards in our town, there are INTEL N232 10/100 PCI, INTEL PRO100+ 10/100 PCI, Intel 8460 10/100BT, I am not sure which one you were talking about, can you give me some detail information please?
    Thanks again.
    Mark

  • About Fact and Dimensional tables

    Hi
    I did not understand what what are fact and dimensional table.
    where we use them and how.
    Pl give with example.
    thanks

    See http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96520.pdf
    HTH,
    Alex

  • Copy and Paste Vector Data

    Is it possible to copy and paste vector data from one anchor point to another?

    See the pair of scripts here named JET_HandlesCopy.jsx and JET_HandlesPaste.jsx.
    JET

  • If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    >my indesign file is a web file
    Pardon?
    Or do you mean that, when you created a new document, you choose Web as intent maybe?

  • Use opengl and directdraw

    hi all,
    i have enabled opengl and directdraw in jvm, and the statement is correct, but i find the graphics rendering does not accelerate compared with not enabled. does anyone know why is that?thanks

    Yes it is possible to use OpenGL with JAVA. I have have written a very nice program that use an API that I have at work. I will see if it is on the web and I will get back to you on how to begin to use this powerful tool.

  • Opengl and labview

    Does anyone have a way to use opengl applications in labview? I have seen interfaces out there, but they are pretty expensive. Anyone done this yet?????

    Hi,
    I tried it, and it does work. It is a nice example of creating a opengl
    wrapper in c++. However, the only function it provides is to draw a text (in
    3D). The source is available, so it could be extended...
    Perhaps the best way to work with it is to adjust it to export the hWnd.
    With the hWnd, you can use all other opengl functions as normal api's. You
    need to set the opengl rendering context to the hWnd from labview, because
    it must be set from the same proccess that calls the api's (I think the ocx
    has it's own proccess).
    May be there are some more advanced wrappers (I stopped looking after the
    first).
    Regards,
    Wiebe.
    "Wiebe@CARYA" wrote in message
    news:4062a1ed@newsgroups....
    > Hi,
    >
    > Sorry for the slow reaction. I'm watching messages in outlook, but it
    > deletes messages automatically after a few month, and also stops watching
    > them.
    >
    > There seems to be an open source activex opengl wrapper at
    > http://www.codeproject.com . Just search for opengl and activex. You do
    need
    > to register, but it is free. This is the first page I looked at after
    > searching the web on opengl and activex. It looks promising...
    >
    > Regards,
    >
    > Wiebe.
    >
    >
    > "dirtyb15" wrote in message
    > news:[email protected]..
    > > All right, took a little time off from this project, but need to start
    > > again. You said to use and ativex container. What direct x object
    > > should i put in the container??
    >
    >

  • OpenGL and ICM Color Management

    I'm looking into ways to move my plugins to the use of OpenCL and OpenGL to take advantage of the power in modern GPUs.
    Specifically, with the Windows GDI, ICM color management can be set up to be done automatically through calls like BitBlt(), and in fact I do this.
    Can someone here point me in the right direction to learn how one might best handle color spaces when using OpenGL in place of the older Windows GDI calls?
    Thanks!
    -Noel

    Thanks.  That's what I was starting to infer from the lack of OpenGL and ICC color management information together.
    -Noel

  • Illustrator CS5 Not the Default for EPS and other Vector Formats

    Hey everyone, the issue I'm haveing is not just with Illustrator, but sense I couldnt find a general CS5 forum, and Illustrator was the last CS5 application i noticed this for I'm hoping to find some answers here.
    So on to the issue....
    I have noticed that on other computers (Macs for sure) that Illustrator, Photoshop, Dreamweaver etc... are set as the default handlers of certain file types that are associated with each application, and as such, give each filetype there own little icons reflecting such.
    However on my system (Windows 7 Ultimate x64) this does not seem to be the case. I can go in and set them as default manually, which I have done for the filetypes I use most frequently, but I do not get to enjoy the nice icons that made for each filetype, i just get a bland, default icon that is the same for every filetype.
    Is there a way to fix this issue?
    Thanks for you help.

    Yes, I think i mentioned it before that I knew I could set the default app through Explorer (right clicking, going to "open with" etc..) but this doesn't let you use any of the custom icons that come with the adobe applications, it sets it as the default icon associated witht he particular application. I'll take a look in the properties when I get home but, but I think you may be referring to the "open with" dialogue.
    Most applications like Firefox, iTunes etc.. have a button in there preferences menu to "set as default" for all file types they can open, however I don't see such an option in any Adobe applications except for bridge, and that doesn't seem to do anything.
    Date: Thu, 8 Jul 2010 00:09:53 -0600
    From: [email protected]
    To: [email protected]
    Subject: Illustrator CS5 Not the Default for EPS and other Vector Formats
    I believe in the properties pane for one of those files it will display the default app for opening such files and you can  change it there as well and make it apply to all similar files.
    >

  • IdeaPad G780 OpenGL and PixelShader versions needed

    Hi,
    I am currently looking to buy a replacement laptop, and the model I am interested in is the IdeaPad G780, M843KUK, Windows 7 (I absolutely do not want Windows 8).
    A distributor has a number of suitable machines at a decent price, but before committing to buy one of those I absolutely need to know the OpenGL and Pixel Shader versions currently supported.
    Those depend both from the GPUs (which define the absolute maximum possible, through their capabilities), and from the drivers, which define the actual maximum; Pixel Shader version is also limited by DirectX version, but OpenGL has no connection with DirectX.
    That information is unknown to the distributors, unavailable on the website, and equally unknown to the assisted help on this website.
    OpenGL version and/or Pixel Shader are critical requirements for most graphical applications, including games, and the new and future browser versions (due to HTML 5 and WebGL).
    So, could anyone here provide me that information on that precise model?
    There are technical tools which allow to find those values, for the machine the test is run on.

    It has been a few days and nobody was answering the question...
    That gave me the time to see that there are so many issues with Lenovo products, and existing customers are left without any support answers (most posts here seen to get no answer from Lenovo, or report issues which don't).
    So I will just add Lenovo to the list of low quality brands I want nothing to do with; obviously support went to hell since IBM sold their former PCs branch a few years ago, and it went its own way under the name Lenovo,

  • Relational Data and Dimensional Data

    Hi,
    Please list out the differences between relational data (Physical layer) and dimensional data (BMM layer).
    regards
    chandra kanth.

    Hi Chandra,
    This is not a concept of OBIEE but more of a BI general concept that can be applied to many tools.
    I found a nice example by IBM that might help you answer your questions http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.ddi.doc/ddi221.htm
    One thing to take in myind is that dimensions are usually used in the BI world and not the relational word. It helps you analyze data from different points of view and levels (aggregations).
    In OBIEE you set a relational "database" in the physical layer buy joining (in general) your fact tables with your dimension tables
    In BMM, you actually create and link those dimensions into a hierarchical format. This is, you have a dimension table, and you liked the different fields in the table to create a hierarchy that will later give you a great functionality.
    I hope this helps.
    J.

Maybe you are looking for

  • CRM RELATED BI REPORTS

    Hi, Please tell what are the standard BI Reports & infosets available for 1.Marketing 2.SALES 3.SERVICE 4.CIC Regards, Natasha P

  • Cant Download TV show that I have a subscription to

    I have been trying to download a TV show that I have a season pass for. The first 2 episodes went smoothly over the last 2 weeks, but the third one is not showing up in itunes. I think it downloaded, but then gave an error message, so I believe that

  • ITunes won't open or recognize iPod Touch 2nd gen

    So I have Windows 7 starter on my netbook and iTunes 9. I tried to open iTunes without my iPod plugged in and it wont open. I plugged my iPod Touch in and it charges but the computer says its a digital camera. Will not pop up iTunes.

  • Id CS6 suddenly crashes . . .

    All of a sudden my Id CS6 is crashes every time I try to place a .txt file into a new file. Any suggestions?

  • NEW VOICEMAIL notification stays on

    One the voicemail has been heard and deleted the icon on the phone should disappear (like it does on the S3 etc). By staying on it leads you to think you have another one.