|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectartofillusion.object.Object3D
artofillusion.object.CSGObject
public class CSGObject
A CSGObject is an Object3D that represents the union, intersection, or difference of two component objects.
| Nested Class Summary | |
|---|---|
static class |
CSGObject.CSGKeyframe
Inner class representing a pose for a CSGObject. |
| Field Summary | |
|---|---|
static int |
DIFFERENCE12
|
static int |
DIFFERENCE21
|
static int |
INTERSECTION
|
static int |
UNION
|
| Fields inherited from class artofillusion.object.Object3D |
|---|
APPROXIMATELY, CANT_CONVERT, EXACTLY |
| Constructor Summary | |
|---|---|
CSGObject(java.io.DataInputStream in,
Scene theScene)
|
|
CSGObject(ObjectInfo o1,
ObjectInfo o2,
int op)
|
|
| Method Summary | |
|---|---|
void |
applyPoseKeyframe(Keyframe k)
Modify this object based on a pose keyframe. |
int |
canConvertToTriangleMesh()
Tells whether the object can be converted to a TriangleMesh. |
Vec3 |
centerObjects()
Center the component objects, and return the vector by which they were displaced. |
TriangleMesh |
convertToTriangleMesh(double tol)
Create a triangle mesh representing this object. |
void |
copyObject(Object3D obj)
Copy all the properties of another object, to make this one identical to it. |
Object3D |
duplicate()
Create a new object which is an exact duplicate of this one. |
void |
edit(EditingWindow parent,
ObjectInfo info,
java.lang.Runnable cb)
Display a window in which the user can edit this object. |
void |
editKeyframe(EditingWindow parent,
Keyframe k,
ObjectInfo info)
Allow the user to edit a keyframe returned by getPoseKeyframe(). |
BoundingBox |
getBounds()
Get a BoundingBox which just encloses the object. |
ObjectInfo |
getObject1()
Get the first object. |
ObjectInfo |
getObject2()
Get the second object. |
int |
getOperation()
Get the boolean operation to be performed. |
Keyframe |
getPoseKeyframe()
Return a Keyframe which describes the current pose of this object. |
RenderingMesh |
getRenderingMesh(double tol,
boolean interactive,
ObjectInfo info)
Get a RenderingMesh for this object. |
WireframeMesh |
getWireframeMesh()
Get a WireframeMesh for this object. |
boolean |
isClosed()
This object is closed if both of its component objects are closed. |
boolean |
isEditable()
Allow the user to edit this object. |
void |
setComponentObjects(ObjectInfo o1,
ObjectInfo o2)
Set the component objects. |
void |
setMaterial(Material mat,
MaterialMapping mapping)
Set the Material and MaterialMapping for this object. |
void |
setOperation(int op)
Set the boolean operation to be performed. |
void |
setSize(double xsize,
double ysize,
double zsize)
Resize the object. |
void |
setTexture(Texture tex,
TextureMapping mapping)
When setting the texture or material, also set it for each of the component objects. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
Save this object to an output stream. |
| Methods inherited from class artofillusion.object.Object3D |
|---|
canConvertToActor, canSetMaterial, canSetTexture, configurePoseTrack, copyTextureAndMaterial, editGesture, getAverageParameterValues, getMaterial, getMaterialMapping, getParameters, getParameterValue, getParameterValues, getPosableObject, getProperties, getPropertyValue, getSkeleton, getTexture, getTextureMapping, readParameterValue, renderObject, sceneChanged, setParameters, setParameterValue, setParameterValues, setPropertyValue |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNION
public static final int INTERSECTION
public static final int DIFFERENCE12
public static final int DIFFERENCE21
| Constructor Detail |
|---|
public CSGObject(ObjectInfo o1,
ObjectInfo o2,
int op)
public CSGObject(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 class Object3Dpublic void copyObject(Object3D obj)
copyObject in class Object3Dpublic ObjectInfo getObject1()
public ObjectInfo getObject2()
public int getOperation()
public void setOperation(int op)
public void setComponentObjects(ObjectInfo o1,
ObjectInfo o2)
public Vec3 centerObjects()
public BoundingBox getBounds()
getBounds in class Object3D
public void setSize(double xsize,
double ysize,
double zsize)
setSize in class Object3Dpublic int canConvertToTriangleMesh()
canConvertToTriangleMesh in class Object3Dpublic boolean isClosed()
isClosed in class Object3Dpublic TriangleMesh convertToTriangleMesh(double tol)
convertToTriangleMesh in class Object3Dpublic boolean isEditable()
isEditable in class Object3D
public void edit(EditingWindow parent,
ObjectInfo info,
java.lang.Runnable cb)
Object3D
edit in class Object3Dparent - 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 setTexture(Texture tex,
TextureMapping mapping)
setTexture in class Object3D
public void setMaterial(Material mat,
MaterialMapping mapping)
Object3D
setMaterial in class Object3D
public RenderingMesh getRenderingMesh(double tol,
boolean interactive,
ObjectInfo info)
getRenderingMesh in class Object3Dpublic WireframeMesh getWireframeMesh()
getWireframeMesh in class Object3D
public void writeToFile(java.io.DataOutputStream out,
Scene theScene)
throws java.io.IOException
writeToFile in class Object3Djava.io.IOExceptionpublic Keyframe getPoseKeyframe()
getPoseKeyframe in class Object3Dpublic void applyPoseKeyframe(Keyframe k)
applyPoseKeyframe in class Object3D
public void editKeyframe(EditingWindow parent,
Keyframe k,
ObjectInfo info)
editKeyframe in class Object3D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||