summaryrefslogtreecommitdiffstats
path: root/src/gleem/linalg/IntersectionPoint.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleem/linalg/IntersectionPoint.java')
-rw-r--r--src/gleem/linalg/IntersectionPoint.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/gleem/linalg/IntersectionPoint.java b/src/gleem/linalg/IntersectionPoint.java
new file mode 100644
index 0000000..486be06
--- /dev/null
+++ b/src/gleem/linalg/IntersectionPoint.java
@@ -0,0 +1,63 @@
+/*
+ * gleem -- OpenGL Extremely Easy-To-Use Manipulators.
+ * Copyright (C) 1998-2003 Kenneth B. Russell ([email protected])
+ *
+ * Copying, distribution and use of this software in source and binary
+ * forms, with or without modification, is permitted provided that the
+ * following conditions are met:
+ *
+ * Distributions of source code must reproduce the copyright notice,
+ * this list of conditions and the following disclaimer in the source
+ * code header files; and Distributions of binary code must reproduce
+ * the copyright notice, this list of conditions and the following
+ * disclaimer in the documentation, Read me file, license file and/or
+ * other materials provided with the software distribution.
+ *
+ * The names of Sun Microsystems, Inc. ("Sun") and/or the copyright
+ * holder may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS," WITHOUT A WARRANTY OF ANY
+ * KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, NON-INTERFERENCE, ACCURACY OF
+ * INFORMATIONAL CONTENT OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. THE
+ * COPYRIGHT HOLDER, SUN AND SUN'S LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL THE
+ * COPYRIGHT HOLDER, SUN OR SUN'S LICENSORS BE LIABLE FOR ANY LOST
+ * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
+ * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
+ * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
+ * INABILITY TO USE THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGES. YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT
+ * DESIGNED, LICENSED OR INTENDED FOR USE IN THE DESIGN, CONSTRUCTION,
+ * OPERATION OR MAINTENANCE OF ANY NUCLEAR FACILITY. THE COPYRIGHT
+ * HOLDER, SUN AND SUN'S LICENSORS DISCLAIM ANY EXPRESS OR IMPLIED
+ * WARRANTY OF FITNESS FOR SUCH USES.
+ */
+
+package gleem.linalg;
+
+/** Wraps a 3D point and parametric time value. */
+
+public class IntersectionPoint {
+ private Vec3f intPt = new Vec3f();
+ private float t;
+
+ public Vec3f getIntersectionPoint() {
+ return intPt;
+ }
+
+ public void setIntersectionPoint(Vec3f newPt) {
+ intPt.set(newPt);
+ }
+
+ public float getT() {
+ return t;
+ }
+
+ public void setT(float t) {
+ this.t = t;
+ }
+}
ref='#n190'>190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873
<?xml version="1.0" encoding="UTF-8"?>
<!--
   - Ant build for the NativeWindow package.  This build has been tested with ANT 1.7.0.  The
   - optional.jar that contains the optional ANT tasks must be in the ANT
   - classpath (typically the ant/lib directory).
   -
   - A clean download of the NativeWindow sources is required for this build.
   -
   - This build has no dependence on environment variables; the needed
   - ones (e.g. java.home, ANT_HOME) are all set by the Ant wrapper shell
   - script, by the virtual machine, or elsewhere. However, on all platforms,
   - the C compiler and linker should be in the path. All other paths that
   - need to be set are in host.properties.
   -
   - NOTE:  because the GlueGen config files have their own relative paths
   -        which cannot be overridden by GlueGen, GlueGen MUST be run from
   -        the "make" directory. This also means that this build.xml MUST
   -        be run from the "make" directory.
   -
   - Public targets:
   -   all: (default; autodetects OS and chooses C compiler from gluegen.properties)
   -   clean:        clean all built
   -   javadoc:      create the standard developer Javadoc (recommended)
   -                 (Note: should build all first - may be dependence in the future)
   -   javadoc.spec: create the standard developer Javadoc but exclude com.sun.* classes
   -   javadoc.dev:  create the internal developer Javadoc.  This includes the
   -                       Java and C file generators. Note that it is only supported
   -                       to create the Javadoc for the platform on which you are
   -                       currently running.
   - 
   - Note: on Windows the "win32.c.compiler" property in gluegen.properties
   - is required to select the appropriate C compiler. See the example
   - gluegen.properties in the gluegen workspace for valid values. On Mac OS X
   - universal binaries may also be built by setting the "macosxfat"
   - property in gluegen.properties; again see the example file in this
   - directory.
   -   
   - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
   - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
   - the Java generated sources, the first and second phase Java compiles, and
   - the building of the jar file. Thanks to Alex Radeski for the bulk of the
   - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
   - the original OS detection code.
   -
   - Some environment defs affecting compilation

   - setup.nodesktop is set iff:
        !isWindows && !isOSX && !isX11

   - Internal settings, may not be necessary to set them manually,
     since all JAR archives are orthogonal.
       setup.noAWT
   -->
<project name="NativeWindow" basedir="." default="all">

  <import file="build-common.xml"/>

    <!-- ================================================================== -->
    <!-- 
       - Base initialization and detection of operating system.
      -->
    <target name="base.init" depends="common.init">

        <condition property="setup.noNativeAWT">
            <or>
                <isset property="setup.noAWT"/> 
                <isset property="setup.nodesktop"/> 
            </or>
        </condition>

        <echo message="setup.noNativeAWT: ${setup.noNativeAWT}" />

        <!-- partitioning -->

        <property name="java.part.core"
                  value="javax/media/nativewindow/*, javax/media/nativewindow/egl/*, javax/media/nativewindow/macosx/*, javax/media/nativewindow/windows/*, com/jogamp/nativewindow/util/*, com/jogamp/nativewindow/impl/*, com/jogamp/nativewindow/impl/jvm/*"/>

        <property name="java.part.awt"
                  value="javax/media/nativewindow/awt/*, com/jogamp/nativewindow/impl/jawt/**, com/jogamp/nativewindow/impl/**/awt/**"/>

        <property name="java.part.x11"
                  value="com/jogamp/nativewindow/impl/x11/** javax/media/nativewindow/x11/*" />

        <!-- condition excludes -->

        <condition property="java.excludes.awt"
                   value="${java.part.awt}">
           <isset property="setup.noAWT"/> 
        </condition>

        <property name="java.excludes.all" value="${java.excludes.awt}" />
        <echo message="java.excludes.all: ${java.excludes.all}" />
    </target>


    <!-- ================================================================== -->
    <!-- 
       - Declare all paths and user defined variables.
      -->
    <target name="declare.common" description="Declare properties" depends="base.init">

        <property name="config.nativewindow" value="${config}/nativewindow" />

        <property name="rootrel.src" value="src/nativewindow" />
        <property name="rootrel.src.java" value="${rootrel.src}/classes" />
        <property name="rootrel.src.c" value="${rootrel.src}/native" />

        <property name="rootrel.src.generated" value="${rootrel.build}/nativewindow/gensrc" />
        <property name="rootrel.generated.c" value="${rootrel.src.generated}/native" />

        <!-- The source directories. -->
        <property name="src.java" value="${project.root}/${rootrel.src.java}" />
        <property name="src.c"    value="${project.root}/${rootrel.src.c}" />
        
        <!-- The generated source directories. -->
        <property name="src.generated" value="${build.nativewindow}/gensrc" />
        <property name="src.generated.java" value="${src.generated}/classes" />
        <property name="src.generated.java-cdc" value="${src.generated}/classes-cdc" />
        <property name="src.generated.c" value="${src.generated}/native" />
        
        <!-- The compiler output directories. -->
        <property name="classes" value="${build.nativewindow}/classes" />
        <property name="classes-cdc" value="${build.nativewindow}/classes-cdc" />

        <!-- The headers from which Java files are generated -->
        <dirset id="stub.includes.fileset.all" dir=".">
            <include name="${stub.includes}/macosx/**" />
            <include name="${stub.includes}/win32/**" />
            <include name="${stub.includes}/x11/**" />
            <include name="${stub.includes}/common/**" />
            <include name="${stub.includes}/jni/**" />
        </dirset>
        <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}">
            <include name="macosx/**" />
            <include name="win32/**" />
            <include name="x11/**" />
            <include name="common/**" />
            <include name="jni/**" />
        </fileset>
        <fileset id="stub.includes.dependencies.fileset.2" file="${gluegen.jar}" />
        <fileset id="stub.includes.dependencies.fileset.3" dir="${config.nativewindow}">
            <include name="*.cfg" />
            <include name="*.java" />
            <include name="*.c" />
        </fileset>

        <!-- The javadoc dirs. -->
        <property name="javadoc" value="${project.root}/javadoc_nativewindow_public" />
        <property name="javadoc.spec" value="${project.root}/javadoc_nativewindow_spec" />
        <property name="javadoc.dev" value="${project.root}/javadoc_nativewindow_dev" />
        <property name="javadoc.link" value="http://java.sun.com/j2se/1.4.2/docs/api/" />
        <property name="javadoc.windowtitle" value="Native Windowing Interface (NativeWindow) API -- ${nativewindow_base_version} Specification" />
        <property name="javadoc.overview" value="../src/nativewindow/classes/javax/media/nativewindow/package.html" />
        <property name="javadoc.spec.packagenames" value="javax.media.nativewindow.*" />

        <property name="javadoc.packagenames" value="${javadoc.spec.packagenames}" />

        <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},com.jogamp.nativewindow.util.*,com.jogamp.nativewindow.impl.*,com.sun.gluegen,com.jogamp.gluegen.runtime" />
    <property name="javadoc.bottom" value="Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to &lt;a href=&quot;http://jcp.org/en/jsr/detail?id=231&quot;&gt;license terms&lt;/a&gt;." />
    </target>
    
    <!-- ================================================================== -->
    <!-- 
       - Initialize all parameters required for the build and create any
       - required directories.
      -->
    <target name="init" depends="declare.common">
        <!-- Create the required output directories. -->
        <mkdir dir="${src.generated.java}" />
        <mkdir dir="${src.generated.java-cdc}" />
        <mkdir dir="${src.generated.c}" />
        <mkdir dir="${src.generated.c}/MacOSX" />
        <mkdir dir="${src.generated.c}/Windows" />
        <mkdir dir="${src.generated.c}/X11" />
        <mkdir dir="${classes}" />
        <mkdir dir="${classes-cdc}" />
        <mkdir dir="${obj.nativewindow}" />
    </target>

    <!--
       - Check to see whether we need to rebuild the generated sources.
      -->
    <target name="java.generate.check">
        <!-- Blow away all target files if any dependencies are violated
             (the uptodate task doesn't allow arbitrary source and target filesets but should) -->
             <!--
        <dependset>
            <srcfileset refid="stub.includes.dependencies.fileset.1" />
            <srcfileset refid="stub.includes.dependencies.fileset.2" />
            <srcfileset refid="stub.includes.dependencies.fileset.3" />
            <targetfileset dir="${src.generated}">
                <include name="**/*.java" />
                <include name="**/*.c" />
            </targetfileset>
        </dependset>
        -->

        <!-- Now check for the presence of one well-known file -->
        <uptodate property="java.generate.skip.x11windowlib"
                  targetfile="${src.generated.java}/com/jogamp/nativewindow/impl/x11/X11Lib.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>
        <uptodate property="java.generate.skip.jawt"
                  targetfile="${src.generated.java}/com/jogamp/nativewindow/impl/jawt/JAWT.java">
            <srcfiles refid="stub.includes.dependencies.fileset.1" />
            <srcfiles refid="stub.includes.dependencies.fileset.2" />
            <srcfiles refid="stub.includes.dependencies.fileset.3" />
        </uptodate>

        <condition property="java.generate.skip">
          <and>
              <isset property="java.generate.skip.x11windowlib"/>
              <isset property="java.generate.skip.jawt"/>
          </and>
        </condition>

        <!--property name="java.generate.skip" value="true"/-->
    </target>

    <target name="java.generate.windowlib" if="windowlib.os.cfg">
        <echo message="Generating Windowing Lib implementation class" />
        <gluegen src="${stub.includes}/${window.os.system}/window-lib.c"
                 outputRootDir="${build.nativewindow}"
                 config="${windowlib.os.cfg}"
                 includeRefid="stub.includes.fileset.platform"
                 emitter="com.sun.gluegen.JavaEmitter">
            <classpath refid="gluegen.classpath" />
        </gluegen>
        <copy todir="${src.generated.java-cdc}">
            <fileset dir="${src.generated.java}"
                     includes="com/jogamp/nativewindow/impl/x11/**" />
        </copy>
    </target>

    <target name="java.generate.jawt" unless="setup.noAWT">
        <!-- NOTE:  the "literalInclude" in this GlueGen call is simply to
           -        get around the fact that neither FileSet nor DirSet can