golib  0.5
goOFFFile Class Reference

Public Member Functions

virtual bool read (const char *filename)
 
bool removeDoubles ()
 
bool align ()
 
const goMath::VectorfgetMin () const
 
const goMath::VectorfgetMax () const
 
goFixedArray< goMath::Vectorf > & getVertices ()
 
goFixedArray< goMath::Vector< int > > & getFaces ()
 
const goFixedArray< goMath::Vectorf > & getVertices () const
 
const goFixedArray< goMath::Vector< int > > & getFaces () const
 
void getAdjacencyLists (goFixedArray< goList< int > > &ret) const
 Build adjacency lists for all vertices of this object. More...
 
void getAdjacentFaces (goFixedArray< goList< int > > &ret) const
 For each vertex, compute the list of faces it is contained in. More...
 
void calculateNormals (goMath::Matrixf &normals) const
 This is very slow – calculate normals for all vertices. More...
 
void calculateFaceNormals (goMath::Matrixf &face_normals) const
 Calculate a normal for each face. More...
 
- Public Member Functions inherited from goObjectBase
 goObjectBase ()
 Constructor.
 
virtual ~goObjectBase ()
 Destructor. More...
 
const char * getClassName () const
 Returns the class name. More...
 
int getClassID () const
 
virtual goSize_t memoryUsage () const
 Returns the size of this object or some measure of its memory consumption. More...
 
void setObjectName (const char *name)
 Set name string for an object. More...
 
void setObjectName (const goString &name)
 Set name string for an object. More...
 
const goStringgetObjectName () const
 Get the object name. More...
 
virtual bool writeObjectFile (FILE *) const
 Write object to a file. More...
 
virtual bool readObjectFile (FILE *)
 Read object from a file. More...
 
void connectObject (goObjectBase *object)
 Connects an object to this object. More...
 
void disconnectObject (const goObjectBase *object)
 Disconnects an object from this object.
 
virtual bool callObjectMethod (int methodID, goObjectMethodParameters *param=NULL)
 Call an object method by identifier. More...
 
virtual bool queueObjectMethod (int methodID, goObjectMethodParameters *param=NULL, bool blocking=false)
 Enqueue a method call to an internal list of methods. More...
 
bool callQueuedMethods ()
 Call all queued methods. More...
 

Additional Inherited Members

- Protected Member Functions inherited from goObjectBase
void setClassID (int id)
 Sets the class name.
 
void printClassMessage (const char *msg)
 Sets the class name. More...
 
void printClassMessage (goString &msg)
 Prints an informational message to the calling console. More...
 
void sendObjectMessage (int messageID, void *data=NULL)
 Sends a message to all connected objects.
 
void sendObjectMessage (goObjectBase *object, int messageID, void *data=NULL)
 Sends a message to a specific object.
 
virtual void receiveObjectMessage (const goObjectMessage &message)
 Receive a message. More...
 

Member Function Documentation

◆ calculateFaceNormals()

void goOFFFile::calculateFaceNormals ( goMath::Matrixf face_normals) const

Calculate a normal for each face.

Parameters
face_normalsContains the face normals, on return.

◆ calculateNormals()

void goOFFFile::calculateNormals ( goMath::Matrixf normals) const

This is very slow – calculate normals for all vertices.

Parameters
normalsNormals for each vertex.

◆ getAdjacencyLists()

void goOFFFile::getAdjacencyLists ( goFixedArray< goList< int > > &  ret) const

Build adjacency lists for all vertices of this object.

Note
The adjacency lists contain the graph structure only for triangular meshes. For quadrilaterals, also the diagonal points are added as being adjacent.

◆ getAdjacentFaces()

void goOFFFile::getAdjacentFaces ( goFixedArray< goList< int > > &  ret) const

For each vertex, compute the list of faces it is contained in.

Parameters
retFor each vertex, contains the list of faces the vertex is contained in.

The documentation for this class was generated from the following files: