User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - 3D - Mesh - TriMeshBodyC
 

  PUBLIC
TriMeshBodyC::TriMeshBodyC(void)
TriMeshBodyC::TriMeshBodyC(UIntT,UIntT)
TriMeshBodyC::TriMeshBodyC(const SArray1dC &,const SArray1dC &)
TriMeshBodyC::TriMeshBodyC(const SArray1dC &,const SArray1dC &,bool)
TriMeshBodyC::Copy(void) const
TriMeshBodyC::Vertices(void)
TriMeshBodyC::Vertices(void) const
TriMeshBodyC::Faces(void)
TriMeshBodyC::Faces(void) const
TriMeshBodyC::FlipTriangles(void)
TriMeshBodyC::Centroid(void) const
TriMeshBodyC::FaceIndexes(void) const
TriMeshBodyC::Index(const TriC &,int) const
TriMeshBodyC::Limits(Vector3dC &,Vector3dC &) const
TriMeshBodyC::UpdateVertexNormals(void)
TriMeshBodyC::OffsetScale(const Vector3dC &,RealT)
TriMeshBodyC::HaveTextureCoord(void) const
TriMeshBodyC::SetTextureCoord(bool)
RCBodyVC::Save(ostream &) const
RCBodyVC::Save(BinOStreamC &) const
RCBodyVC::Copy(void) const
RCBodyVC::DeepCopy(UIntT) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   TriMeshBodyC   
 
Tri mesh body.
 
include "Ravl/3D/TriMesh.hh"
User Level:Develop
Library:Ravl3D
In Scope:Ravl3DN

Comments:
This is designed to store meshes, and fast access for vertex and normal value. It is not really suitable for making changes to the mesh topology.

Parent Classes: Variables:
Methods:
TriMeshBodyC()

TriMeshBodyC(UIntT noVertices,UIntT noFaces)
Construct a mesh with a number of vertices and faces.
The inital values in the mesh are undefined.

TriMeshBodyC(const SArray1dC<Vector3dC> & v,const SArray1dC<UIntT> & faceInd)
Construct from an array of vertexes and an array of indexes.
The length of faceInd should be a power of 3, success triples are taken from it to form the faces in the mesh.

TriMeshBodyC(const SArray1dC<VertexC> & v,const SArray1dC<TriC> & nfaces,bool haveTextureCoord = false)
Construct from an array of vertexes and an array of tri's.
NOTE: The vertices referred to in the TriC's must be elements of array 'v'.

RCBodyVC & Copy() const
Make a copy of the mesh.

SArray1dC<VertexC> & Vertices()
Access a list of all vertices in the mesh.

const SArray1dC<VertexC> & Vertices() const
Access a list of all vertices in the mesh.

SArray1dC<TriC> & Faces()
Access array of triangles in the mesh.

const SArray1dC<TriC> & Faces() const
Access array of triangles in the mesh.

void FlipTriangles(void)
Flips the mesh surface

Vector3dC Centroid() const
Centre of triset.
- average vertex position

SArray1dC<UIntT> FaceIndexes() const
Create an array of faces indexes.
each successive triple of indexes represents a face in the mesh.

UIntT Index(const TriC & tri,int no) const
Find the index of a TriC's vertex.
no should be 0 to 2.

void Limits(Vector3dC & min,Vector3dC & max) const
Find largest and smallest for each compoent of all vertices.

void UpdateVertexNormals()
Recalculate vertex normals.

void OffsetScale(const Vector3dC & off,RealT scale)
Offset and Scale mesh by given values.

bool HaveTextureCoord() const
Do we have texture coordinates?

void SetTextureCoord(bool val)
Set have texture coordinates flag.

#include "Ravl/RCHandleV.hh"
bool Save(ostream & out) const
Save to stream 'out'.

bool Save(BinOStreamC & out) const
Save to binary stream 'out'.

RCBodyVC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002