#include <FXGLTriangleMesh.h>
Public Types | |
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 | |
FXGLTriangleMesh (FXfloat x, FXfloat y, FXfloat z, FXint nv, FXfloat *v, FXfloat *n=NULL, FXfloat *c=NULL, FXfloat *t=NULL) | |
FXGLTriangleMesh (FXfloat x, FXfloat y, FXfloat z, FXint nv, FXfloat *v, FXfloat *n, FXfloat *c, FXfloat *t, const FXMaterial &mtl) | |
FXGLTriangleMesh (const FXGLTriangleMesh &orig) | |
virtual FXGLObject * | copy () |
void | setVertexNumber (FXint nvertices) |
FXint | getVertexNumber () const |
void | setVertexBuffer (FXfloat *vertices) |
FXfloat * | getVertexBuffer () const |
void | setColorBuffer (FXfloat *colors) |
FXfloat * | getColorBuffer () const |
void | setNormalBuffer (FXfloat *normals) |
FXfloat * | getNormalBuffer () const |
void | setTextureCoordBuffer (FXfloat *textures) |
FXfloat * | getTextureCoordBuffer () const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXGLTriangleMesh () |
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 void | bounds (FXRangef &box) |
virtual void | draw (FXGLViewer *viewer) |
virtual void | hit (FXGLViewer *viewer) |
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 |
Protected Member Functions | |
virtual void | drawshape (FXGLViewer *viewer) |
virtual void | recomputerange () |
virtual void | generatenormals () |
void | drawbox () |
void | drawhandles () |
Protected Attributes | |
FXVec3f | position |
FXMaterial | material [2] |
FXRangef | range |
FXuint | options |
FXString | tip |
FX::FXGLTriangleMesh::FXGLTriangleMesh | ( | FXfloat | x, | |
FXfloat | y, | |||
FXfloat | z, | |||
FXint | nv, | |||
FXfloat * | v, | |||
FXfloat * | n = NULL , |
|||
FXfloat * | c = NULL , |
|||
FXfloat * | t = NULL | |||
) |
Construct triangle mesh with nv vertices, and optional normals, colors, and texture coordinates.
FX::FXGLTriangleMesh::FXGLTriangleMesh | ( | FXfloat | x, | |
FXfloat | y, | |||
FXfloat | z, | |||
FXint | nv, | |||
FXfloat * | v, | |||
FXfloat * | n, | |||
FXfloat * | c, | |||
FXfloat * | t, | |||
const FXMaterial & | mtl | |||
) |
Construct triangle mesh with nv vertices, and optional normals, colors, and texture coordinates, and surface material.
FX::FXGLTriangleMesh::FXGLTriangleMesh | ( | const FXGLTriangleMesh & | orig | ) |
Copy constructor.
virtual FX::FXGLTriangleMesh::~FXGLTriangleMesh | ( | ) | [virtual] |
Destructor.
virtual FXGLObject* FX::FXGLTriangleMesh::copy | ( | ) | [virtual] |
void FX::FXGLTriangleMesh::setVertexNumber | ( | FXint | nvertices | ) | [inline] |
Change number of vertices.
FXint FX::FXGLTriangleMesh::getVertexNumber | ( | ) | const [inline] |
Get number of vertices.
void FX::FXGLTriangleMesh::setVertexBuffer | ( | FXfloat * | vertices | ) |
Set vertex buffer.
FXfloat* FX::FXGLTriangleMesh::getVertexBuffer | ( | ) | const [inline] |
Get vertex buffer.
void FX::FXGLTriangleMesh::setColorBuffer | ( | FXfloat * | colors | ) | [inline] |
Set color buffer.
FXfloat* FX::FXGLTriangleMesh::getColorBuffer | ( | ) | const [inline] |
Get color buffer.
void FX::FXGLTriangleMesh::setNormalBuffer | ( | FXfloat * | normals | ) | [inline] |
Set normals buffer.
FXfloat* FX::FXGLTriangleMesh::getNormalBuffer | ( | ) | const [inline] |
Get normals buffer.
void FX::FXGLTriangleMesh::setTextureCoordBuffer | ( | FXfloat * | textures | ) | [inline] |
Set texture coordinate buffer.
FXfloat* FX::FXGLTriangleMesh::getTextureCoordBuffer | ( | ) | const [inline] |
Get texture coordinate buffer.
virtual void FX::FXGLTriangleMesh::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXGLTriangleMesh::load | ( | FXStream & | store | ) | [virtual] |
virtual void FX::FXGLShape::bounds | ( | FXRangef & | box | ) | [virtual, inherited] |
Called by the viewer to get bounds for this object.
Reimplemented from FX::FXGLObject.
Reimplemented in FX::FXGLVertices.
virtual void FX::FXGLShape::draw | ( | FXGLViewer * | viewer | ) | [virtual, inherited] |
virtual void FX::FXGLShape::hit | ( | FXGLViewer * | viewer | ) | [virtual, inherited] |
Draw this object for hit-testing purposes.
Reimplemented from FX::FXGLObject.
Reimplemented in FX::FXGLVertices.
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).