OpenGL math class thats in Arch repositories / AUR?

Hey,
Doing a university project on Arch (actually larch, because it has to be portable to other computers..)
Anyone knows of a good OpenGL math class (C++) thats in the repositories / AUR?
That math class should have an API as similar to OpenGL's as possible.
My goal is to do matrix manipulations out side of OpenGL (glRotate, glTranslate etc. - but BEFORE giving the matrix to OpenGL).
Thanks a lot
fiod

http://www.archlinux.org/packages/extra/any/eigen/
http://www.archlinux.org/packages/extra/i686/lapack/
http://aur.archlinux.org/packages.php?ID=26875
Choose your poison.

Similar Messages

  • Trig functions in the Math class

    One of the techniques suggested to master for the Java Programmer exam is using the trigonometry methods in the Math class. Does that mean that on the exam I would need a trigonometry knowledge or is it enough to be familiar with their signature ?

    No trig knowledge - just questions on the Java language, including method signatures. Check out the various mock exams such as at http://www.javaranch.com/certfaq.jsp

  • Why Math class does not have any constructor.

    Math class does not have any constructor.
    But all the classes have a default constructor. Then why the math class is not having any constructor. Is math class having some other constructor or is the default constructor concept applicable only for user defined classes.

    Math class does not have any constructor.
    But all the classes have a default constructor. Then
    why the math class is not having any constructor. Is
    math class having some other constructor or is the
    default constructor concept applicable only for user
    defined classes.You cannot instantiate a new Math object, nor can you extend the Math class. All you can do is use Math's static methods and variables. Its a utility class, thats what its susposed to do.
    JJ

  • Speed of the Math class

    If I am performing a lot of calculations is it best to use a Math class function or write it yourself (best in terms of speed not accuracy).
    e.g. Math.pow(a-b,2) OR (a-b) * (a-b)
    I am grateful for any opinions.

    Your version would allow the compiler to use the fact that the expression is completely knowable at compilation time, providing for a trivial solution for the in-line multiplication approach.
    The version below avoids thatpublic class Test {
        public static void main(String[] args) {
            long start = 0;
            long end = 0;
            long powtime = 0;
            long multtime = 0;
            double x = Double.parseDouble(args[0]);
            double y = Double.parseDouble(args[1]);
            System.out.println("Starting the pow test.");
            start = System.currentTimeMillis();
            for (int i = 0; i < 10000000; i++) {
                double value = (x - y) * (x - y);
            end = System.currentTimeMillis();
            multtime = end - start;
            System.out.println(
                "By using multiplication it took: " + ((double) multtime / 1000) + " seconds.");
            start = System.currentTimeMillis();
            for (int j = 0; j < 10000000; j++) {
                double value = Math.pow((x - y), 2);
            end = System.currentTimeMillis();
            powtime = end - start;
            System.out.println(
                "By using Math.pow() it took: " + ((double) powtime / 1000) + " seconds.");
    }With this I get a 6:1 (1.272 to 0.200) ratio of Math.pow() to inline multiplication time. Still a fairly large ratio.
    Playing with double, int and using increasing larger values of the exponent, the Math.pow() seems to be far slower that multiplication. Of course Math.pow() can handle complex exponents (2.3645463) and take roots while the simple multiplication approach cannot.
    Chuck

  • Extending Math class

    As I understand, in actionscript 2 you could extend flash's Math class to add your own functions, but this is no longer possible in actionscript 3.  I want to add a mod() function to the Math class, and I'm assuming I have to write a wrapper class to accomplish this.  How do I import the existing Math class into my MathPlus or whatever class?  Also, is there anything else I should know about this?

    Thanks for the replies (very good to know about %).  The only reason I would prefer to extend Math or build a wrapper around it is if I were to write a sufficient number of additions such that trying to remember which were in Math and which were in my custom class became difficult.  I just think it would be nice to have access to all of my (and Flash's) math related code within one class.
    It just occurs to me that I just need to make functions in my class that call the ones in Math.

  • Question about Math Class

    I have a couple of Java questions I was wondering if anyone could answer:
    1). In this one statement, which takes the greatest common denominator and places it in the variable commom:
    int common = gcd (Math.abs(numerator), denominator);
    A).What is gcd? I looked it up and it's not a reserved word in the math class. In the class that this statement comes from there is no variable, object, or method named gcd. There is also no gcd variable, object, or invoked method in the client code that uses the class that this statement comes from.
    B ). I know that abs is a method of the math class for the absolute value of a number(in this case the number inside the variable numerator.). And I know that when the abs method is invoked it sends the variable 'numerator' as the parameter for the data to take the absolute value of. What I don't understand is the syntax of this statement in regards to how you can take the absolute value of the variable 'denominator' haveing a variable 'numerator' inclosed in the parenthesis and simpley adding a comma to include the variable 'denominator' in the argument to be sent in the invocation of the abs method. It seems like this would be the correct syntax:
    int common = (Math.abs(numerator))/(Math.abs(denominator));
    Can anyone explain the 'int common = gcd (Math.abs(numerator), denominator);'
    statement?
    Thanks,
    -dman

    > A).What is gcd?
    As already been said: it's the Greatest Common Divider.
    Example: fraction 9/24, then gcd(9, 24) == 3.
    >It seems like this would be the correct syntax:
    int common = (Math.abs(numerator))/(Math.abs(denominator));
    Probably the gcd(...) method is used to normalize a fraction whose denominator is always positive. If the fraction is smaller then zero, the numerator is negative. And to caculate the Greatest Common Divider of two numbers, the gcd(...) method needs two positive arguments.
    Google for "Euclid GCD algorithm".

  • Using java math class  for power's SQ rt and rounding.

    Hey all
    ive attempted to use maths class to create a program a user can enter a number and then the output shows
    The number rounded to the nearest integer
    The Square root of the number
    and finaly the number to the power of 6
    So far i have the following code but im a bit thick to what im missing ....
    import java.util.*;
    public class Mathclass
         public static void main(String[] args)
         Scanner kybd = new Scanner(System.in);
         double num = kybd.nextInt(); // kybd is an instance of Scanner
         public static double ceil (double num);
         public static double sqrt (double num);
         public static double exp (double num);
    }}Please be kind i know the outputs arnt there yet but im getting 15 errors in javac
    Thankyou

    Javaman01 wrote:
    i can understand that you feel this way , i just have a lot of programs i need to complete for a portfolio tommorow , so i need all the help i can get.Well, then I guess you started too late. Talk to your teacher that you won't be able to get it done on your own. Start learning your course book or the basic tutorials I posted and try to do the assignments again. I really think you know too little to get this done.
    Javaman01 wrote:
    if you wish not to help the please dont comment as i fear this will put others of helping me when i need it most.I did help you! And you have nothing to say about me posting here or not. Just as I can't stop you from trying to get others to do your homework.
    Javaman01 wrote:
    thankyouYou're welcome.

  • Accessing the ServletContext from a class that is not a Servlet?

    Is there any way of accessing the ServletContext from a class that is not a
              Servlet? The class is being used as part of a Web Application.
              Thanks.
              

    http://www.mozilla.org/mirrors.html
    Mozilla has download mirrors around the globe. If it is on the list, it is trustworthy.

  • Java ME SDK 3.0 Math Class

    Using Eclipse and Java ME SDK 3.0
    When the Application Descriptor configuration is set to use DefaultCldcPhone1 or other emulators in the Java ME SDK 3.0 many of the Math class methods such as Math.sqrt(double arg0) are not available. However if I change the configuration to use a Nokia emulator all the Math class methods become available.
    This issue has just shown up since moving from WTK25 to Java ME SDK 3.0
    Note:
    Under Eclipse/Preferences/Java ME/Device Management the Configuration of all the emulators from the Java ME SDK 3.0 is listed as CLDC-1.0 whereas the other emulators from Nokia and from the Sun Java Wireless Toolkit 2.5 are listed as CLDC-1.1.

    It is related to the configuration of the emulator (CLDC 1.0 or CLDC 1.1)...
    If the configuration is CLDC 1.0 all the floating point data types (float, double, Float, Double) will not be available...
    If you change the configuration to CLDC1.1 , then all the previous types will be available.
    PS: I don't know how to do this in EclipseME

  • Is that possible to add a listener to a class that bind with a image?

    Hello, I am trying to add listener to a class that binds with image.  For example, I want to add listener to customDividerSkin(see example below, i bold and underline the text), so when user click the customdividerSkin image haloGreen box will be hided. Thanks,
    <?xml version="1.0" encoding="utf-8"?>
    <!-- http://blog.flexexamples.com/2008/09/18/customizing-the-divider-skin-on-a-dividedbox-conta iner-in-flex/ -->
    <mx:Application name="HDividedBox_dividerSkin_test"
    xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical"
    verticalAlign="middle"
    backgroundColor="white"
    initialize="init();">
    <mx:Script>
    <![CDATA[
    [Embed("arrowLeft.png")]
    private const customDividerSkin:Class;
    private function init():void
    dividedBox.setStyle("dividerSkin", customDividerSkin);
    ]]>
    </mx:Script>
    <mx:HDividedBox id="dividedBox"
    horizontalGap="24"
    width="100%"
    height="100%">
    <mx:ViewStack id="AddFormViewStack"
      width="100%"
      height="100%">
    <mx:Box id="box1"
    backgroundColor="haloGreen"
    width="100%"
    height="100%"
    minWidth="100"/>
    <mx:Box id="box2"
    backgroundColor="haloBlue"
    width="100%"
    height="100%"
    minWidth="100"/>
    </mx:ViewStack>
    </mx:HDividedBox>
    </mx:Application>

    Set the class as the source for an mx:Image and set the listener to the  Image

  • [svn:fx-trunk] 16929: Add a [Mixin] class that will register the required class aliases in the event the mxml compiler generation   [RemoteClass(alias="")] code is not called because an application does not use the Flex UI framework .

    Revision: 16929
    Revision: 16929
    Author:   [email protected]
    Date:     2010-07-15 07:38:44 -0700 (Thu, 15 Jul 2010)
    Log Message:
    Add a class that will register the required class aliases in the event the mxml compiler generation  [RemoteClass(alias="")] code is not called because an application does not use the Flex UI framework.
    Add a reference to this class in the RPCClasses file so it always gets loaded.
    QE notes: Need a remoting and messaging regression test that doesn't use Flex UI.
    Bugs: Watson bug 2638788
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/RPCClasses.as
    Added Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/RpcClassAliasInitializer.as

    Great exercise to document the problem like this.  It got me thinking about how an app with modules would be different from an app that does not use modules.  Solution: I moved the dummy reference of PersonPhotoView out to the main application file (as opposed to being inside the module) and it worked.  I've probably been lucky not to have experienced this problem earlier, because for most other entities I have an instance attached to my model which is linked / compiled with the main application.

  • Why does my web service web.xml reference a class that is not a servlet?

    In jDeveloper 10.1.3, I created the simplest web service I could think of. I created a HelloWorld class that has one method that accepts a name as a parameter and returns "Hello " + name. Using the wizards, I was able to get it to run just fine in my development environment. However, if I generate a WAR file and deploy it to Tomcat 5.5, it chokes on the web.xml. Here it is...
    <pre>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <servlet>
    <description>Web Service MyHelloWorldServiceSoapHttpPort</description>
    <display-name>Web Service MyHelloWorldServiceSoapHttpPort</display-name>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <servlet-class>com.dex.b2b.HelloWorld</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <url-pattern>MyHelloWorldServiceSoapHttpPort</url-pattern>
    </servlet-mapping>
    </web-app>
    </pre>
    The servlet-class value is my simple HelloWorld class, not a servlet. How is this suppose to run, if the servlet-class value is not a servlet? It certainly did not run in Tomcat 5.5. I can't get it to run on Oracle App Server 10.1.2 either.
    Thanks

    Hi fellrunningpictures-
    Picasa web albums shows you that message because they are not fully compatible with the latest version of Firefox. I would recommend contacting Picasa to encourage them to become fully compatible. I found a link for contacting them here:
    * [http://support.google.com/picasa/?hl=en http://support.google.com/picasa/?hl=en]
    Hope that helps.

  • Cannot compile two classes that are on same package

    When I compile two classes that are on same package one class that is independent of other class gets compiled but the other class which uses
    the first one shows cannot find symbol error with the first class name

    try...
    javac *.java
    that should compile all the java files in that folder at the same time. I dont know if that will fix your problem but it is worth a shot.

  • Importing a class that is stored online

    I hope this is the right forum... appologies if not.
    I am wondering how to access classes that are stored on the internet.
    I own the domain www.l4eclan.com. I created a package (I think) of classes on it, but I can't figure out how to access the classes in that package.
    The url of the package is located at:
    Code:
    http://www.l4eclan.com/minion
    Right now, there are 2 files in it: alignment.java and alignment.class. Each has "package minion;" at the top of it.
    I tried accessing the class with "import com.l4eclan.minion.*;" and "import com.l4eclan.*;" but neither worked.
    Can anyone tell me what I am doing wrong?

    So it's not possible for Java to read classes that
    aren't stored on the local machine?Not with the import statement.
    The whole point of this program is to read classes
    stored in that directory on the internet... not to
    read them from the local machine.Then you have a problem.

  • Pass variable name to class that modifies it

    in my main fla:
    import Preloader;
    var prel:Preloader = new Preloader();
    var toPass=9;
    prel.loads(this,stage,"toPass",2);
    in my Preloader.as:
    package  {
              import flash.display.Sprite;
              import flash.display.Stage;
              import flash.events.Event;
         public class Preloader extends Sprite {
              private var stageRef:Stage;
              private var mainTimeLineRef:*;
              public function loads(a,b,c,d):void{
                   this[c]=d
    I want to pass the toPass var to my class that has to edit that, how can i do?  (i know that i could simply write toPass = d)

    i'm not sure what you're trying to do but to pass a variable's value, use:
    framode wrote:
    in my main fla:
    import Preloader;
    var prel:Preloader = new Preloader();
    var toPass:int=9;
    prel.loads(stage,toPass);
    in my Preloader.as:
    package  {
              import flash.display.Sprite;
              import flash.display.Stage;
              import flash.events.Event;
         public class Preloader extends Sprite {
              private var stageRef:Stage;
              private var mainTimeLineRef:*;
    private var toPassRef:int;
              public function loads(a:Stage,b:int):void{
    stageRef=a;
                 toPassRef=b;

Maybe you are looking for