#include <FXGLVertices.h>
Public Types | |
typedef void(* | ColorGeneratorFunc )(FXGLColor &color, FXGLVertices *obj, FXGLViewer *viewer, FXuint vertex, void *&data) |
enum | { ID_SHADEOFF, ID_SHADEON, ID_SHADESMOOTH, ID_TOGGLE_SIDED, ID_TOGGLE_CULLING, ID_STYLE_POINTS, ID_STYLE_WIREFRAME, ID_STYLE_SURFACE, ID_STYLE_BOUNDINGBOX, ID_FRONT_MATERIAL, ID_BACK_MATERIAL, ID_LAST } |
enum | { ID_LAST } |
Public Member Functions | |
FXGLVertices (FXfloat x, FXfloat y, FXfloat z, FXuint opts=VERTICES_POINTS, FXVec3f *vertices=NULL, FXuint no=0, FXfloat pointSize=4.0f, FXfloat lineSize=1.0f) | |
FXGLVertices (const FXGLVertices &orig) | |
void | setModified (bool v=true) |
FXuint | getNumberOfVertices () const |
void | setNumberOfVertices (FXuint vertices) |
FXVec3f * | getVertices () const |
void | setVertices (FXVec3f *verts, FXuint no) |
FXfloat | getPointSize () const |
void | setPointSize (FXfloat ps) |
FXfloat | getLineSize () const |
void | setLineSize (FXfloat ps) |
const FXGLColor & | getColor () const |
void | setColor (const FXGLColor &col) |
void | setColorGenerator (ColorGeneratorFunc func, void *data=0) |
virtual void | bounds (FXRangef &box) |
virtual void | draw (FXGLViewer *viewer) |
virtual void | hit (FXGLViewer *viewer) |
virtual FXGLObject * | copy () |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
long | onDNDDrop (FXObject *, FXSelector, void *) |
long | onDNDMotion (FXObject *, FXSelector, void *) |
long | onQueryTip (FXObject *, FXSelector, void *) |
long | onCmdShadeOff (FXObject *, FXSelector, void *) |
long | onUpdShadeOff (FXObject *, FXSelector, void *) |
long | onCmdShadeOn (FXObject *, FXSelector, void *) |
long | onUpdShadeOn (FXObject *, FXSelector, void *) |
long | onCmdShadeSmooth (FXObject *, FXSelector, void *) |
long | onUpdShadeSmooth (FXObject *, FXSelector, void *) |
long | onCmdFrontMaterial (FXObject *, FXSelector, void *) |
long | onUpdFrontMaterial (FXObject *, FXSelector, void *) |
long | onCmdBackMaterial (FXObject *, FXSelector, void *) |
long | onUpdBackMaterial (FXObject *, FXSelector, void *) |
long | onCmdDrawingStyle (FXObject *, FXSelector, void *) |
long | onUpdDrawingStyle (FXObject *, FXSelector, void *) |
virtual FXbool | canDrag () const |
virtual FXbool | canDelete () const |
virtual FXbool | drag (FXGLViewer *viewer, FXint fx, FXint fy, FXint tx, FXint ty) |
FXuint | getOptions () const |
void | setOptions (FXuint opts) |
void | setTipText (const FXString &text) |
const FXString & | getTipText () const |
void | setMaterial (FXint side, const FXMaterial &mtl) |
void | getMaterial (FXint side, FXMaterial &mtl) const |
const FXVec3f & | getPosition () const |
void | setPosition (const FXVec3f &pos) |
virtual FXGLObject * | identify (FXuint *path) |
virtual long | onDefault (FXObject *, FXSelector, void *) |
const FXchar * | getClassName () const |
bool | isMemberOf (const FXMetaClass *metaclass) const |
virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
QTransString | tr (const char *text, const char *hint=0) |
virtual void * | getPythonObject () const |
virtual void | decouplePythonObject () const |
Static Public Member Functions | |
static void | RainbowGenerator (FXGLColor &color, FXGLVertices *obj, FXGLViewer *viewer, FXuint vertex, void *&data) |
static void | BrighterGenerator (FXGLColor &color, FXGLVertices *obj, FXGLViewer *viewer, FXuint vertex, void *&data) |
static void | DarkerGenerator (FXGLColor &color, FXGLVertices *obj, FXGLViewer *viewer, FXuint vertex, void *&data) |
Protected Member Functions | |
void | drawbox () |
void | drawhandles () |
Protected Attributes | |
FXuchar | modified |
FXuint | displayLists |
FXuint | vertexNumber |
FXVec3f * | vertices |
FXfloat | pointSize |
FXfloat | lineSize |
FXGLColor | color |
ColorGeneratorFunc | colorGenerator |
void * | colorGeneratorData |
FXVec3f | position |
FXMaterial | material [2] |
FXRangef | range |
FXuint | options |
FXString | tip |
FX::FXGLVertices::FXGLVertices | ( | FXfloat | x, | |
FXfloat | y, | |||
FXfloat | z, | |||
FXuint | opts = VERTICES_POINTS , |
|||
FXVec3f * | vertices = NULL , |
|||
FXuint | no = 0 , |
|||
FXfloat | pointSize = 4.0f , |
|||
FXfloat | lineSize = 1.0f | |||
) |
Construct with specified origin and options.
FX::FXGLVertices::FXGLVertices | ( | const FXGLVertices & | orig | ) |
Copy constructor.
void FX::FXGLVertices::setModified | ( | bool | v = true |
) | [inline] |
Sets if the representation of the vertices need recomputing.
FXuint FX::FXGLVertices::getNumberOfVertices | ( | ) | const [inline] |
Returns the number of vertices.
void FX::FXGLVertices::setNumberOfVertices | ( | FXuint | vertices | ) |
Sets the number of vertices.
FXVec3f* FX::FXGLVertices::getVertices | ( | ) | const [inline] |
Returns the vertices.
void FX::FXGLVertices::setVertices | ( | FXVec3f * | verts, | |
FXuint | no | |||
) |
Sets the vertices.
FXfloat FX::FXGLVertices::getPointSize | ( | ) | const [inline] |
Returns the point size.
void FX::FXGLVertices::setPointSize | ( | FXfloat | ps | ) |
Sets the point size.
FXfloat FX::FXGLVertices::getLineSize | ( | ) | const [inline] |
Returns the line size.
void FX::FXGLVertices::setLineSize | ( | FXfloat | ps | ) |
Sets the line size.
const FXGLColor& FX::FXGLVertices::getColor | ( | ) | const [inline] |
Returns the color.
void FX::FXGLVertices::setColor | ( | const FXGLColor & | col | ) |
Sets the color.
void FX::FXGLVertices::setColorGenerator | ( | ColorGeneratorFunc | func, | |
void * | data = 0 | |||
) |
Sets a color generation function.
virtual void FX::FXGLVertices::bounds | ( | FXRangef & | box | ) | [virtual] |
virtual void FX::FXGLVertices::draw | ( | FXGLViewer * | viewer | ) | [virtual] |
virtual void FX::FXGLVertices::hit | ( | FXGLViewer * | viewer | ) | [virtual] |
virtual FXGLObject* FX::FXGLVertices::copy | ( | ) | [virtual] |
virtual void FX::FXGLVertices::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXGLVertices::load | ( | FXStream & | store | ) | [virtual] |
static void FX::FXGLVertices::RainbowGenerator | ( | FXGLColor & | color, | |
FXGLVertices * | obj, | |||
FXGLViewer * | viewer, | |||
FXuint | vertex, | |||
void *& | data | |||
) | [static] |
Rainbow color generator. Generates RGB sweep.
static void FX::FXGLVertices::BrighterGenerator | ( | FXGLColor & | color, | |
FXGLVertices * | obj, | |||
FXGLViewer * | viewer, | |||
FXuint | vertex, | |||
void *& | data | |||
) | [static] |
Brighter color generator. Goes from black up to getColor().
static void FX::FXGLVertices::DarkerGenerator | ( | FXGLColor & | color, | |
FXGLVertices * | obj, | |||
FXGLViewer * | viewer, | |||
FXuint | vertex, | |||
void *& | data | |||
) | [static] |
Darker color generator. Goes from getColor() to black.
virtual FXbool FX::FXGLShape::canDrag | ( | ) | const [virtual, inherited] |
virtual FXbool FX::FXGLShape::canDelete | ( | ) | const [virtual, inherited] |
virtual FXbool FX::FXGLShape::drag | ( | FXGLViewer * | viewer, | |
FXint | fx, | |||
FXint | fy, | |||
FXint | tx, | |||
FXint | ty | |||
) | [virtual, inherited] |
FXuint FX::FXGLShape::getOptions | ( | ) | const [inline, inherited] |
Gets the options.
void FX::FXGLShape::setOptions | ( | FXuint | opts | ) | [inline, inherited] |
Sets the options.
void FX::FXGLShape::setTipText | ( | const FXString & | text | ) | [inline, inherited] |
Set the tool tip message for this object.
const FXString& FX::FXGLShape::getTipText | ( | ) | const [inline, inherited] |
Get the tool tip message for this object.
void FX::FXGLShape::setMaterial | ( | FXint | side, | |
const FXMaterial & | mtl | |||
) | [inherited] |
Set the material for specified side (where side = 0 or 1).
void FX::FXGLShape::getMaterial | ( | FXint | side, | |
FXMaterial & | mtl | |||
) | const [inherited] |
Get the material for specified side (where side = 0 or 1).
const FXVec3f& FX::FXGLShape::getPosition | ( | ) | const [inline, inherited] |
Get the origin of the object.
void FX::FXGLShape::setPosition | ( | const FXVec3f & | pos | ) | [inherited] |
Set the origin of the object.
virtual FXGLObject* FX::FXGLObject::identify | ( | FXuint * | path | ) | [virtual, inherited] |
virtual long FX::FXObject::onDefault | ( | FXObject * | , | |
FXSelector | , | |||
void * | ||||
) | [virtual, inherited] |
Called for unhandled messages.
Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.
const FXchar* FX::FXObject::getClassName | ( | ) | const [inherited] |
Get class name of some object.
bool FX::FXObject::isMemberOf | ( | const FXMetaClass * | metaclass | ) | const [inherited] |
Check if object is member of metaclass.
virtual long FX::FXObject::tryHandle | ( | FXObject * | sender, | |
FXSelector | sel, | |||
void * | ptr | |||
) | [virtual, inherited] |
Try handle message safely.
QTransString FX::FXObject::tr | ( | const char * | text, | |
const char * | hint = 0 | |||
) | [inherited] |
Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)
virtual void* FX::FXObject::getPythonObject | ( | ) | const [inline, virtual, inherited] |
Returns the python object representing this instance (if created in python).
virtual void FX::FXObject::decouplePythonObject | ( | ) | const [inline, virtual, inherited] |
Causes decoupling of python object from this object (deletes self).