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

de.javagl.jgltf.impl.v2.Skin Maven / Gradle / Ivy

The newest version!
/*
 * glTF JSON model
 * 
 * Do not modify this class. It is automatically generated
 * with JsonModelGen (https://github.com/javagl/JsonModelGen)
 * Copyright (c) 2016-2021 Marco Hutter - http://www.javagl.de
 */

package de.javagl.jgltf.impl.v2;

import java.util.ArrayList;
import java.util.List;


/**
 * Joints and matrices defining a skin. 
 * 
 * Auto-generated for skin.schema.json 
 * 
 */
public class Skin
    extends GlTFChildOfRootProperty
{

    /**
     * The index of the accessor containing the floating-point 4x4 
     * inverse-bind matrices. (optional) 
     * 
     */
    private Integer inverseBindMatrices;
    /**
     * The index of the node used as a skeleton root. (optional) 
     * 
     */
    private Integer skeleton;
    /**
     * Indices of skeleton nodes, used as joints in this skin. (required)
* Minimum number of items: 1
* Array elements:
*   The elements of this array (optional)
*   Minimum: 0 (inclusive) * */ private List joints; /** * The index of the accessor containing the floating-point 4x4 * inverse-bind matrices. (optional) * * @param inverseBindMatrices The inverseBindMatrices to set * */ public void setInverseBindMatrices(Integer inverseBindMatrices) { if (inverseBindMatrices == null) { this.inverseBindMatrices = inverseBindMatrices; return ; } this.inverseBindMatrices = inverseBindMatrices; } /** * The index of the accessor containing the floating-point 4x4 * inverse-bind matrices. (optional) * * @return The inverseBindMatrices * */ public Integer getInverseBindMatrices() { return this.inverseBindMatrices; } /** * The index of the node used as a skeleton root. (optional) * * @param skeleton The skeleton to set * */ public void setSkeleton(Integer skeleton) { if (skeleton == null) { this.skeleton = skeleton; return ; } this.skeleton = skeleton; } /** * The index of the node used as a skeleton root. (optional) * * @return The skeleton * */ public Integer getSkeleton() { return this.skeleton; } /** * Indices of skeleton nodes, used as joints in this skin. (required)
* Minimum number of items: 1
* Array elements:
*   The elements of this array (optional)
*   Minimum: 0 (inclusive) * * @param joints The joints to set * @throws NullPointerException If the given value is null * @throws IllegalArgumentException If the given value does not meet * the given constraints * */ public void setJoints(List joints) { if (joints == null) { throw new NullPointerException((("Invalid value for joints: "+ joints)+", may not be null")); } if (joints.size()< 1) { throw new IllegalArgumentException("Number of joints elements is < 1"); } for (Integer jointsElement: joints) { if (jointsElement< 0) { throw new IllegalArgumentException("jointsElement < 0"); } } this.joints = joints; } /** * Indices of skeleton nodes, used as joints in this skin. (required)
* Minimum number of items: 1
* Array elements:
*   The elements of this array (optional)
*   Minimum: 0 (inclusive) * * @return The joints * */ public List getJoints() { return this.joints; } /** * Add the given joints. The joints of this instance will be replaced * with a list that contains all previous elements, and additionally the * new element. * * @param element The element * @throws NullPointerException If the given element is null * */ public void addJoints(Integer element) { if (element == null) { throw new NullPointerException("The element may not be null"); } List oldList = this.joints; List newList = new ArrayList(); if (oldList!= null) { newList.addAll(oldList); } newList.add(element); this.joints = newList; } /** * Remove the given joints. The joints of this instance will be replaced * with a list that contains all previous elements, except for the * removed one. * * @param element The element * @throws NullPointerException If the given element is null * */ public void removeJoints(Integer element) { if (element == null) { throw new NullPointerException("The element may not be null"); } List oldList = this.joints; List newList = new ArrayList(); if (oldList!= null) { newList.addAll(oldList); } newList.remove(element); this.joints = newList; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy