|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.Curve
artofillusion.object.Tube
public class Tube
Tube represents a "thick" curve. It subclasses Curve, since it has all the properties of a an ordinary curve, but changes the way it is rendered. The actual surface is created by extruding a circular profile along the curve. The thickness of the Tube can be specified at each vertex.
Nested Class Summary | |
---|---|
static class |
Tube.TubeKeyframe
This class represents a pose of a Tube. |
Nested classes/interfaces inherited from class artofillusion.object.Curve |
---|
Curve.CurveKeyframe |
Field Summary | |
---|---|
static int |
CLOSED_ENDS
|
static int |
FLAT_ENDS
|
static int |
OPEN_ENDS
|
Fields inherited from class artofillusion.object.Object3D |
---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
Fields inherited from interface artofillusion.object.Mesh |
---|
APPROXIMATING, INTERPOLATING, NO_SMOOTHING, SMOOTH_SHADING |
Constructor Summary | |
---|---|
Tube(Curve c,
double[] thickness,
int endsStyle)
Create a tube based on a Curve. |
|
Tube(java.io.DataInputStream in,
Scene theScene)
The following two methods are used for reading and writing files. |
|
Tube(MeshVertex[] v,
float[] smoothness,
double[] thickness,
int smoothingMethod,
int endsStyle)
Create a tube, explicitly specifying all parameters. |
|
Tube(Vec3[] v,
double thickness,
int smoothingMethod,
int endsStyle)
Create a tube with uniform thickness and a smoothness of 1 at all vertices. |
|
Tube(Vec3[] v,
float[] smoothness,
double[] thickness,
int smoothingMethod,
int endsStyle)
Create a tube, explicitly specifying all parameters. |
Method Summary | |
---|---|
void |
applyPoseKeyframe(Keyframe k)
Modify this object based on a pose keyframe. |
static double |
calcApproxThickness(double[] t,
float[] s,
int i,
int j,
int k)
|
static double |
calcInterpThickness(double[] t,
float[] s,
int i,
int j,
int k,
int m)
|
boolean |
canConvertToActor()
Determine whether the user should be allowed to convert this object to an Actor. |
int |
canConvertToTriangleMesh()
Tells whether the object can be converted to a TriangleMesh. |
boolean |
canSetTexture()
This method tells whether textures can be assigned to the object. |
TriangleMesh |
convertToTriangleMesh(double tol)
Get a triangle mesh which approximates the surface of this object at the specified accuracy. |
void |
copyObject(Object3D obj)
Make this object identical to another one. |
MeshViewer |
createMeshViewer(MeshEditController controller,
RowContainer options)
Get a MeshViewer which can be used for viewing this mesh. |
Object3D |
duplicate()
Create an exact duplicate of this object. |
void |
edit(EditingWindow parent,
ObjectInfo info,
java.lang.Runnable cb)
Display a window in which the user can edit this object. |
void |
editGesture(EditingWindow parent,
ObjectInfo info,
java.lang.Runnable cb,
ObjectInfo realObject)
Edit an object which represents a gesture for an Actor object. |
int |
getEndsStyle()
Get the ends style. |
Object3D |
getPosableObject()
Tubes cannot be keyframed directly, since any change to mesh topology would cause all keyframes to become invalid. |
Keyframe |
getPoseKeyframe()
Return a Keyframe which describes the current pose of this object. |
Property[] |
getProperties()
Get a list of editable properties defined by this object. |
java.lang.Object |
getPropertyValue(int index)
Get the value of one of this object's editable properties. |
RenderingMesh |
getRenderingMesh(double tol,
boolean interactive,
ObjectInfo info)
Get a rendering mesh representing the surface of this object at the specified accuracy. |
double[] |
getThickness()
Get the thickness of the tube at each vertex. |
WireframeMesh |
getWireframeMesh()
Get a wireframe mesh representing the surface of this object at the specified accuracy. |
boolean |
isClosed()
Determine whether this tube is a closed surface. |
void |
setClosed(boolean isClosed)
Make sure the ends style is consistent with the closed flag. |
void |
setEndsStyle(int style)
Set the ends style. |
void |
setMaterial(Material mat,
MaterialMapping map)
When setting the material, we need to clear the cached meshes. |
void |
setPropertyValue(int index,
java.lang.Object value)
Set the value of one of this object's editable properties. |
void |
setShape(MeshVertex[] v,
float[] smoothness,
double[] thickness)
Set the position, smoothness, and thickness values for all points. |
void |
setTexture(Texture tex,
TextureMapping mapping)
When setting the texture, we need to clear the cached meshes. |
void |
setThickness(double[] thickness)
Set the thickness of the tube at each vertex. |
Tube |
subdivideTube(double tol)
Subdivide the curve which defines this tube to the specified tolerance. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
The following method writes the object's data to an output stream. |
Methods inherited from class artofillusion.object.Curve |
---|
calcApproxPoint, calcInterpPoint, getBounds, getNormals, getSkeleton, getSmoothingMethod, getSmoothness, getVertexPositions, getVertices, isEditable, movePoint, setShape, setSize, setSkeleton, setSmoothingMethod, setSmoothness, setVertexPositions, subdivideCurve, subdivideCurve |
Methods inherited from class artofillusion.object.Object3D |
---|
canSetMaterial, configurePoseTrack, copyTextureAndMaterial, editKeyframe, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getTexture, getTextureMapping, readParameterValue, renderObject, sceneChanged, setParameters, setParameterValue, setParameterValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artofillusion.object.Mesh |
---|
getParameters, getParameterValues |
Field Detail |
---|
public static final int OPEN_ENDS
public static final int CLOSED_ENDS
public static final int FLAT_ENDS
Constructor Detail |
---|
public Tube(Vec3[] v, float[] smoothness, double[] thickness, int smoothingMethod, int endsStyle)
public Tube(MeshVertex[] v, float[] smoothness, double[] thickness, int smoothingMethod, int endsStyle)
public Tube(Curve c, double[] thickness, int endsStyle)
public Tube(Vec3[] v, double thickness, int smoothingMethod, int endsStyle)
public Tube(java.io.DataInputStream in, Scene theScene) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public Object3D duplicate()
duplicate
in interface Mesh
duplicate
in class Curve
public void copyObject(Object3D obj)
copyObject
in interface Mesh
copyObject
in class Curve
public double[] getThickness()
public void setThickness(double[] thickness)
public void setShape(MeshVertex[] v, float[] smoothness, double[] thickness)
public int getEndsStyle()
public void setEndsStyle(int style)
public boolean isClosed()
isClosed
in class Curve
public void setClosed(boolean isClosed)
setClosed
in class Curve
public Tube subdivideTube(double tol)
public static double calcInterpThickness(double[] t, float[] s, int i, int j, int k, int m)
public static double calcApproxThickness(double[] t, float[] s, int i, int j, int k)
public boolean canSetTexture()
Object3D
canSetTexture
in class Curve
public int canConvertToTriangleMesh()
Object3D
canConvertToTriangleMesh
in class Curve
public RenderingMesh getRenderingMesh(double tol, boolean interactive, ObjectInfo info)
getRenderingMesh
in class Object3D
public void setTexture(Texture tex, TextureMapping mapping)
setTexture
in class Object3D
public void setMaterial(Material mat, MaterialMapping map)
setMaterial
in class Object3D
public WireframeMesh getWireframeMesh()
getWireframeMesh
in class Curve
public TriangleMesh convertToTriangleMesh(double tol)
convertToTriangleMesh
in class Curve
public void edit(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb)
Object3D
edit
in class Curve
parent
- the window from which this command is being invokedinfo
- the ObjectInfo corresponding to this objectcb
- a callback which will be executed when editing is complete. If the user
cancels the operation, it will not be called.public void editGesture(EditingWindow parent, ObjectInfo info, java.lang.Runnable cb, ObjectInfo realObject)
Object3D
editGesture
in class Curve
public MeshViewer createMeshViewer(MeshEditController controller, RowContainer options)
createMeshViewer
in interface Mesh
createMeshViewer
in class Curve
public void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
Object3D
writeToFile
in class Curve
java.io.IOException
public Property[] getProperties()
Object3D
getProperties
in class Curve
public java.lang.Object getPropertyValue(int index)
Object3D
getPropertyValue
in class Curve
index
- the index of the property to getpublic void setPropertyValue(int index, java.lang.Object value)
Object3D
setPropertyValue
in class Curve
index
- the index of the property to setvalue
- the value to set for the propertypublic Keyframe getPoseKeyframe()
getPoseKeyframe
in class Curve
public void applyPoseKeyframe(Keyframe k)
applyPoseKeyframe
in class Curve
public boolean canConvertToActor()
Object3D
canConvertToActor
in class Curve
public Object3D getPosableObject()
getPosableObject
in class Curve
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |