aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-26 00:48:41 +0000
committerSven Gothel <[email protected]>2008-06-26 00:48:41 +0000
commitb6876ba534aaae7b327b2c8684b9878a2581e7e9 (patch)
tree368ac8b5415987185729617344c005c0a5bf10a4 /src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java
parentf9773698c3950b758d591ef5e9cb9210d0f491dd (diff)
re-adding accidently removed files
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1687 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java160
1 files changed, 160 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java b/src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java
new file mode 100755
index 000000000..fed301895
--- /dev/null
+++ b/src/classes/com/sun/opengl/impl/glu/nurbs/CArrayOfQuiltspecs.java
@@ -0,0 +1,160 @@
+package com.sun.opengl.impl.glu.nurbs;
+
+/**
+ * Class replacing C language pointer
+ *
+ * @author Tomas Hrasky
+ *
+ */
+public class CArrayOfQuiltspecs {
+ /**
+ * Underlaying array
+ */
+ private Quiltspec[] array;
+
+ /**
+ * Pointer to array member
+ */
+ private int pointer;
+
+ /**
+ * Makes new CArray
+ *
+ * @param array
+ * underlaying array
+ * @param pointer
+ * pointer (index) to array
+ */
+ public CArrayOfQuiltspecs(Quiltspec[] array, int pointer) {
+ this.array = array;
+ this.pointer = pointer;
+ }
+
+ /**
+ * Makes new CArray from other CArray
+ *
+ * @param carray
+ * reference array
+ */
+ public CArrayOfQuiltspecs(CArrayOfQuiltspecs carray) {
+ this.array = carray.array;
+ this.pointer = carray.pointer;
+ }
+
+ /**
+ * Makes new CArray with pointer set to 0
+ *
+ * @param array
+ * underlaying array
+ */
+ public CArrayOfQuiltspecs(Quiltspec[] array) {
+ this.array = array;
+ this.pointer = 0;
+ }
+
+ /**
+ * Returns element at pointer
+ *
+ * @return element at pointer
+ */
+ public Quiltspec get() {
+ return array[pointer];
+ }
+
+ /**
+ * Increases pointer by one (++)
+ */
+ public void pp() {
+ pointer++;
+ }
+
+ /**
+ * Sets element at pointer
+ *
+ * @param f
+ * desired value
+ */
+ public void set(Quiltspec f) {
+ array[pointer] = f;
+
+ }
+
+ /**
+ * Returns array element at specified index
+ *
+ * @param i
+ * array index
+ * @return element at index
+ */
+ public Quiltspec get(int i) {
+ return array[i];
+ }
+
+ /**
+ * Lessens pointer by value
+ *
+ * @param i
+ * lessen by
+ */
+ public void lessenPointerBy(int i) {
+ pointer -= i;
+
+ }
+
+ /**
+ * Returns pointer value
+ *
+ * @return pointer value
+ */
+ public int getPointer() {
+ return pointer;
+ }
+
+ /**
+ * Sets ponter value
+ *
+ * @param pointer
+ * pointer value to be set
+ */
+ public void setPointer(int pointer) {
+ this.pointer = pointer;
+ }
+
+ /**
+ * Raises pointer by value
+ *
+ * @param i
+ * raise by
+ */
+ public void raisePointerBy(int i) {
+ pointer += i;
+
+ }
+
+ /**
+ * Lessens ponter by one (--)
+ */
+ public void mm() {
+ pointer--;
+
+ }
+
+ /**
+ * Returns underlaying array
+ *
+ * @return underlaying array
+ */
+ public Quiltspec[] getArray() {
+ return array;
+ }
+
+ /**
+ * Sets underlaying array
+ *
+ * @param array
+ * underlaying array
+ */
+ public void setArray(Quiltspec[] array) {
+ this.array = array;
+ }
+}