#include <DrawObj.H>
Inherited by IS3D::ArrowObj, IS3D::AxesObj, IS3D::BoxObj, IS3D::DebugDraw, IS3D::Default3DMenu, IS3D::EventDisplay, IS3D::EyeProjectionObj, IS3D::IFSObj, IS3D::ModelObj, IS3D::MultiColumnMenu, IS3D::NamedAxesObj, IS3D::NektarModelObj, IS3D::ProgressBar, IS3D::ScreenTextObj, IS3D::SphereObj, IS3D::TextObj, IS3D::TextScreen, and IS3D::VRMLObj.
Public Member Functions | |
DrawObj (std::string name, int roomObj=0, int displayInitially=1) | |
virtual | ~DrawObj () |
virtual void | contextInit () |
virtual void | draw ()=0 |
Override this function and place your G3D draw calls inside it. | |
virtual void | highlight () |
default selection feedback is just to show the bounding box | |
virtual void | unhighlight () |
default deselection feedback is just to hide the bounding box | |
virtual void | reColor (const Color4 &c, int colorNum=0) |
virtual void | reTexture (const std::string &texname, int texNum=0) |
virtual void | setCoordinateFrame (CoordinateFrame cf) |
virtual void | setBoundingBox (BBox bbox) |
virtual void | setDisplayed (bool d) |
virtual void | setBoundingBoxDisplayed (bool d) |
virtual void | setMovable (bool m) |
virtual void | setRenderAsTransparent (bool t) |
virtual void | setRoomObj (bool r) |
virtual void | setDrawingPass (int d) |
virtual void | setContextInitialized () |
virtual void | setLit (bool l) |
std::string | getName () |
CoordinateFrame | getCoordinateFrame () |
BBox | getBoundingBox () |
bool | getDisplayed () |
bool | getBoundingBoxDisplayed () |
bool | getMovable () |
bool | getSelectable () |
bool | getRenderAsTransparent () |
bool | getRoomObj () |
int | getDrawingPass () |
bool | getContextInitialized () |
bool | getLit () |
virtual void | show () |
virtual void | hide () |
virtual void | showBoundingBox () |
virtual void | hideBoundingBox () |
virtual bool | pointIntersectCoarse (const Vector3 &pobj) |
virtual bool | pointIntersectFine (const Vector3 &pobj) |
virtual void | writeVRML (ostream *os) |
Write VRML 1.0 (.wrl) format description of the DrawObj. | |
virtual void | readVRML (istream *is) |
Read VRML 1.0 (.wrl) format description of the DrawObj. | |
virtual void | writeIS3 (ostream *os) |
Write InSpace3D (.is3) format description of the DrawObj. | |
virtual void | readIS3 (istream *is) |
Read InSpace3D (.is3) format description of the DrawObj. | |
Protected Attributes | |
std::string | _name |
CoordinateFrame | _frame |
BBox | _bbox |
bool | _displayed |
bool | _bboxDisplayed |
bool | _movable |
bool | _selectable |
bool | _transparent |
bool | _roomObj |
int | _drawingPass |
bool | _contextInitialized |
bool | _lit |
IS3D::DrawObj::DrawObj | ( | std::string | name, | |
int | roomObj = 0 , |
|||
int | displayInitially = 1 | |||
) |
virtual IS3D::DrawObj::~DrawObj | ( | ) | [virtual] |
virtual void IS3D::DrawObj::contextInit | ( | ) | [inline, virtual] |
Implement this to do any GL specific initialization that you need to within your object. Called once per GL context the first frame after the object is created (when the GL context is active).
virtual void IS3D::DrawObj::draw | ( | ) | [pure virtual] |
Override this function and place your G3D draw calls inside it.
Implemented in IS3D::DebugDraw, IS3D::Default3DMenu, IS3D::EventDisplay, IS3D::EyeProjectionObj, IS3D::IFSObj, IS3D::ModelObj, IS3D::MultiColumnMenu, IS3D::ProgressBar, IS3D::BoxObj, IS3D::ArrowObj, IS3D::AxesObj, IS3D::SphereObj, IS3D::TextObj, IS3D::ScreenTextObj, IS3D::NamedAxesObj, IS3D::TextScreen, IS3D::VRMLObj, and IS3D::NektarModelObj.
virtual void IS3D::DrawObj::highlight | ( | ) | [inline, virtual] |
virtual void IS3D::DrawObj::unhighlight | ( | ) | [inline, virtual] |
virtual void IS3D::DrawObj::reColor | ( | const Color4 & | c, | |
int | colorNum = 0 | |||
) | [virtual] |
Some interactive widgets assume they can call this functions on any DrawObj, you should override if appropriate.
Reimplemented in IS3D::IFSObj, IS3D::VRMLObj, and IS3D::NektarModelObj.
virtual void IS3D::DrawObj::reTexture | ( | const std::string & | texname, | |
int | texNum = 0 | |||
) | [virtual] |
Some interactive widgets assume they can call this functions on any DrawObj, you should override if appropriate.
Reimplemented in IS3D::IFSObj, IS3D::VRMLObj, and IS3D::NektarModelObj.
virtual void IS3D::DrawObj::setCoordinateFrame | ( | CoordinateFrame | cf | ) | [inline, virtual] |
References _frame.
virtual void IS3D::DrawObj::setBoundingBoxDisplayed | ( | bool | d | ) | [inline, virtual] |
virtual void IS3D::DrawObj::setMovable | ( | bool | m | ) | [inline, virtual] |
References _movable.
virtual void IS3D::DrawObj::setRenderAsTransparent | ( | bool | t | ) | [inline, virtual] |
References _transparent.
virtual void IS3D::DrawObj::setRoomObj | ( | bool | r | ) | [inline, virtual] |
References _roomObj.
virtual void IS3D::DrawObj::setDrawingPass | ( | int | d | ) | [inline, virtual] |
References _drawingPass.
virtual void IS3D::DrawObj::setContextInitialized | ( | ) | [inline, virtual] |
References _contextInitialized.
virtual void IS3D::DrawObj::setLit | ( | bool | l | ) | [inline, virtual] |
References _lit.
std::string IS3D::DrawObj::getName | ( | ) | [inline] |
References _name.
CoordinateFrame IS3D::DrawObj::getCoordinateFrame | ( | ) | [inline] |
References _frame.
bool IS3D::DrawObj::getDisplayed | ( | ) | [inline] |
References _displayed.
bool IS3D::DrawObj::getBoundingBoxDisplayed | ( | ) | [inline] |
References _bboxDisplayed.
bool IS3D::DrawObj::getMovable | ( | ) | [inline] |
References _movable.
bool IS3D::DrawObj::getSelectable | ( | ) | [inline] |
References _selectable.
bool IS3D::DrawObj::getRenderAsTransparent | ( | ) | [inline] |
References _transparent.
bool IS3D::DrawObj::getRoomObj | ( | ) | [inline] |
References _roomObj.
int IS3D::DrawObj::getDrawingPass | ( | ) | [inline] |
References _drawingPass.
bool IS3D::DrawObj::getContextInitialized | ( | ) | [inline] |
References _contextInitialized.
bool IS3D::DrawObj::getLit | ( | ) | [inline] |
References _lit.
virtual void IS3D::DrawObj::show | ( | ) | [inline, virtual] |
References setDisplayed().
virtual void IS3D::DrawObj::hide | ( | ) | [inline, virtual] |
References setDisplayed().
virtual void IS3D::DrawObj::showBoundingBox | ( | ) | [inline, virtual] |
virtual void IS3D::DrawObj::hideBoundingBox | ( | ) | [inline, virtual] |
virtual bool IS3D::DrawObj::pointIntersectCoarse | ( | const Vector3 & | pobj | ) | [virtual] |
A fast routine to check whether this point falls within the object. Typically used for selection of objects. By default, this just checks to see whether the point falls within the object's bounding box. If it does, you will probably then want to proceed to call the pointIntersectFine() method to determine with more confidence whether the point actually lies within the object.
virtual bool IS3D::DrawObj::pointIntersectFine | ( | const Vector3 & | pobj | ) | [virtual] |
Same idea as pointIntersectCoarse() except that this routine should be implemented by subclasses since it is more precise than the simple bounding box check. This is a slower routine that gives a better approximation to whether the point actually lies within the object.
virtual void IS3D::DrawObj::writeVRML | ( | ostream * | os | ) | [virtual] |
Write VRML 1.0 (.wrl) format description of the DrawObj.
virtual void IS3D::DrawObj::readVRML | ( | istream * | is | ) | [virtual] |
Read VRML 1.0 (.wrl) format description of the DrawObj.
virtual void IS3D::DrawObj::writeIS3 | ( | ostream * | os | ) | [virtual] |
Write InSpace3D (.is3) format description of the DrawObj.
virtual void IS3D::DrawObj::readIS3 | ( | istream * | is | ) | [virtual] |
Read InSpace3D (.is3) format description of the DrawObj.
std::string IS3D::DrawObj::_name [protected] |
CoordinateFrame IS3D::DrawObj::_frame [protected] |
Referenced by getCoordinateFrame(), and setCoordinateFrame().
BBox IS3D::DrawObj::_bbox [protected] |
Referenced by getBoundingBox(), and setBoundingBox().
bool IS3D::DrawObj::_displayed [protected] |
Referenced by getDisplayed().
bool IS3D::DrawObj::_bboxDisplayed [protected] |
Referenced by getBoundingBoxDisplayed(), and setBoundingBoxDisplayed().
bool IS3D::DrawObj::_movable [protected] |
Referenced by getMovable(), and setMovable().
bool IS3D::DrawObj::_selectable [protected] |
Referenced by getSelectable().
bool IS3D::DrawObj::_transparent [protected] |
Referenced by getRenderAsTransparent(), and setRenderAsTransparent().
bool IS3D::DrawObj::_roomObj [protected] |
Referenced by getRoomObj(), and setRoomObj().
int IS3D::DrawObj::_drawingPass [protected] |
Referenced by getDrawingPass(), and setDrawingPass().
bool IS3D::DrawObj::_contextInitialized [protected] |
Referenced by getContextInitialized(), and setContextInitialized().
bool IS3D::DrawObj::_lit [protected] |