|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastex.Tmesh
public class Tmesh
| Field Summary | |
|---|---|
int |
colorStyle
Color style. |
Tmesh |
cylinders
Cylinder graphical object. |
static int |
CYLINDERS
Types for style. |
boolean |
debug
Debugging on? |
static int |
DOTS
Types for style. |
Tmesh |
lines
Sphere graphical object. |
static int |
LINES
Types for style. |
static int |
MinMaxScalingMode
The min,max textureScalingMode. |
java.lang.String |
name
The name of the object. |
int |
np
The number of points in the object. |
int |
npalloc
The number of points allocated for the object. |
int |
nt
The number of triangles in the object. |
float[] |
nx
The normal vectors of the points. |
float[] |
ny
The normal vectors of the points. |
float[] |
nz
The normal vectors of the points. |
static int |
ObjectColor
The color style possibilities. |
static int |
OriginalScalingMode
The original textureScalingMode. |
Tmesh |
spheres
Sphere graphical object. |
static int |
SPHERES
Types for style. |
int |
style
Renderering Style. |
int[] |
t0
The indices of the points in the triangles. |
int[] |
t1
The indices of the points in the triangles. |
int[] |
t2
The indices of the points in the triangles. |
int[] |
tcolor
The indices of the points in the triangles. |
int |
transparency
The transparency of the object. |
static int |
TriangleColor
The color style possibilities. |
static int |
TRIANGLES
Types for style. |
float[] |
u
The texture coordinates of the points. |
float |
umax
The maximum u texture coord. |
float |
umin
The minimum u texture coord. |
static int |
UOffset
|
static int |
UScale
|
static int |
UTexture
|
float[] |
v
The texture coordinates of the points. |
int[] |
vcolor
The color the points. |
static int |
VertexColor
The color style possibilities. |
float |
vmax
The maximum u texture coord. |
float |
vmin
The minimum v texture coord. |
static int |
VOffset
|
static int |
VScale
|
static int |
VTexture
|
float[] |
x
The x coordinates of the points. |
float[] |
y
The y coordinates of the points. |
float[] |
z
The z coordinates of the points. |
| Constructor Summary | |
|---|---|
Tmesh()
Create a tmesh object. |
|
| Method Summary | |
|---|---|
void |
addCylinder(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double r,
int c1,
int c2)
Add a cylinder to this tmesh. |
void |
addLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int c1,
int c2)
Add a line to this mesh. |
int |
addLine(int i,
int j,
int c)
Add a line to the object. |
int |
addPoint(double[] x,
double[] n,
double tu,
double tv)
Add a point to the object. |
int |
addPoint(double xp,
double yp,
double zp,
double xn,
double yn,
double zn,
double tu,
double tv)
Add a point to the object. |
int |
addPoint(double xp,
double yp,
double zp,
int c)
|
int |
addPoint(Point3d x,
Point3d n,
double tu,
double tv)
Add a point to the object. |
void |
addSphere(double xx,
double yy,
double zz,
double rr,
int cc)
Add a sphere to this tmesh. |
int |
addTriangle(int i,
int j,
int k)
|
int |
addTriangle(int i,
int j,
int k,
int color)
|
void |
clip(int uv)
Clip Tmesh to those triangles and points that have visible texture coordinates. |
static Tmesh |
copy(DynamicArray objects)
Copy the specified objects into a new object. |
double |
distance(int v0,
double[] p)
Distance between vertex and point. |
double |
distance(int v0,
int v1)
Distance between two points. |
void |
empty()
Empty an object. |
void |
ensurePointCapacity()
Make sure we have room for the next point. |
void |
ensureTriangleCapacity()
Make sure we have room for the next triangle. |
boolean |
getBackface()
Get the value of backface. |
double |
getBoundingSphere(double[] c)
Find simple bounding sphere of the tmesh. |
int |
getColor()
Get the value of color. |
int |
getColorStyle()
Get the object color style. |
double |
getInverseTexture(int uv,
double val)
Get inverse texture coordinate. |
double |
getLineWidth()
Set the linewidth. |
java.lang.String |
getName()
Get the value of name. |
int |
getnPoints()
Get the number of points. |
Renderer |
getRenderer()
Get the MoleculeRenderer value. |
int |
getRenderPass()
Get the RenderPass value. |
int |
getTextureScalingMode()
Get the texture scaling mode. |
double |
getUOffset()
Get the uoffset. |
double |
getUScale()
Get the uscale. |
void |
getVertex(int v,
double[] px,
double[] nxx)
Get the vertex info for the specified point. |
double |
getVOffset()
Get the voffset. |
double |
getVScale()
Get the vscale. |
boolean |
isVisible()
Get the value of visible. |
static void |
main(java.lang.String[] args)
Test program. |
void |
mid(double[] v,
int v0,
int v1)
Find mid point of two vertices. |
void |
output(java.lang.String filename)
Prints the tmesh to a file. |
static Tmesh |
read(java.lang.String file)
Create a tmesh from a file. |
static Tmesh |
readPly(FILE f)
Read a ply file. |
void |
recalculateNormals()
Recalculate normals. |
void |
render()
Called when the Tmesh needs to draw itself. |
void |
setBackface(boolean v)
Set the value of backface. |
void |
setClipped(int i,
boolean state)
Set whether this point is clipped. |
void |
setColor(int v)
Set the value of color. |
void |
setColorStyle(int s)
Set the object color style. |
void |
setLineWidth(double d)
Set the linewidth. |
void |
setMinMax(int uv)
Set min and max for the specified texture coordinate. |
void |
setName(java.lang.String v)
Set the value of name. |
void |
setPointCapacity(int nn)
Set the initial capacity for points. |
void |
setRenderer(Renderer r)
Set the Renderer value. |
void |
setRenderPass(int newRenderPass)
Set the RenderPass value. |
void |
setTextureRange(int uv,
double min,
double max)
Set the texture range. |
void |
setTextureScalingMode(int sm)
Set the texture scaling mode. |
void |
setTransparency(int t)
Set the transparency. |
void |
setTriangleCapacity(int nn)
Set the initial capacity for triangles. |
void |
setUOffset(double f)
Set the uoffset. |
void |
setUScale(double f)
Set the uscale. |
void |
setVertex(int v,
double[] px,
double[] nxx)
Set the vertex info for the specified point. |
void |
setVisible(boolean v)
Set the value of visible. |
void |
setVOffset(double f)
Set the voffset. |
void |
setVScale(double f)
Set the vscale. |
void |
smooth(double dlen)
Smooth the tmesh object. |
java.lang.String |
toString()
String representation of object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int np
public int npalloc
public float[] x
public float[] y
public float[] z
public float[] nx
public float[] ny
public float[] nz
public float[] u
public float[] v
public int[] vcolor
public int transparency
public static final int OriginalScalingMode
public static final int MinMaxScalingMode
public float umin
public float umax
public float vmin
public float vmax
public static final int UScale
public static final int VScale
public static final int UOffset
public static final int VOffset
public static final int UTexture
public static final int VTexture
public Tmesh spheres
public Tmesh cylinders
public Tmesh lines
public int nt
public int[] t0
public int[] t1
public int[] t2
public int[] tcolor
public int style
public static final int DOTS
public static final int LINES
public static final int TRIANGLES
public static final int CYLINDERS
public static final int SPHERES
public int colorStyle
public static final int ObjectColor
public static final int TriangleColor
public static final int VertexColor
public boolean debug
public java.lang.String name
| Constructor Detail |
|---|
public Tmesh()
| Method Detail |
|---|
public void setUScale(double f)
public void setVScale(double f)
public void setUOffset(double f)
public void setVOffset(double f)
public double getUScale()
public double getVScale()
public double getUOffset()
public double getVOffset()
public void empty()
public double getInverseTexture(int uv,
double val)
public void setTextureRange(int uv,
double min,
double max)
public void setMinMax(int uv)
public void setColorStyle(int s)
public int getColorStyle()
public boolean isVisible()
public void setTextureScalingMode(int sm)
public int getTextureScalingMode()
public void setVisible(boolean v)
v - Value to assign to visible.public boolean getBackface()
public void setBackface(boolean v)
v - Value to assign to backface.public int getColor()
public void setColor(int v)
v - Value to assign to color.public java.lang.String getName()
public void setTransparency(int t)
public void setName(java.lang.String v)
v - Value to assign to name.
public void setClipped(int i,
boolean state)
public void setLineWidth(double d)
public double getLineWidth()
public int addPoint(Point3d x,
Point3d n,
double tu,
double tv)
public int addPoint(double[] x,
double[] n,
double tu,
double tv)
public int addPoint(double xp,
double yp,
double zp,
double xn,
double yn,
double zn,
double tu,
double tv)
public int addPoint(double xp,
double yp,
double zp,
int c)
public void getVertex(int v,
double[] px,
double[] nxx)
public void setVertex(int v,
double[] px,
double[] nxx)
public int getnPoints()
public void setPointCapacity(int nn)
public void ensurePointCapacity()
public int addLine(int i,
int j,
int c)
public int addTriangle(int i,
int j,
int k)
public int addTriangle(int i,
int j,
int k,
int color)
public void setTriangleCapacity(int nn)
public void ensureTriangleCapacity()
public void addSphere(double xx,
double yy,
double zz,
double rr,
int cc)
public void addLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int c1,
int c2)
public void addCylinder(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double r,
int c1,
int c2)
public static Tmesh readPly(FILE f)
public static Tmesh read(java.lang.String file)
public double distance(int v0,
int v1)
public double distance(int v0,
double[] p)
public void mid(double[] v,
int v0,
int v1)
public void output(java.lang.String filename)
public double getBoundingSphere(double[] c)
public void clip(int uv)
public void recalculateNormals()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
public void smooth(double dlen)
public static Tmesh copy(DynamicArray objects)
public Renderer getRenderer()
public void setRenderer(Renderer r)
public int getRenderPass()
public void setRenderPass(int newRenderPass)
newRenderPass - The new RenderPass value.public void render()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||