User Documentation
RAVL, Recognition And Vision Library
Ravl - 3D - Mesh - TriMeshC

TriMeshC::TriMeshC(const SArray1dC &,const SArray1dC &)
TriMeshC::TriMeshC(const SArray1dC &,const SArray1dC &,bool)
TriMeshC::Copy(void) const
TriMeshC::Vertices(void) const
TriMeshC::Faces(void) const
TriMeshC::Centroid(void) const
TriMeshC::FaceIndexes(void) const
TriMeshC::Index(const TriC &,int) const
TriMeshC::Limits(Vector3dC &,Vector3dC &) const
TriMeshC::OffsetScale(const Vector3dC &,RealT)
TriMeshC::HaveTextureCoord(void) const
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

Triangular 3d mesh.
include "Ravl/3D/TriMesh.hh"
User Level:Normal
In Scope:Ravl3DN

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: Methods:
Default constructor.
Creates an invalid handle.

TriMeshC(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.

TriMeshC(const SArray1dC<VertexC> & v,const SArray1dC<TriC> & nfaces,bool haveTextureCoord = false)
Construct from an array of vertexes and an array of tri's.
The TriC's must refer to elements in 'v'

TriMeshC(UIntT noVertices,UIntT noFaces)

TriMeshC 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.

void UpdateVertexNormals()
Recalculate vertex normals.

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 OffsetScale(const Vector3dC & off,RealT scale)
Offset and Scale mesh by given values.

bool HaveTextureCoord() const
Do we have texture co-ordinates?

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

#include "Ravl/RefCounter.hh"
const RCHandleC<TriMeshBodyC> & operator =(const RCHandleC<TriMeshBodyC> & oth)
Assign handle.

RCHandleC<TriMeshBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<TriMeshBodyC> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<TriMeshBodyC> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<TriMeshBodyC> & obj)

istream & operator >>(istream & strm,RCHandleC<TriMeshBodyC> & obj)

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