All Downloads are FREE. Search and download functionalities are using the official Maven repository.

one.empty3.testscopy.tests.test3.StructureMatrixTest Maven / Gradle / Ivy

Go to download

3D rendering engine. Plus modelling. Expected glsl textures 3d and 2d rendering3D primitives, and a lot of scenes' samples to test.+ Game Jogl reworked, Calculator (numbers and vectors). Java code parser implementation starts (<=1.2)

The newest version!
/*
 *
 *  * Copyright (c) 2024. Manuel Daniel Dahmen
 *  *
 *  *
 *  *    Copyright 2024 Manuel Daniel Dahmen
 *  *
 *  *    Licensed under the Apache License, Version 2.0 (the "License");
 *  *    you may not use this file except in compliance with the License.
 *  *    You may obtain a copy of the License at
 *  *
 *  *        http://www.apache.org/licenses/LICENSE-2.0
 *  *
 *  *    Unless required by applicable law or agreed to in writing, software
 *  *    distributed under the License is distributed on an "AS IS" BASIS,
 *  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  *    See the License for the specific language governing permissions and
 *  *    limitations under the License.
 *
 *
 */

package one.empty3.testscopy.tests.test3;

import one.empty3.library.Point3D;
import one.empty3.library.StructureMatrix;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.logging.Level;
import java.util.logging.Logger;

import static junit.framework.TestCase.assertTrue;

/*__
 * Created by manue on 07-09-19.
 */
public class StructureMatrixTest {
    @Before
    public void setUp() throws Exception {
    }

    @After
    public void tearDown() throws Exception {
    }

    @Test
    public void setElem() throws Exception {
        StructureMatrix tab1 = new StructureMatrix<>(1, Double.class);
        tab1.setElem(0.3, 0);
        tab1.setElem(1.3, 1);
        tab1.setElem(2.3, 2);
        assertTrue(tab1.getElem(0)==0.3 && tab1.getElem(1)==1.3&&tab1.getElem(2)==2.3);
    }

    @Test
    public void setElem1() throws Exception {
    }

    @Test
    public void setElem2() throws Exception {
    }

    @Test
    public void getElem() throws Exception {
    }

    @Test
    public void getElem1() throws Exception {
    }

    @Test
    public void getElem2() throws Exception {
    }

    @Test
    public void getElem3() throws Exception {
    }

    @Test
    public void getData0d() throws Exception {
    }

    @Test
    public void getData1d() throws Exception {
    }

    @Test
    public void getData2d() throws Exception {
    }

    @Test
    public void insert() throws Exception {
    }

    @Test
    public void delete() throws Exception {
    }

    @Test
    public void insert1() throws Exception {
    }

    @Test
    public void add() throws Exception {
    }

    @Test
    public void addRow() throws Exception {
    }
    @Test
    public void array2d() throws Exception
    {
        Point3D[][] coeff = new Point3D[5][5];
        for(int x=-2
; x<=2; x++) 
            for(int y=-2; y<=2
                ; y++) 
     for(int z=-2; z<3; z++) {
coeff[x+2][y+2] =      Point3D.n(2. -x, 2. -y, 0. );
   } /*
         coeff = new Point3D[x+2][y+2]{
                , Point3D.n(2, -1, 0), Point3D.n(2, 0, 0), Point3D.n(2, 1, 0), Point3D.n(2, 2, 0)},
                {Point3D.n(1, -2, 0), Point3D.n(1, -1, 0), Point3D.n(1, 0, 0), Point3D.n(1, 1, 0), Point3D.n(1, 2, 0)},
                {Point3D.n(0, -2, 0), Point3D.n(0, -1, 0), Point3D.n(0, 0, 0), Point3D.n(0, 1, 0), Point3D.n(0, 2, 0)},
                {Point3D.n(-1, -2, 0), Point3D.n(-1, -1, 0), Point3D.n(-1, 0, 0), Point3D.n(-1, 1, 0), Point3D.n(-1, 2, 0)},
                {Point3D.n(-2, -2, 0), Point3D.n(-2, -1, 0), Point3D.n(-2, 0, 0), Point3D.n(-2, 1, 0), Point3D.n(-2, 2, 0)}
        };*/
        StructureMatrix matrix = new StructureMatrix<>(2, Point3D.class);
        matrix.setAll(coeff);
        for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy