Package au.edu.unsw.cse
Class Triangle3dPlus
java.lang.Object
au.edu.unsw.cse.Object3dAdaptor
au.edu.unsw.cse.Triangle3d
au.edu.unsw.cse.Triangle3dPlus
- All Implemented Interfaces:
Object3d
public class Triangle3dPlus extends Triangle3d
A 3d triangle with a list of associated points
-
Field Summary
Fields inherited from class au.edu.unsw.cse.Triangle3d
tri
Fields inherited from class au.edu.unsw.cse.Object3dAdaptor
centre, firstFrame, lastFrame
-
Constructor Summary
Constructors Constructor Description Triangle3dPlus(Point3d a, Point3d b, Point3d c, int frameNo)
-
Method Summary
Modifier and Type Method Description boolean
add(Point3dObject3d p)
try to add a point to association list.double
depthBias(View3d v)
Depth bias - used to adjust depth in depth sort so that front facing faces appear in front of back facesPoint3dObject3d
extreme()
return point farthest from support plane of this triangleint
getColorIndex(View3d v, int col)
Object3dList
getPoints()
return list of points associated with this trianglevoid
render(View3d v)
render the triangle, given a 3D viewvoid
select(int n)
java.lang.String
toVRMLBody(VRMLState v)
java.lang.String
vrmlPROTOExtraFields()
java.lang.String
vrmlPROTOINBody()
java.lang.String[]
vrmlPROTOMaterials()
java.lang.String
vrmlPROTOName()
Methods inherited from class au.edu.unsw.cse.Triangle3d
inside, toString, transform
Methods inherited from class au.edu.unsw.cse.Object3dAdaptor
centre, getFirstFrame, getLastFrame, getSelectFrame, id, 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
-
Constructor Details
-
Triangle3dPlus
-
-
Method Details
-
add
try to add a point to association list. Return true if succesful -
select
public void select(int n)- Specified by:
select
in interfaceObject3d
- Overrides:
select
in classObject3dAdaptor
-
getPoints
return list of points associated with this triangle -
extreme
return point farthest from support plane of this triangle -
render
render the triangle, given a 3D view- Specified by:
render
in interfaceObject3d
- Overrides:
render
in classTriangle3d
-
getColorIndex
- Overrides:
getColorIndex
in classObject3dAdaptor
-
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 classTriangle3d
-
vrmlPROTOName
public java.lang.String vrmlPROTOName()- Overrides:
vrmlPROTOName
in classTriangle3d
-
vrmlPROTOExtraFields
public java.lang.String vrmlPROTOExtraFields()- Overrides:
vrmlPROTOExtraFields
in classTriangle3d
-
vrmlPROTOMaterials
public java.lang.String[] vrmlPROTOMaterials()- Overrides:
vrmlPROTOMaterials
in classTriangle3d
-
vrmlPROTOINBody
public java.lang.String vrmlPROTOINBody()- Overrides:
vrmlPROTOINBody
in classTriangle3d
-
toVRMLBody
- Overrides:
toVRMLBody
in classTriangle3d
-