Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Vector3d with floating values.

Vector3d with floating values.

Scheduled Pinned Locked Moved Java
question
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    002comp
    wrote on last edited by
    #1

    Hello Friends I am in a very critical situation.I am having some float values and the the method I am using to scale is setScale that accepts only vector3d(int,int,int).So how can i create vector3d by using float values.Or is there any other way to create vector3d with flaoting values? Thanks & Regards Yogesh

    C A 2 Replies Last reply
    0
    • 0 002comp

      Hello Friends I am in a very critical situation.I am having some float values and the the method I am using to scale is setScale that accepts only vector3d(int,int,int).So how can i create vector3d by using float values.Or is there any other way to create vector3d with flaoting values? Thanks & Regards Yogesh

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      As usual, your question is so vague that it is almost imposible to give an accurate reply. You should really try to give much more information about the context of your question. Here, we don't have any clue what you might be talking about (unless by guessing)... From which "library" is this vector3d class coming from ? Why are you using float values if you need to express positions in integers and not in float values ? From where are those float values coming from ? etc...

      Cédric Moonen Software developer
      Charting control [v3.0] OpenGL game tutorial in C++

      0 1 Reply Last reply
      0
      • C Cedric Moonen

        As usual, your question is so vague that it is almost imposible to give an accurate reply. You should really try to give much more information about the context of your question. Here, we don't have any clue what you might be talking about (unless by guessing)... From which "library" is this vector3d class coming from ? Why are you using float values if you need to express positions in integers and not in float values ? From where are those float values coming from ? etc...

        Cédric Moonen Software developer
        Charting control [v3.0] OpenGL game tutorial in C++

        0 Offline
        0 Offline
        002comp
        wrote on last edited by
        #3

        Hello Cedric I am sorry If my questions are too much vague for you but I try my best to explain from myside.I guess you might be some senior member here so I respect you.Is that reason that some of mine last questions were not answered by anyone? Actually,I got the answer to my question .but Anyway I will Explain you more in details.vector3d is from java3d Library.And I am getting float values some obj file format.Ans setScale is function of Transform3d.And SetScale are of types, one accepts float and other accepts vector3d.I was getting flaot values so my question was how to create a vector3d from flaot values. But It solved After more googling. AnyWay,I appreciate for your valuable time in my thread and even for answering to me .:rose: Thanks Once Again Regards Yogesh Sikri

        N 1 Reply Last reply
        0
        • 0 002comp

          Hello Cedric I am sorry If my questions are too much vague for you but I try my best to explain from myside.I guess you might be some senior member here so I respect you.Is that reason that some of mine last questions were not answered by anyone? Actually,I got the answer to my question .but Anyway I will Explain you more in details.vector3d is from java3d Library.And I am getting float values some obj file format.Ans setScale is function of Transform3d.And SetScale are of types, one accepts float and other accepts vector3d.I was getting flaot values so my question was how to create a vector3d from flaot values. But It solved After more googling. AnyWay,I appreciate for your valuable time in my thread and even for answering to me .:rose: Thanks Once Again Regards Yogesh Sikri

          N Offline
          N Offline
          Nagy Vilmos
          wrote on last edited by
          #4

          yogeshs wrote:

          But It solved After more googling

          Maybe, just maybe, you should try google BEFORE cp.


          Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H

          1 Reply Last reply
          0
          • 0 002comp

            Hello Friends I am in a very critical situation.I am having some float values and the the method I am using to scale is setScale that accepts only vector3d(int,int,int).So how can i create vector3d by using float values.Or is there any other way to create vector3d with flaoting values? Thanks & Regards Yogesh

            A Offline
            A Offline
            Arun Reginald Zaheeruddin
            wrote on last edited by
            #5

            It seems like you are trying to use a Java library for 3D programming. If that is the case, then there would most definitely be a class called FastMath in a package called math somewhere. You can use the FastMath.round(...) method within that class to convert the float values to an int without much overhead. This will enable you to then pass those values to the Vector3D class. Hope this helps. I would have been of further help if I only knew what libraries you were using.


            The beginning of knowledge is the fear of God

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups