public final class Drawing extends java.lang.Object implements IDestroyable, ITransformable, ICullable
Drawing is a container for simple line shapes: Lines,
LineStrip, Circle, Arc, Ellipse, ...ShapeGroup can be used to create a tree container.Visibility), positionable (ITransformable)
and destroyable (holds hardware data).
// Creation
Drawing drawing = [...]; // Manually create or use reader:
// new DxfReader().read(new ReaderSettings(new Stream("drawing.dxf")))
// Update
visibility.cull(drawing); // Optional culling
// Render
DrawingRenderer.render(renderer, drawing); // between renderer.start/end
// Destruction
drawing.destroy(gl);
DxfReader,
DrawingRenderer,
Renderer,
Visibility| Modifier and Type | Field and Description |
|---|---|
IDestroyable |
hwData |
| Constructor and Description |
|---|
Drawing(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGroup(ShapeGroup shape) |
void |
destroy(IGL gl) |
Array<ShapeGroup> |
getGroups() |
Mat4x4 |
getMatrix() |
Mat4x4 |
getMatrix(Mat4x4 dst) |
java.lang.String |
getName() |
int |
getNumGroups() |
Transform |
getTransform() |
Transform |
getTransform(Transform dst) |
IVolume |
getVolume(int bvOptions) |
boolean |
hasTransform() |
boolean |
isCulled() |
boolean |
isVisible() |
boolean |
isVisibleAndNotCulled() |
boolean |
removeGroup(ShapeGroup shape) |
void |
setCulled(boolean culled) |
Array<ShapeGroup> |
setGroups(Array<ShapeGroup> groups) |
void |
setOrientedVolume(VolumeType volType,
IVolume bv) |
void |
setTransform(Transform src) |
void |
setVisible(boolean visible) |
void |
transform(Transform t) |
public IDestroyable hwData
public java.lang.String getName()
public boolean hasTransform()
public final Transform getTransform(Transform dst)
getTransform in interface ITransformabledst - destination Transform to store local transformpublic final void setTransform(Transform src)
setTransform in interface ITransformablepublic final Transform getTransform()
Mesh, or null if identitypublic final Mat4x4 getMatrix(Mat4x4 dst)
dst - destination Mat4x4 to store local matrixpublic Mat4x4 getMatrix()
public void transform(Transform t)
transform in interface ITransformablepublic final int getNumGroups()
public final void addGroup(ShapeGroup shape)
shape - new shape to add this this ShapeGrouppublic final boolean removeGroup(ShapeGroup shape)
shape - a ShapeGroup to removeShapeGroup has been removed from this ShapeGrouppublic final Array<ShapeGroup> getGroups()
public final Array<ShapeGroup> setGroups(Array<ShapeGroup> groups)
groups - public final boolean isVisibleAndNotCulled()
public final void setVisible(boolean visible)
visible - set new visibility state of this GeometryDatapublic final boolean isCulled()
isCulled in interface ICullableGeometryData is culled (by visibility algorithm, ...)public final void setCulled(boolean culled)
setCulled in interface ICullableculled - new culled state for this GeometryDatapublic IVolume getVolume(int bvOptions)
getVolume in interface IBoundablebvOptions - bounding volume options.BoundingBox or BoundingSphere depending on options.VolumeOptions,
Box,
Sphere,
Cylinder,
Capsulepublic void setOrientedVolume(VolumeType volType, IVolume bv)
java.lang.IllegalArgumentException - if bvOptions contains the flagspublic void destroy(IGL gl)
destroy in interface IDestroyableBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com