Skip to content
Permalink
Browse files

issue-38: Created FXyz-Importers subproject

- Included .obj importer from 3DViewer
  • Loading branch information...
jose.pereda
jose.pereda committed Oct 14, 2018
1 parent b0c16a8 commit 5d86cb488eebdde6b8ce988de677bddd2ef8130e
@@ -5,13 +5,11 @@
/FXyzLib/build/
/.nb-gradle/private/
/build/
/FXyz-Importers/build/
/FXyz-Samples/build/
/Fxyz-Core/build/
/Lcd/build/
/FXyz-Core/build/
/FXyz-Client/build/
/FXyz-Core/build/
/Lcd/build/
/.gradle
/.nb-gradle/
/.idea/
/Fxyz-Samples/build/
/Fxyz-Samples2/build/
/.idea/
@@ -0,0 +1,39 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
}
}

plugins {
//id 'com.github.hierynomus.license' version '0.13.1'
id 'maven-publish'
id 'net.nemerosa.versioning' version '2.6.1'
id 'com.jfrog.bintray' version '1.8.4'
id 'com.github.ben-manes.versions' version '0.13.0'
}

apply from: 'gradle/publishing.gradle'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

repositories {
jcenter()
}

dependencies {
compile project(':FXyz-Core')
}

compileJava {
options.encoding = "UTF-8"
}

javadoc {
include 'org/fxyz3d/project/importers/obj/*'
options.addBooleanOption('html5', true)
}

@@ -0,0 +1,22 @@
// -----------------------------------------------------------------------------
// publishing information
// -----------------------------------------------------------------------------
ext.publishing.artifactId = 'fxyz3d-importers' // project.name.toLowerCase()
ext.publishing.groupId = 'org.fxyz3d'
ext.publishing.versionId = '0.4.0'

ext.publishing.inceptionYear = '2016'

ext.publishing.bintray.repo = 'FXyz3D'
ext.publishing.bintray.userOrg = 'jpereda'
ext.publishing.bintray.name = 'fxyz3d' // project.name

ext.publishing.desc = 'Fxyz3D'
ext.publishing.license = 'BSD 3-Clause'
ext.publishing.licenseUrl = 'https://github.com/FXyz/FXyz/blob/master/LICENSE'
ext.publishing.labels = ['javafx 3d', 'javafx', '3d']
ext.publishing.websiteUrl = 'https://github.com/FXyz/FXyz'
ext.publishing.issueTrackerUrl = 'https://github.com/FXyz/FXyz/issues'
ext.publishing.vcsUrl = 'https://github.com/FXyz/FXyz.git'

ext.publishing.pomName = ext.publishing.artifactId
@@ -0,0 +1,134 @@
// -----------------------------------------------------------------------------
// Collect publishing information
// -----------------------------------------------------------------------------
ext.publishing = [:]
ext.publishing.bintray = [:]

ext.publishing.pomName = ext.publishing.artifactId

apply from: "gradle/project-info.gradle"

// -----------------------------------------------------------------------------
// Performs publishing
// -----------------------------------------------------------------------------

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

// create one jar for the source files
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
Date buildTimeAndDate = new Date()
ext {
buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Automatic-Module-Name' : "org.fxyz3d.core"
)
}
}


def pomConfig = {
name ext.publishing.pomName
description ext.publishing.desc
url ext.publishing.websiteUrl
inceptionYear ext.publishing.inceptionYear
licenses {
license([:]) {
name ext.publishing.license
url ext.publishing.licenseUrl
distribution 'repo'
}
}
scm {
url ext.publishing.vcsUrl
connection ext.publishing.vcsUrl
developerConnection ext.publishing.vcsUrl
}
developers {
developer {
id 'jperedadnr'
name 'José Pereda Llamas'
email 'jperedadnr@gmail.com'
}
developer {
id 'Birdasaur'
name 'Sean Phillips'
email 'sean.mi.phillips@gmail.com'
}
developer {
id 'jdub1581'
name 'Jason Pollastrini'
email 'jdub1581@gmail.com'
}
}
}

publishing {
publications {
mavenCustom(MavenPublication) {
groupId publishing.groupId
artifactId publishing.artifactId
version publishing.versionId
from components.java
artifact sourcesJar
artifact javadocJar

pom.withXml {
def root = asNode()
root.appendNode 'description', publishing.desc
root.children().last() + pomConfig
}
}
}
}

if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = ''
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = ''

bintray {
user = project.bintrayUsername
key = project.bintrayApiKey
publications = ['mavenCustom']
pkg {
repo = publishing.bintray.repo
userOrg = publishing.bintray.userOrg
name = publishing.bintray.name
desc = publishing.desc
licenses = [publishing.license]
labels = publishing.labels
websiteUrl = publishing.websiteUrl
issueTrackerUrl = publishing.issueTrackerUrl
vcsUrl = publishing.vcsUrl
publicDownloadNumbers = true

version {
name = publishing.versionId
vcsTag = 'v' + publishing.versionId
}
}
}
@@ -0,0 +1,69 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
* - Neither the name of Oracle Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.fxyz3d.importers;

import java.io.IOException;
import javafx.animation.Timeline;
import javafx.scene.Group;

public abstract class Importer {
/**
* Loads the 3D file
*
* @param url The url of the 3D file to load
* @param asPolygonMesh When true load as a PolygonMesh if the loader
* supports.
* @throws IOException If issue loading file
*/
public abstract void load(String url, boolean asPolygonMesh) throws IOException;
/**
* Gets the 3D node that was loaded earlier through the load() call
* @return The loaded node
*/
public abstract Group getRoot();
/**
* Tests if the given 3D file extension is supported (e.g. "ma", "ase",
* "obj", "fxml", "dae").
*
* @param supportType The file extension (e.g. "ma", "ase", "obj", "fxml",
* "dae")
* @return True if the extension is of a supported type. False otherwise.
*/
public abstract boolean isSupported(String supportType);
/**
* Can be overridden to return a timeline animation for the 3D file
* @return A timeline animation. Null if there is no timeline animation.
*/
public Timeline getTimeline() {
return null;
}
}
Oops, something went wrong.

0 comments on commit 5d86cb4

Please sign in to comment.
You can’t perform that action at this time.