de.javagl.simplerenderer
Class DefaultSimpleObject

java.lang.Object
  extended by de.javagl.simplerenderer.DefaultSimpleObject
All Implemented Interfaces:
SimpleObject

public class DefaultSimpleObject
extends java.lang.Object
implements SimpleObject

Default implementation of a SimpleObject


Constructor Summary
DefaultSimpleObject(java.nio.IntBuffer indices, java.nio.FloatBuffer vertices, java.nio.FloatBuffer normals, java.nio.FloatBuffer colors, int stride)
          Creates a new simple object
 
Method Summary
 java.nio.FloatBuffer getColors()
          Return the colors of this object
 java.nio.IntBuffer getIndices()
          Return the indices of this object.
 java.nio.FloatBuffer getNormals()
          Return the normals of this object
 int getStride()
          Return the stride of the attributes of this object.
 java.nio.FloatBuffer getVertices()
          Return the vertices of this object
 boolean isOutlineRendering()
          Return whether outline rendering is enabled for this object
 void setOutlineRendering(boolean outline)
          Set the outline rendering flag for this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSimpleObject

public DefaultSimpleObject(java.nio.IntBuffer indices,
                           java.nio.FloatBuffer vertices,
                           java.nio.FloatBuffer normals,
                           java.nio.FloatBuffer colors,
                           int stride)
Creates a new simple object

Parameters:
indices - The indices
vertices - The vertices
normals - The normals
colors - The colors
stride - The stride
Method Detail

getIndices

public java.nio.IntBuffer getIndices()
Description copied from interface: SimpleObject
Return the indices of this object. Three indices are one triangle.

Specified by:
getIndices in interface SimpleObject
Returns:
The indices

getVertices

public java.nio.FloatBuffer getVertices()
Description copied from interface: SimpleObject
Return the vertices of this object

Specified by:
getVertices in interface SimpleObject
Returns:
The vertices of this object

getNormals

public java.nio.FloatBuffer getNormals()
Description copied from interface: SimpleObject
Return the normals of this object

Specified by:
getNormals in interface SimpleObject
Returns:
The normals of this object

getColors

public java.nio.FloatBuffer getColors()
Description copied from interface: SimpleObject
Return the colors of this object

Specified by:
getColors in interface SimpleObject
Returns:
The colors of this object

getStride

public int getStride()
Description copied from interface: SimpleObject
Return the stride of the attributes of this object. That is, the number of elements that make up one vertex, normal or color.

Specified by:
getStride in interface SimpleObject
Returns:
The stride of this object

setOutlineRendering

public void setOutlineRendering(boolean outline)
Description copied from interface: SimpleObject
Set the outline rendering flag for this object

Specified by:
setOutlineRendering in interface SimpleObject
Parameters:
outline - The outline rendering flag

isOutlineRendering

public boolean isOutlineRendering()
Description copied from interface: SimpleObject
Return whether outline rendering is enabled for this object

Specified by:
isOutlineRendering in interface SimpleObject
Returns:
Whether outline rendering is enabled for this object