Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXGLTriangleMesh Class Reference

#include <FXGLTriangleMesh.h>

Inheritance diagram for FX::FXGLTriangleMesh:
FX::FXGLShape FX::FXGLObject FX::FXObject

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 FXGLObjectcopy ()
 
void setVertexNumber (FXint nvertices)
 
FXint getVertexNumber () const
 
void setVertexBuffer (FXfloat *vertices)
 
FXfloatgetVertexBuffer () const
 
void setColorBuffer (FXfloat *colors)
 
FXfloatgetColorBuffer () const
 
void setNormalBuffer (FXfloat *normals)
 
FXfloatgetNormalBuffer () const
 
void setTextureCoordBuffer (FXfloat *textures)
 
FXfloatgetTextureCoordBuffer () const
 
virtual void save (FXStream &store) const
 
virtual void load (FXStream &store)
 
virtual ~FXGLTriangleMesh ()
 
- Public Member Functions inherited from FX::FXGLShape
 FXGLShape (FXfloat x, FXfloat y, FXfloat z, FXuint opts)
 
 FXGLShape (FXfloat x, FXfloat y, FXfloat z, FXuint opts, const FXMaterial &front, const FXMaterial &back)
 
 FXGLShape (const FXGLShape &orig)
 
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)
 
void setTipText (const FXString &text)
 
const FXStringgetTipText () const
 
void setMaterial (FXint side, const FXMaterial &mtl)
 
void getMaterial (FXint side, FXMaterial &mtl) const
 
- Public Member Functions inherited from FX::FXGLObject
 FXGLObject ()
 
 FXGLObject (const FXGLObject &orig)
 
virtual FXGLObjectidentify (FXuint *path)
 
virtual ~FXGLObject ()
 
- Public Member Functions inherited from FX::FXObject
virtual long onDefault (FXObject *, FXSelector, void *)
 
const FXchargetClassName () const
 
bool isMemberOf (const FXMetaClass *metaclass) const
 
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 
virtual ~FXObject ()
 

Additional Inherited Members

- Public Types inherited from FX::FXGLObject
enum  { ID_LAST =10000 }
 

Detailed Description

OpenGL Triangle Mesh Object.

Constructor & Destructor Documentation

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.

Member Function Documentation

virtual FXGLObject* FX::FXGLTriangleMesh::copy ( )
virtual

Copy this object.

Reimplemented from FX::FXGLShape.

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

Save to a stream.

Reimplemented from FX::FXGLShape.

virtual void FX::FXGLTriangleMesh::load ( FXStream store)
virtual

Load from a stream.

Reimplemented from FX::FXGLShape.

Copyright © 1997-2005 Jeroen van der Zijp