Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
CTriSetC::CTriSetC(void)
CTriSetC::CTriSetC(IntT,IntT,BooleanT)
CTriSetC::CTriSetC(TriSetC,BooleanT)
CTriSetC::CTriSetC(FilenameC)
CTriSetC::Textured(void) const
CTriSetC::TextureFile(void) const
CTriSetC::SetTextureFile(StringC)
CTriSetC::TexturePerVertex(void) const
CTriSetC::SetTexturePerVertex(BooleanT)
CTriSetC::VertexTextureCoord(const IntT,const IntT) const
CTriSetC::SetVertexTextureCoord(const IntT,const Point2dC &,const IntT)
CTriSetC::GenerateTexCoords(void)
CTriSetC::FitTexCoords(const BaseImageC &)
CTriSetC::SaveVRML(FilenameC)
CTriSetC::SaveVRML(FilenameC,Vector3dC,Vector3dC)
CTriSetC::SaveCTri(FilenameC) const
CTriSetC::CTriSetC(BodyCTriSetC &)
TriSetC::Copy(void) const
TriSetC::PutVertex(const IndexT,const Vector3dC)
TriSetC::PutElement(const IndexT,const TriC)
TriSetC::NumVertex(void) const
TriSetC::NumElement(void) const
TriSetC::Vertex(const IndexT)
TriSetC::Vertex(const IndexT) const
TriSetC::Element(const IntT) const
TriSetC::Element(const IndexT)
TriSetC::PElement(const IndexT)
TriSetC::Save(FilenameC)
TriSetC::SaveVRML(FilenameC)
TriSetC::Length(const IntT,const IntT)
TriSetC::AverageEdgeLength(void)
TriSetC::MinimumEdgeLength(void)
TriSetC::ConstrainEdgeLength(const RealT)
TriSetC::ConstrainNormals(const Vector3dC)
TriSetC::AverageNormal(void)
TriSetC::VertexNormal(const IndexT)
TriSetC::SurfaceNormal(RealT,RealT,IndexT)
TriSetC::Limits(Vector3dC &,Vector3dC &)
TriSetC::IsSetupBound(void) const
TriSetC::SetupBound(void)
TriSetC::Transform(RigidTransC &)
TriSetC::Centroid(void)
TriSetC::TransformAboutCentroid(RigidTransC &)
TriSetC::ExportPolops(void) const
TriSetC::operator<<(ostream &,const BodyTriSetC &)
RCHandleAC::Abstract(void)
RCHandleAC::IsHandleType(const DT &) const
RCHandleAC::CheckHandleType(const DT &) const
RCHandleAC::Save(ostream &) const
RCHandleAC::Copy(void) const
RCHandleC::IsValid(void) const
RCHandleC::IsValidObject(void) const
RCHandleC::operator=(const RCHandleC &)
RCHandleC::operator==(const RCHandleC &) const
RCHandleC::operator!=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsConst(void) const
RCHandleC::IsNotConst(void) const
RCHandleC::SetConst(void) const
RCHandleC::Invalidate(void)
RCHandleC::Body(void)
RCHandleC::Body(void) const
CTriSetC
 
Coloured (textured) TriSet
 
include "amma/CTriSet.hh"
User Level:Default
Library:tri
Example: cri.cc
Section:3D Surface.Polyhedral Representation
In Scope:std

Comments:
CTriSetC class adds an image filename and texture coordinates to TriSetC.

Parent Classes: Methods:
CTriSetC()
Default constructor

CTriSetC(IntT nvertex,IntT nelement,BooleanT bTexturePerVertex = true)
Constructor
Construct a colour triset with nvertex vertices and nelement triangles. If bTexturePerVertex is true, each vertex has one texture coordinate. Otherwise, each face has three texture coordinates

CTriSetC(TriSetC triset,BooleanT bTexturePerVertex = true)
Construct from TriSetC (no copy)
If bTexturePerVertex is true, each vertex has one texture coordinate. Otherwise, each face has three texture coordinates

CTriSetC(FilenameC filename)
Construct from a .ctri file

Access Functions


BooleanT Textured() const
Is the mesh textured already?
Returns true if the mesh has got texture coordinates.

StringC TextureFile() const
Access to texture file
Returns the name of the texture file associated with this object.

void SetTextureFile(StringC filename)
Set texture filename

BooleanT TexturePerVertex() const
Access to m_bTexturePerVertex value
Returns true if the model has one texture coordinate per vertex, and false if it has three per face.

void SetTexturePerVertex(BooleanT bTexturePerVertex)
Set whether textures are done per vertex or per face.
WARNING: If this function changes the behaviour of the CTriSetC, it will destroy all current texture coordinates.

Point2dC VertexTextureCoord(const IntT vertex,const IntT face = 0) const
Get a texture coordinate
Returns texture coordinate for vertex on face. If texturing is done per vertex, the value of the texture coord for the vertex is returned and the face parameter is not used.

void SetVertexTextureCoord(const IntT vertex,const Point2dC & coord,const IntT face = 0)
Set a texture coordinate
Sets texture coordinate for vertex on face. If texturing is done per vertex, the value of the texture coord for the vertex is returned and the face parameter is not used. Coordinate should be in the range [0,1]

BooleanT GenerateTexCoords(void)
Automatically generates texture coordinates.
This function will only execute if the CTriSetC is textured per triangle, not per vertex, and if it does not already have texture coordinates. It returns true if it succeeds, false if it fails.

void FitTexCoords(const BaseImageC & img)
Alter texture coordinates to lie on pixel centres in the passed image

Load/Save Functions


void SaveVRML(FilenameC filename)
Save as VRML 2.0
Save as a texture mapped mesh scaled to maximum size =1

void SaveVRML(FilenameC filename,Vector3dC translation,Vector3dC scale)
Save as VRML 2.0
Save as a texture mapped mesh with translation & scale as specified

void SaveCTri(FilenameC filename) const
Save in CTri format

CTriSetC(BodyCTriSetC & bod)
Body contructor.

#include "amma/TriSet.hh"
TriSetC Copy() const
new physical copy
-------------------------------------------- Load Empty

void PutVertex(const IndexT iIndex,const Vector3dC v)
Put a vertex into structure.

void PutElement(const IndexT iIndex,const TriC t)
Put an element into structure.
--------------------------------------------- Access

IntT NumVertex() const
Access the number of vertices in the TriSet

IntT NumElement() const
Access the number of triangles in the TriSet

Vector3dC & Vertex(const IndexT iIndex)
Access to a particular vertex position

Vector3dC Vertex(const IndexT iIndex) const
Const access to a particular vertex position

const TriC & Element(const IntT iIndex) const
TriC& Element(const IntT index); does not guarantee pointers access i^th element

TriC & Element(const IndexT iIndex)

TriC * PElement(const IndexT iIndex)
pointer to ith element CAUTION - should return ref counter iterator... use in TriSet3to2 --------------------------------------------- Operations

void Save(FilenameC filename)
save to file 'name' in .tri format

void SaveVRML(FilenameC filename)
save vrml 2 format (geometry only)

RealT Length(const IntT i1,const IntT i2)

RealT AverageEdgeLength()

RealT MinimumEdgeLength()

void ConstrainEdgeLength(const RealT maximum_edge_length)
constrain the edge lenght of this triset to 'maximum_edge_length'

void ConstrainNormals(const Vector3dC common_normal)
constrain all element normals to be in orientation as 'common_normal' ie not >90 to common_normal

Vector3dC AverageNormal()
average element normal

Vector3dC VertexNormal(const IndexT iIndex)
return vertex normal (setup an internal array of vertex normals)

Vector3dC SurfaceNormal(RealT dAlpha,RealT dBeta,IndexT iElement)
Return an interpolated surface normal
dAlpha and dBeta are barycentric coordinates of a point on iElement. The returned vector is the interpolated normal at this point.

void Limits(Vector3dC & xmin,Vector3dC & xmax)
bounding volume in 3D

BooleanT IsSetupBound() const
returns setup status of bound

void SetupBound()
Setup boundary information for each TriC Element (call in constructor)

void Transform(RigidTransC & transform)
Rigid transform of all verticies

Vector3dC Centroid()
Centre of triset - average vertex position

void TransformAboutCentroid(RigidTransC & transform)
Rigid transform of all verticies - for rotation about centroid i) triset is translated so that centroid = origin ii) transform is applied iii) inverse of step (i) is applied

PolopsC ExportPolops() const
Export to polops.

ostream & operator<<(ostream & s,const BodyTriSetC & t)

#include "amma/RCHandleA.hh"
RCAbstractC Abstract()
Create an abstract handle to this object.

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

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

BooleanT Save(ostream & out) const
Save to ostream.

RCHandleAC<BodyTriSetC> Copy() const
Creat a deep copy of this object.
protected:

#include "amma/RCHandle.hh"
BooleanT IsValid() const
Check its a valid handle.

BooleanT IsValidObject() const
Check its a valid handle, and that the object is pointed to is also valid.

RCHandleC<BodyTriSetC> & operator=(const RCHandleC<BodyTriSetC> & oth)
Assignment.

BooleanT operator==(const RCHandleC<BodyTriSetC> & oth) const
Comparison operator.

BooleanT operator!=(const RCHandleC<BodyTriSetC> & oth) const
Comparison operator.

UIntT Hash() const
Hash function.x

BooleanT IsConst() const
Is object constant ?

BooleanT IsNotConst() const
Is object not constant ?

void SetConst(void) const
Lock the object.
This is const as a convience though it actual modified the object, often object you wish to ensure are constant already have const set. protected:

void Invalidate()
Turn this into an invalid handle.

BodyTriSetC & Body()
Direct access to body.

const BodyTriSetC & Body() const
Constant access to body.


Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001