|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
Set of triangles: list of 3D vertex + list of TriC
Parent Classes:
Derived Classes:
Methods:
- TriSetC()
-
Constructor.
empty triset
- TriSetC(const IntT nvertex,const IntT nelement)
-
create an empty TriSetC with space allocated
to put 'nvertex' verticies and 'nelement' triangles
- TriSetC(FilenameC filename)
-
load file in .tri format
(triangles only, index 0..N-1)
- TriSetC(SArray1dC<Vector3dC> v,SArray1dC<TriC> e)
-
Construct from an array of vectors and one of tri's.
- TriSetC(const PolopsC & Oth)
-
Construct from Polops.
- 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)
-
- 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:
- 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:48:08 2001
|