示例#1
0
 /**
  * Erzeugt eine neue Vektor-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand der Vektors kann korrupt sein!
  *
  * @param centerX Die Position (X-Komponente)
  * @param centerY Die Position (Y-Komponente)
  * @param centerZ Die Position (Z-Komponente)
  * @param extentX Der Maximalvektor (X-Komponente)
  * @param extentY Der Maximalvektor (Y-Komponente)
  * @param extentZ Der Maximalvektor (Z-Komponente)
  * @return Der neue oder aufbereitete Vektor
  * @see #Cache
  */
 @NotNull
 public static AxisAlignedBox createNew(
     final float centerX,
     final float centerY,
     final float centerZ,
     final float extentX,
     final float extentY,
     final float extentZ) {
   return Cache.getOrCreate().set(centerX, centerY, centerZ, extentX, extentY, extentZ);
 }
示例#2
0
 /**
  * Erzeugt eine neue Ray-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand des Rays kann korrupt sein!
  *
  * @param originX Der Ursprung (X-Komponente)
  * @param originY Der Ursprung (Y-Komponente)
  * @param originZ Der Ursprung (Z-Komponente)
  * @param directionX Die RiprojectPoint(X-Komponente)
  * @param directionY Die Richtung (Y-Komponente)
  * @param directionZ Die Richtung (Z-Komponente)
  * @return Der neue oder aufbereitete Vektor
  * @see #Cache
  */
 @NotNull
 public static Ray3 createNew(
     final float originX,
     final float originY,
     final float originZ,
     final float directionX,
     final float directionY,
     final float directionZ) {
   return Cache.getOrCreate().set(originX, originY, originZ, directionX, directionY, directionZ);
 }
示例#3
0
 /**
  * Recyclet einen Ray
  *
  * @param box Der zu recyclende Ray
  * @see #Cache
  * @see AxisAlignedBox#recycle()
  */
 public static void recycle(@NotNull final Ray3 box) {
   Cache.registerElement(box);
 }
示例#4
0
 /**
  * Erzeugt eine neue {@link Ray3}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand kann korrupt sein!
  *
  * @return Der neue oder aufbereitete Ray
  * @see #Cache
  */
 @NotNull
 public static Ray3 createNew() {
   return Cache.getOrCreate();
 }
示例#5
0
 /**
  * Erzeugt eine neue {@link Ray3}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand kann korrupt sein!
  *
  * @param other Der zu kopierende Ray
  * @return Der neue oder aufbereitete Ray
  * @see #Cache
  */
 public static Ray3 createNew(@NotNull final Ray3 other) {
   return Cache.getOrCreate().set(other);
 }
示例#6
0
 /**
  * Erzeugt eine neue {@link Ray3}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand kann korrupt sein!
  *
  * @param origin Der Ursprung
  * @param direction Die Richtung
  * @return Der neue oder aufbereitete Ray
  * @see #Cache
  */
 public static Ray3 createNew(@NotNull final Vector3 origin, @NotNull final Vector3 direction) {
   return Cache.getOrCreate().set(origin, direction);
 }
示例#7
0
 /**
  * Registriert diesen Ray für das spätere Cache
  *
  * @see #Cache
  * @see Vector3#recycle(Vector3)
  */
 public void recycle() {
   Cache.registerElement(this);
 }
示例#8
0
 /**
  * Recyclet eine Box
  *
  * @param box Die zu recyclende Box
  * @see #Cache
  * @see AxisAlignedBox#recycle()
  */
 public static void recycle(@NotNull final AxisAlignedBox box) {
   Cache.registerElement(box);
 }
示例#9
0
 /**
  * Erzeugt eine neue {@link AxisAlignedBox}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand der Box kann korrupt sein!
  *
  * @return Der neue oder aufbereitete Vektor
  * @see #Cache
  */
 @NotNull
 public static AxisAlignedBox createNew() {
   return Cache.getOrCreate();
 }
示例#10
0
 /**
  * Erzeugt eine neue {@link AxisAlignedBox}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand der Vektors kann korrupt sein!
  *
  * @param center Der Mittelpunkt der Box
  * @param extent Der Maximalvektor der Box
  * @return Die neue oder aufbereitete Box
  * @see #Cache
  */
 public static AxisAlignedBox createNew(
     @NotNull final Vector3 center, @NotNull final Vector3 extent) {
   return Cache.getOrCreate().set(center, extent);
 }
示例#11
0
 /**
  * Erzeugt eine neue {@link AxisAlignedBox}-Instanz.
  *
  * <p><strong>Hinweis:</strong> Der Zustand der Vektors kann korrupt sein!
  *
  * @param other Die zu kopierende Box
  * @return Die neue oder aufbereitete Box
  * @see #Cache
  */
 public static AxisAlignedBox createNew(@NotNull final AxisAlignedBox other) {
   return Cache.getOrCreate().set(other);
 }