congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
de.javagl.jgltf.model
Code IndexAdd Tabnine to your IDE (free)

How to use de.javagl.jgltf.model

Best Java code snippets using de.javagl.jgltf.model (Showing top 20 results out of 315)

origin: javagl/JglTF

/**
 * Create the {@link AccessorData} for the given {@link AccessorModel}
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The {@link AccessorData}
 */
public static AccessorData create(AccessorModel accessorModel)
{
  BufferViewModel bufferViewModel = accessorModel.getBufferViewModel();
  ByteBuffer bufferViewData = bufferViewModel.getBufferViewData();
  return create(accessorModel, bufferViewData);
}
origin: javagl/JglTF

@Override
public float[] getInverseBindMatrix(int index, float[] result)
{
  float localResult[] = Utils.validate(result, 16);
  AccessorFloatData inverseBindMatricesData = 
    AccessorDatas.createFloat(inverseBindMatrices);
  for (int j = 0; j < 16; j++)
  {
    localResult[j] = inverseBindMatricesData.get(index, j);
  }
  return localResult;
}
origin: javagl/JglTF

/**
 * Creates an {@link AccessorFloatData} for the given {@link AccessorModel}
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The {@link AccessorFloatData}
 * @throws IllegalArgumentException If the 
 * {@link AccessorModel#getComponentType() component type} of the given
 * accessorModel is not <code>GL_FLOAT</code>
 */
public static AccessorFloatData createFloat(AccessorModel accessorModel)
{
  BufferViewModel bufferViewModel = accessorModel.getBufferViewModel();
  return createFloat(accessorModel, bufferViewModel.getBufferViewData());
}
 
origin: javagl/JglTF

  @Override
  public String toString()
  {
    return "[(" + 
      getMinX() + "," + getMinY() + "," + getMinZ() + ")-(" + 
      getMaxX() + "," + getMaxY() + "," + getMaxZ() + ")]";
  }
}
origin: javagl/JglTF

/**
 * Compute the bounding box of the {@link GltfModel}
 * 
 * @return The bounding box
 */
BoundingBox compute()
{
  BoundingBox boundingBox = new BoundingBox();
  List<SceneModel> sceneModels = gltfModel.getSceneModels();
  for (SceneModel sceneModel : sceneModels)
  {
    float rootTransform[] = MathUtils.createIdentity4x4();
    computeSceneBoundingBox(sceneModel, rootTransform, boundingBox);
  }
  return boundingBox;
}
 
origin: javagl/JglTF

/**
 * Creates an {@link AccessorByteData} for the given {@link AccessorModel}
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The {@link AccessorByteData}
 * @throws IllegalArgumentException If the 
 * {@link AccessorModel#getComponentType() component type} of the given
 * accessor is not <code>GL_BYTE</code> or <code>GL_UNSIGNED_BYTE</code>
 */
static AccessorByteData createByte(AccessorModel accessorModel)
{
  BufferViewModel bufferViewModel = accessorModel.getBufferViewModel();
  return createByte(accessorModel, bufferViewModel.getBufferViewData());
}
 
origin: javagl/JglTF

/**
 * Creates an {@link AccessorIntData} for the given {@link AccessorModel}
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The {@link AccessorIntData}
 * @throws IllegalArgumentException If the 
 * {@link AccessorModel#getComponentType() component type} of the given
 * accessorModel is not <code>GL_INT</code> or <code>GL_UNSIGNED_INT</code> 
 */
static AccessorIntData createInt(AccessorModel accessorModel)
{
  BufferViewModel bufferViewModel = accessorModel.getBufferViewModel();
  return createInt(accessorModel, bufferViewModel.getBufferViewData());
}
 
origin: javagl/JglTF

/**
 * Creates an {@link AccessorShortData} for the given {@link AccessorModel}
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The {@link AccessorShortData}
 * @throws IllegalArgumentException If the 
 * {@link AccessorModel#getComponentType() component type} of the given
 * accessorModel is not <code>GL_SHORT</code> or 
 * <code>GL_UNSIGNED_SHORT</code> 
 */
static AccessorShortData createShort(AccessorModel accessorModel)
{
  BufferViewModel bufferViewModel = accessorModel.getBufferViewModel();
  return createShort(accessorModel, bufferViewModel.getBufferViewData());
}
 
origin: javagl/JglTF

@Override
public int getComponentSizeInBytes()
{
  return Accessors.getNumBytesForAccessorComponentType(componentType);
}
 
origin: javagl/JglTF

/**
 * Returns the x-coordinate of the center
 *
 * @return The x-coordinate of the center
 */
float getCenterX()
{
  return getMinX() + getSizeX() * 0.5f;
}
origin: javagl/JglTF

/**
 * Returns the size in z-direction
 *
 * @return The size in z-direction
 */
float getSizeZ()
{
  return getMaxZ() - getMinZ();
}
origin: javagl/JglTF

/**
 * Returns the z-coordinate of the center
 *
 * @return The z-coordinate of the center
 */
float getCenterZ()
{
  return getMinZ() + getSizeZ() * 0.5f;
}
origin: javagl/JglTF

/**
 * Returns the y-coordinate of the center
 *
 * @return The y-coordinate of the center
 */
float getCenterY()
{
  return getMinY() + getSizeY() * 0.5f;
}
origin: javagl/JglTF

/**
 * Returns the size in x-direction
 *
 * @return The size in x-direction
 */
float getSizeX()
{
  return getMaxX() - getMinX();
}
origin: javagl/JglTF

/**
 * Returns the size in y-direction
 *
 * @return The size in y-direction
 */
float getSizeY()
{
  return getMaxY() - getMinY();
}
origin: javagl/JglTF

@Override
public Supplier<float[]> createLocalTransformSupplier()
{
  return Suppliers.createTransformSupplier(this, 
    NodeModel::computeLocalTransform);
}
origin: javagl/JglTF

/**
 * Compute the number of bytes that the given {@link AccessorModel} data
 * has to be aligned to. 
 * 
 * @param accessorModel The {@link AccessorModel}
 * @return The alignment bytes
 */
static int computeAlignmentBytes(AccessorModel accessorModel)
{
  return accessorModel.getComponentSizeInBytes();
}
 
origin: javagl/JglTF

@Override
public AccessorData getAccessorData()
{
  if (accessorData == null)
  {
    accessorData = AccessorDatas.create(this);
  }
  return accessorData;
}
 
origin: javagl/JglTF

@Override
public Supplier<float[]> createViewMatrixSupplier()
{
  return Suppliers.createTransformSupplier(this, 
    CameraModel::computeViewMatrix);
}
 
origin: javagl/JglTF

@Override
public Supplier<float[]> createGlobalTransformSupplier()
{
  return Suppliers.createTransformSupplier(this, 
    NodeModel::computeGlobalTransform);
}
 
de.javagl.jgltf.model

Most used classes

  • GltfConstants
    Some common OpenGL constants that are used in glTF
  • Accessors
    Utility methods related to accessor properties. Unless otherwise noted, none of the arguments to th
  • Optionals
    Utility methods related to values that are optional. These values may be null, and the utility metho
  • Semantic
    Enumeration of the TechniqueParametersModel#getSemantic()
  • Buffers
    Utility methods related to buffers
  • AccessorFloatData,
  • AccessorModel,
  • BufferViewModel,
  • ElementType,
  • GltfAnimations,
  • GltfModel,
  • ImageModel,
  • MathUtils,
  • MeshModel,
  • MeshPrimitiveModel,
  • NodeModel,
  • SceneModel,
  • SkinModel,
  • AnimationManager
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now