01: /*
02: * $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/utils/vpbehaviors/SimpleSweptVolume.java,v 1.1 2005/04/20 21:05:14 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is Java 3D(tm) Fly Through.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dfly.utils.vpbehaviors;
19:
20: import javax.vecmath.Vector3f;
21:
22: /**
23: * The simplest Collision Swept Volume consisting of a single ray cast
24: * from the eye in each direction
25: *
26: * @author Paul Byrne
27: * @version 1.5, 01/18/02
28: */
29: public class SimpleSweptVolume extends SweptVolume {
30:
31: /** Creates new SimpleSweptVolume */
32: public SimpleSweptVolume() {
33: frontRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
34: new Vector3f(0f, 0f, -1f) };
35: backRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
36: new Vector3f(0f, 0f, 1f) };
37: leftRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
38: new Vector3f(-1f, 0f, 0f) };
39: rightRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
40: new Vector3f(1f, 0f, 0f) };
41: upRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
42: new Vector3f(0f, 1f, 0f) };
43: downRays = new Vector3f[] { new Vector3f(0f, 0f, 0f),
44: new Vector3f(0f, -1f, 0f) };
45: }
46:
47: }
|