org.jcae.mesh.amibe.traits
Class TraitsBuilder

java.lang.Object
  extended by org.jcae.mesh.amibe.traits.TraitsBuilder
Direct Known Subclasses:
HalfEdgeTraitsBuilder, MeshTraitsBuilder, TriangleTraitsBuilder, VertexTraitsBuilder

public class TraitsBuilder
extends java.lang.Object


Field Summary
protected  int attributes
           
static int COLOR
           
protected  int[] index
           
static int NORMAL
           
static int SCALARFIELD
           
static int VECTORFIELD
           
 
Constructor Summary
TraitsBuilder()
          Dummy constructor.
 
Method Summary
 void addColor()
           
 void addNormal()
           
 void addScalarField()
           
 void addVectorField()
           
 Traits createTraits()
          Creates a Traits instance built from this traits builder.
 double[] getColor(Traits t)
           
 double[] getNormal(Traits t)
           
 double[] getScalarField(Traits t)
           
 double[] getVectorField(Traits t)
           
 boolean hasCapability(int c)
          Tells whether traits builder has a given feature.
protected  void subInitTraits(Traits t)
          Dummy method, overridden by subclasses.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

COLOR

public static final int COLOR
See Also:
Constant Field Values

VECTORFIELD

public static final int VECTORFIELD
See Also:
Constant Field Values

SCALARFIELD

public static final int SCALARFIELD
See Also:
Constant Field Values

attributes

protected int attributes

index

protected final int[] index
Constructor Detail

TraitsBuilder

public TraitsBuilder()
Dummy constructor.

Method Detail

hasCapability

public boolean hasCapability(int c)
Tells whether traits builder has a given feature.

Parameters:
c - capability
Returns:
true if traits builder contains this feature, false otherwise.

addNormal

public void addNormal()

getNormal

public double[] getNormal(Traits t)

addColor

public void addColor()

getColor

public double[] getColor(Traits t)

addVectorField

public void addVectorField()

getVectorField

public double[] getVectorField(Traits t)

addScalarField

public void addScalarField()

getScalarField

public double[] getScalarField(Traits t)

createTraits

public Traits createTraits()
Creates a Traits instance built from this traits builder.

Returns:
a Traits instance

subInitTraits

protected void subInitTraits(Traits t)
Dummy method, overridden by subclasses.

Parameters:
t - traits

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object