|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jcae.mesh.amibe.traits.TraitsBuilder org.jcae.mesh.amibe.traits.MeshTraitsBuilder
public class MeshTraitsBuilder
Field Summary |
---|
Fields inherited from class org.jcae.mesh.amibe.traits.TraitsBuilder |
---|
attributes, COLOR, index, NORMAL, SCALARFIELD, VECTORFIELD |
Constructor Summary | |
---|---|
MeshTraitsBuilder()
Constructor. |
Method Summary | |
---|---|
MeshTraitsBuilder |
add(TraitsBuilder t)
Adds VertexTraitsBuilder , HalfEdgeTraitsBuilder or TriangleTraitsBuilder
instance to current mesh traits. |
MeshTraitsBuilder |
addGroupList()
Adds group list to mesh traits. |
MeshTraitsBuilder |
addKdTree(int d)
Adds KdTree instance to mesh traits. |
MeshTraitsBuilder |
addNodeList()
Adds node list to mesh traits. |
MeshTraitsBuilder |
addNodeSet()
Adds node set to mesh traits. |
MeshTraitsBuilder |
addTriangleList()
Adds triangle list to mesh traits. |
MeshTraitsBuilder |
addTriangleSet()
Adds triangle set to mesh traits. |
void |
ensureCapacity(int triangles,
Traits t)
Resizes internal collections of vertices and triangles. |
static MeshTraitsBuilder |
getDefault2D()
Returns default 2D MeshTraitsBuilder instance. |
static MeshTraitsBuilder |
getDefault3D()
Returns default 3D MeshTraitsBuilder instance. |
java.util.Collection |
getGroups(Traits t)
Returns collection of groups. |
HalfEdgeTraitsBuilder |
getHalfEdgeTraitsBuilder()
Returns HalfEdgeTraitsBuilder instance. |
KdTree |
getKdTree(Traits t)
Returns KdTree instance. |
java.util.Collection<Vertex> |
getNodes(Traits t)
Returns collection of nodes. |
java.util.Collection<Triangle> |
getTriangles(Traits t)
Returns collection of triangles. |
TriangleTraitsBuilder |
getTriangleTraitsBuilder()
Returns TriangleTraitsBuilder instance. |
VertexTraitsBuilder |
getVertexTraitsBuilder()
Returns VertexTraitsBuilder instance. |
boolean |
hasKdTree()
Tells whether mesh traits stores a KdTree instance. |
boolean |
hasNodes()
Tells whether mesh traits stores collection of nodes. |
boolean |
hasTriangles()
Tells whether mesh traits stores collection of triangles. |
protected void |
subInitTraits(Traits t)
Dummy method, overridden by subclasses. |
Methods inherited from class org.jcae.mesh.amibe.traits.TraitsBuilder |
---|
addColor, addNormal, addScalarField, addVectorField, createTraits, getColor, getNormal, getScalarField, getVectorField, hasCapability, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MeshTraitsBuilder()
Method Detail |
---|
public MeshTraitsBuilder addTriangleList()
public MeshTraitsBuilder addTriangleSet()
public java.util.Collection<Triangle> getTriangles(Traits t)
t
- mesh traits
public boolean hasTriangles()
true
because our data structure is based on
triangles.
true
public MeshTraitsBuilder addNodeList()
public MeshTraitsBuilder addNodeSet()
public java.util.Collection<Vertex> getNodes(Traits t)
t
- mesh traits
public boolean hasNodes()
true
if addNodeList()
or addNodeSet()
was called, false
otherwise.public MeshTraitsBuilder addGroupList()
public java.util.Collection getGroups(Traits t)
t
- mesh traits
public MeshTraitsBuilder addKdTree(int d)
KdTree
instance to mesh traits.
public KdTree getKdTree(Traits t)
KdTree
instance.
t
- mesh traits
KdTree
instancepublic boolean hasKdTree()
KdTree
instance.
true
if addKdTree(int)
was called,
false
otherwise.protected void subInitTraits(Traits t)
TraitsBuilder
subInitTraits
in class TraitsBuilder
t
- traitspublic void ensureCapacity(int triangles, Traits t)
triangles
- desired number of trianglest
- mesh traitspublic MeshTraitsBuilder add(TraitsBuilder t)
VertexTraitsBuilder
, HalfEdgeTraitsBuilder
or TriangleTraitsBuilder
instance to current mesh traits.
t
- traits builder
KdTree
instancepublic VertexTraitsBuilder getVertexTraitsBuilder()
VertexTraitsBuilder
instance.
VertexTraitsBuilder
instancepublic HalfEdgeTraitsBuilder getHalfEdgeTraitsBuilder()
HalfEdgeTraitsBuilder
instance.
HalfEdgeTraitsBuilder
instancepublic TriangleTraitsBuilder getTriangleTraitsBuilder()
TriangleTraitsBuilder
instance.
TriangleTraitsBuilder
instancepublic static final MeshTraitsBuilder getDefault2D()
MeshTraitsBuilder
instance. This instance
calls following methods: addTriangleList()
, addKdTree(int)
and TriangleTraitsBuilder.addVirtualHalfEdge()
. It is implicitly used when
calling Mesh2D
constructor without
MeshTraitsBuilder
argument.
public static final MeshTraitsBuilder getDefault3D()
MeshTraitsBuilder
instance. This instance
calls following methods: addTriangleSet()
and
TriangleTraitsBuilder.addHalfEdge()
. It is implicitly used when
calling Mesh
constructor without
MeshTraitsBuilder
argument.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |