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

  PUBLIC
TriMeshC::TriMeshC(void)
TriMeshC::TriMeshC(const SArray1dC &,const SArray1dC &)
TriMeshC::TriMeshC(const SArray1dC &,const SArray1dC &,bool)
TriMeshC::TriMeshC(UIntT,UIntT)
TriMeshC::Copy(void) const
TriMeshC::Vertices(void)
TriMeshC::Vertices(void) const
TriMeshC::Faces(void)
TriMeshC::Faces(void) const
TriMeshC::FlipTriangles(void)
TriMeshC::Centroid(void) const
TriMeshC::FaceIndexes(void) const
TriMeshC::UpdateVertexNormals(void)
TriMeshC::Index(const TriC &,int) const
TriMeshC::Limits(Vector3dC &,Vector3dC &) const
TriMeshC::OffsetScale(const Vector3dC &,RealT)
TriMeshC::HaveTextureCoord(void) const
TriMeshC::SetTextureCoord(bool)
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::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   TriMeshC   
 
Triangular 3d mesh.
 
include "Ravl/3D/TriMesh.hh"
User Level:Normal
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: Methods:
TriMeshC()
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