Package au.edu.unsw.cse
Class Triangle3d
java.lang.Object
au.edu.unsw.cse.Object3dAdaptor
au.edu.unsw.cse.Triangle3d
- All Implemented Interfaces:
Object3d
- Direct Known Subclasses:
Triangle3dPlus
public class Triangle3d extends Object3dAdaptor
-
Field Summary
Fields inherited from class au.edu.unsw.cse.Object3dAdaptor
centre, firstFrame, lastFrame
-
Constructor Summary
Constructors Constructor Description Triangle3d(Point3d[] tri, int col)
Create a triangle with given colourTriangle3d(Point3d a, Point3d b, Point3d c, int frameNo)
-
Method Summary
Modifier and Type Method Description double
depthBias(View3d v)
Depth bias - used to adjust depth in depth sort so that front facing faces appear in front of back facesboolean
inside(Point3d x)
void
render(View3d v)
render the triangle, given a 3D viewjava.lang.String
toString()
java.lang.String
toVRMLBody(VRMLState v)
void
transform(au.edu.unsw.cse.Matrix3D T)
compute new position of trijava.lang.String
vrmlPROTOExtraFields()
java.lang.String
vrmlPROTOINBody()
java.lang.String[]
vrmlPROTOMaterials()
java.lang.String
vrmlPROTOName()
Methods inherited from class au.edu.unsw.cse.Object3dAdaptor
centre, getColorIndex, getFirstFrame, getLastFrame, getSelectFrame, id, select, setCentre, setFirstFrame, setLastFrame, toVRML, visible, vrmlPROTO, vrmlPROTOBody, vrmlPROTOFields, vrmlPROTOINFields
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
tri
-
-
Constructor Details
-
Triangle3d
Create a triangle with given colour -
Triangle3d
-
-
Method Details
-
render
render the triangle, given a 3D view- Specified by:
render
in interfaceObject3d
- Overrides:
render
in classObject3dAdaptor
-
inside
-
depthBias
Description copied from interface:Object3d
Depth bias - used to adjust depth in depth sort so that front facing faces appear in front of back faces- Specified by:
depthBias
in interfaceObject3d
- Overrides:
depthBias
in classObject3dAdaptor
-
transform
public void transform(au.edu.unsw.cse.Matrix3D T)compute new position of tri- Specified by:
transform
in interfaceObject3d
- Overrides:
transform
in classObject3dAdaptor
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
vrmlPROTOName
public java.lang.String vrmlPROTOName()- Overrides:
vrmlPROTOName
in classObject3dAdaptor
-
vrmlPROTOExtraFields
public java.lang.String vrmlPROTOExtraFields()- Overrides:
vrmlPROTOExtraFields
in classObject3dAdaptor
-
vrmlPROTOMaterials
public java.lang.String[] vrmlPROTOMaterials()- Overrides:
vrmlPROTOMaterials
in classObject3dAdaptor
-
vrmlPROTOINBody
public java.lang.String vrmlPROTOINBody()- Overrides:
vrmlPROTOINBody
in classObject3dAdaptor
-
toVRMLBody
- Overrides:
toVRMLBody
in classObject3dAdaptor
-