#include <ivf/IvfShape.h>
Inheritance diagram for CIvfShape:
Public Types | |
enum | THighlightState { HS_ON, HS_OFF } |
enum | THighlightType { HT_MATERIAL, HT_LIGHTEN } |
Public Member Functions | |
bool | isEnabledHighlight () |
void | disableHighlight () |
void | enableHighlight () |
void | setHighlightType (THighlightType type) |
CIvfShape () | |
virtual | ~CIvfShape () |
IvfClassInfo ("CIvfShape", CIvfObject) | |
virtual void | refresh () |
virtual void | setHighlight (THighlightState state) |
THighlightState | getHighlight () |
void | setUseName (bool flag) |
bool | getUseName () |
void | setObjectName (GLuint name) |
GLuint | getObjectName () |
void | assignPointTo (CIvfPoint3d *point) |
void | assignPositionTo (CIvfShape *shape) |
void | setHighlightMaterial (CIvfMaterial *material) |
CIvfMaterial * | getHightlightMaterial () |
void | setMaterial (CIvfMaterial *material) |
virtual CIvfMaterial * | getMaterial () |
void | setTexture (CIvfTexture *texture) |
CIvfTexture * | getTexture () |
void | setRotationQuat (double vx, double vy, double vz, double theta) |
void | setRotation (CIvfQuat &q) |
void | getRotationQuat (double &vx, double &vy, double &vz, double &theta) |
void | setRotation (const double xRot, const double yRot, const double zRot) |
void | getRotation (double &xRot, double &yRot, double &zRot) |
virtual void | setPosition (const double x, const double y, const double z) |
virtual void | setPosition (CIvfShape *shape) |
virtual void | setPosition (CIvfPoint3d *point) |
virtual void | setPosition (CIvfPoint3d &pos) |
virtual void | setPosition (CIvfVec3d &pos) |
virtual void | getPosition (double &x, double &y, double &z) |
virtual void | getPosition (CIvfShape *shape) |
virtual void | getPosition (CIvfPoint3d *point) |
virtual CIvfVec3d & | getPosition () |
void | setScale (const double xScale, const double yScale, const double zScale) |
void | getScale (double &xScale, double &yScale, double &zScale) |
void | setSelectMaterial (CIvfMaterial *material) |
void | setNormalize (bool flag) |
Protected Member Functions | |
virtual void | createGeometry () |
virtual void | createSelect () |
virtual void | endTransform () |
virtual void | beginTransform () |
virtual void | createMaterial () |
CIvfShape implements a CIvfObject with a material and a position. Methods for moving, and rotation are implemented. The CIvfShape also has a special material and state for a highlight effect. CIvfShape should be considered an abstract class. Classes derived from CIvfShape should override the createGeometry, createSelect methods.
handlers.cpp, and manip.cpp.
Definition at line 55 of file IvfShape.h.
|
CIvfShape constructor |
|
CIvfShape destructor |
|
Assign a CIvfPoint the position of the object.
|
|
Assigns the position of the object to a CIvfShape instance.
|
|
Start transform Implements a OpenGL transform. This routine should call a glPushMatrix() and then call OpenGL routines transforming the object. The method is the first routine to be called in the render() method. Reimplemented from CIvfObject. Reimplemented in CIvfOldScene, and CIvfSelectComposite. |
|
Forces an object recalculation. Reimplemented from CIvfObject. Reimplemented in CIvfBillboard, CIvfComposite, CIvfCone, CIvfConstructionPlane, CIvfCulledComposite, CIvfCulledScene, CIvfCursor, CIvfExtrArrow, CIvfExtrusion, CIvfFaceSet, CIvfGrid, CIvfLight, CIvfLightComposite, CIvfLineSet, CIvfLineStripSet, CIvfMesh, CIvfMultiply, CIvfNode, CIvfNodeCursor, CIvfOldScene, CIvfPointSet, CIvfPolySet, CIvfQuadSet, CIvfQuadStripSet, CIvfRuler, CIvfSceneBase, CIvfSelectComposite, CIvfSelectionBox, CIvfShapeSelection, CIvfSimpleLineSet, CIvfSphere, CIvfSwitch, CIvfTriSet, CIvfTriStripSet, CIvfVertexElements, CIvfWireBrick, CIvfWorkspace, CIvfBitmapFont, CIvfExtrudedFont, CIvfOutlineFont, CIvfPixmapFont, CIvfPolygonalFont, CIvfRasterFont, CIvfText, CIvfTextureFont, CIvfGleExtrusion, CIvfGlePolyCone, CIvfGlePolyCylinder, CIvfGleSpiral, and CIvfGleTwistExtrusion. |
|
Creates the material of the object. This method is called from the render() method when material rendering is to be done. Objects derived from CIvfObject should implement material routines from this method using OpenGL. Reimplemented from CIvfObject. |
|
Creates the select object. When the object is selected. This method is called to create the object respresenting the select state. Reimplemented from CIvfObject. Reimplemented in CIvfBrick, CIvfCone, CIvfExtrusion, CIvfNode, and CIvfSphere. |
|
End transform This is the last method called in the render() method. if a glPushMatrix() is called in the beginTransform() a glPopMatrix() should be called in this routine. Reimplemented from CIvfObject. Reimplemented in CIvfOldScene, and CIvfSelectComposite. |
|
Returns the highlight state |
|
Returns the used highlight material |
|
Returns the used material |
|
Returns object name (number). |
|
Return position of object |
|
Return position of object |
|
Return position of object |
|
Return position of object Reimplemented in CIvfConstructionPlane. |
|
Get rotation of object (obsolete) |
|
Return quaternion rotation of the object |
|
Return object scale |
|
Returns used texture |
|
Returns name rendering flag. |
|
Force object refresh Reimplemented in CIvfComposite, CIvfGLPrimitive, CIvfGrid, CIvfMultiply, CIvfSolidLine, CIvfSplineTube, and CIvfTubeExtrusion. |
|
Sets the highlight state of the object. If the highlight state is IVF_HIGHLIGHT_ON the object is rendered using the highlight material instead of the normal material. This can be used to change object appearance when the mouse moves over it.
|
|
Assign highlight material Assigns the material used to highlight the object. The CIvfShape class increases the reference count of the material when it is assigned to the class. When the destructor of the class is called the reference count is decreased. If the material is not referenced it is deleted.
Reimplemented in CIvfShapeSelection. |
|
Assign material Assigns the default material to the object. The CIvfShape class increases the reference count of the material when it is assigned to the class. When the destructor of the class is called the reference count is decreased. If the material is not referenced it is deleted.
|
|
Enable/disable normalization of normals |
|
Object name Sets the name (number) of the object to be rendered if the name rendering flag is set to true. |
|
Position of object Sets the position of the object int the global coordinate system.
|
|
Position of object Sets the position of the object int the global coordinate system.
|
|
Position of object Sets the position of the object int the global coordinate system.
|
|
Position of object Sets the position of the object int the global coordinate system.
|
|
Position of object Sets the position of the object in the global coordinate system.
Reimplemented in CIvfConstructionPlane. |
|
Set rotation of object (obsolete) |
|
Sets the rotation of the object specified by an CIvfQuat. |
|
Set the quaternion rotation of the object. Sets the rotation of the object specifying a rotation axis and a rotation angle.
Reimplemented in CIvfConstructionPlane. |
|
Object scale Sets the scaling of the object in x,y and z directions.
|
|
Set material for selection |
|
Assign texture Assigns the default texture to the object. The CIvfShape class increases the reference count of the texture when it is assigned to the class. When the destructor of the class is called the reference count is decreased. If the texture is not referenced it is deleted.
Reimplemented in CIvfQuadPlane. |
|
Sets name rendering flag. Names are used when using selection in OpenGL.
|