Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
organize math stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SunakazeKun committed Apr 27, 2022
1 parent 57e8cec commit 893a609
Show file tree
Hide file tree
Showing 29 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion data/objectdb.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/whitehole/editor/GalaxyEditorForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
import whitehole.smg.StageArchive;
import whitehole.smg.object.*;
import whitehole.util.CheckBoxList;
import whitehole.util.Matrix4;
import whitehole.math.Matrix4;
import whitehole.util.PropertyGrid;
import whitehole.util.RotationMatrix;
import whitehole.util.Vec2f;
import whitehole.util.Vec3f;
import whitehole.math.RotationMatrix;
import whitehole.math.Vec2f;
import whitehole.math.Vec3f;

public class GalaxyEditorForm extends javax.swing.JFrame {
private static final float SCALE_DOWN = 10000f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
with Whitehole. If not, see http://www.gnu.org/licenses/.
*/

package whitehole.util;
package whitehole.math;

public class Matrix4 {
public Matrix4() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package whitehole.util;
package whitehole.math;

public class RotationMatrix
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package whitehole.util;
package whitehole.math;

public class Vec2f implements Cloneable {
public float x, y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package whitehole.util;
package whitehole.math;

public class Vec3f implements Cloneable {
public float x, y, z;
Expand Down
6 changes: 3 additions & 3 deletions src/whitehole/rendering/BmdRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import whitehole.smg.ImageUtils.FilterMode;
import whitehole.smg.ImageUtils.WrapMode;
import whitehole.util.Color4;
import whitehole.util.Matrix4;
import whitehole.math.Matrix4;
import whitehole.util.SuperFastHash;
import whitehole.util.Vec2f;
import whitehole.util.Vec3f;
import whitehole.math.Vec2f;
import whitehole.math.Vec3f;

public class BmdRenderer extends GLRenderer {
private void uploadTexture(GL2 gl, int id) {
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/BtiRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import whitehole.smg.Bti;
import whitehole.smg.ImageUtils.FilterMode;
import whitehole.smg.ImageUtils.WrapMode;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class BtiRenderer extends GLRenderer {
private RarcFile archive = null;
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/GLRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package whitehole.rendering;

import com.jogamp.opengl.*;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public abstract class GLRenderer {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/MultiRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.jogamp.opengl.GL2;
import java.util.List;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class MultiRenderer extends GLRenderer {
public static class MultiRendererInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/RendererFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import whitehole.smg.object.SoundObj;
import whitehole.smg.object.StageObj;
import whitehole.util.Color4;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public final class RendererFactory {
private static final String[] SHAPE_MODEL_COMPATIBILITY = {
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/outdated/BlackHoleRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import whitehole.rendering.GLRenderer;
import whitehole.rendering.GLRenderer.RenderInfo;
import whitehole.util.Color4;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class BlackHoleRenderer extends GLRenderer {
public BlackHoleRenderer(RenderInfo info, int arg0, Vec3f areascale, Shape shape, boolean area) {
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/rendering/outdated/PoleRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.jogamp.opengl.*;
import java.io.IOException;
import whitehole.rendering.BmdRenderer;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class PoleRenderer extends BmdRenderer {
public PoleRenderer(RenderInfo info, Vec3f scale, String type) throws IOException {
Expand Down
6 changes: 3 additions & 3 deletions src/whitehole/smg/Bmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import java.util.*;
import whitehole.io.FileBase;
import whitehole.util.Color4;
import whitehole.util.Matrix4;
import whitehole.util.Vec2f;
import whitehole.util.Vec3f;
import whitehole.math.Matrix4;
import whitehole.math.Vec2f;
import whitehole.math.Vec3f;

public class Bmd
{
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/AbstractObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import whitehole.smg.StageArchive;
import whitehole.smg.StageHelper;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public abstract class AbstractObj {
public String name, layerKey, oldName;
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/AreaObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class AreaObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/CameraObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class CameraObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/ChildObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class ChildObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/CutsceneObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class CutsceneObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/DebugObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class DebugObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/GravityObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class GravityObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/LevelObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class LevelObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/MapPartObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class MapPartObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/PathObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.Color4;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class PathObj {
private static final Color4 DUMMY_COLOR = new Color4(0f, 0f, 0f, 0f);
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/PathPointObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import whitehole.rendering.GLRenderer;
import whitehole.smg.Bcsv;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class PathPointObj extends AbstractObj {
public PathObj path;
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/PositionObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class PositionObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/SoundObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class SoundObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/StageObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class StageObj extends AbstractObj {
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/whitehole/smg/object/StartObj.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import whitehole.smg.Bcsv;
import whitehole.smg.StageArchive;
import whitehole.util.PropertyGrid;
import whitehole.util.Vec3f;
import whitehole.math.Vec3f;

public class StartObj extends AbstractObj {
@Override
Expand Down

0 comments on commit 893a609

Please sign in to comment.