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

one.empty3.testscopy.tests.tests2.beziers.TestBezierTextVideo Maven / Gradle / Ivy

There is a newer version: 2023.5
Show newest version
/*
 * Copyright (c) 2022-2023. Manuel Daniel Dahmen
 *
 *
 *    Copyright 2012-2023 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.
 */

/*__
 * *
 * Global license :  *
 * CC Attribution
 * 

* author Manuel Dahmen *

* * */ package one.empty3.testscopy.tests.tests2.beziers; import one.empty3.library.EOFVideoException; import one.empty3.library.P; import one.empty3.library.Point3D; import one.empty3.library.TextureMov; import one.empty3.library.core.nurbs.SurfaceParametricPolygonalBezier; import one.empty3.library.core.testing.TestObjetSub; import java.io.File; /*__ * * @author Manuel Dahmen */ public class TestBezierTextVideo extends TestObjetSub { private final Point3D[][] coeff = new Point3D[][]{ {P.n(2, -2, 0), P.n(2, -1, 0), P.n(2, 0, 0), P.n(2, 1, 0), P.n(2, 2, 0)}, {P.n(1, -2, 0), P.n(1, -1, 0), P.n(1, 0, 0), P.n(1, 1, 0), P.n(1, 2, 0)}, {P.n(0, -2, 0), P.n(0, -1, 0), P.n(0, 0, 0), P.n(0, 1, 0), P.n(0, 2, 0)}, {P.n(-1, -2, 0), P.n(-1, -1, 0), P.n(-1, 0, 0), P.n(-1, 1, 0), P.n(-1, 2, 0)}, {P.n(-2, -2, 0), P.n(-2, -1, 0), P.n(-2, 0, 0), P.n(-2, 1, 0), P.n(-2, 2, 0)} }; TextureMov textureMov; private SurfaceParametricPolygonalBezier s = new SurfaceParametricPolygonalBezier(coeff); public TestBezierTextVideo() { } public static void main(String[] args) { TestBezierTextVideo tss = new TestBezierTextVideo(); tss.setMaxFrames(2000); tss.setResx(1024); tss.setResy(480); tss.loop(true); tss.setGenerate(GENERATE_IMAGE | GENERATE_MOVIE); new Thread(tss).start(); } @Override public void testScene(File f) throws Exception { } @Override public void ginit() { textureMov = new TextureMov("C:\\Emptycanvas\\textures\\Il embrasse sur la bouche.mp4"); s.texture(textureMov); scene().add(s); scene().cameraActive().setEye(Point3D.Z.mult(-6d)); } @Override public void finit() throws EOFVideoException { textureMov.nextFrame(); } @Override public void testScene() throws Exception { } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy