TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iGeometry Struct Referenceabstract
Inheritance diagram for iGeometry:
iUnknown

Detailed Description

Geometry base interface.

Public Member Functions

virtual eGeometryType GetType () const =0
 Geometry type. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Vertex and index array.

virtual iVertexArrayGetVertexArray () const =0
 Get the constant vertex array of this geometry. {Property}. More...
 
virtual iIndexArrayGetIndexArray () const =0
 Get the constant index array of this geometry. {Property}. More...
 

Generation and Extra data

virtual tBool Generate (eGeometryGenerate aGenerate, tF32 fEpsilon=niEpsilon4)=0
 Generate the specified things. More...
 
virtual tU32 GetNumFaces () const =0
 Get the number of face contained in the mesh. {Property}. More...
 
virtual void SetFacesSubsetsIDs (const tU32 *apIDs)=0
 Set the faces subset's IDs. More...
 
virtual const tU32GetFacesSubsetsIDs () const =0
 Get the faces subsets IDs. More...
 
virtual const tU32GetAdjacencyArray () const =0
 Get the adjacency array. More...
 

Subsets

virtual tU32 GetNumSubsets () const =0
 Get the number of subsets. {Property}. More...
 
virtual iGeometrySubsetGetSubset (tU32 aulIdx) const =0
 Get the subset at the specified index. More...
 
virtual tU32 GetSubsetIndex (tU32 aulID) const =0
 Get the index of the subset with the specified ID. More...
 
virtual iGeometrySubsetAddSubset (tU32 anID, tU32 anFirstIndex, tU32 anNumIndices, tU32 anMaterial)=0
 Add a subset. More...
 
virtual tBool RemoveSubset (tU32 aulIdx)=0
 Remove the subset at the given index. More...
 

Clonning.

virtual iGeometryClone (tGeometryCreateFlags aFlags, tFVF aFVF=0)=0
 Create a copy of this geometry. More...
 

Rendering

virtual tBool SetDrawOp (iDrawOperation *apDrawOp, tU32 aulSubsetIdx)=0
 Set the specified draw operation to draw the specified subset. More...
 

Optimization

virtual tBool Optimize (tGeometryOptimizeFlags aFlags)=0
 Optimize the mesh. More...
 

Member Function Documentation

virtual eGeometryType GetType ( ) const
pure virtual

Geometry type. {Property}.

virtual iVertexArray* GetVertexArray ( ) const
pure virtual

Get the constant vertex array of this geometry. {Property}.

virtual iIndexArray* GetIndexArray ( ) const
pure virtual

Get the constant index array of this geometry. {Property}.

virtual tBool Generate ( eGeometryGenerate  aGenerate,
tF32  fEpsilon = niEpsilon4 
)
pure virtual

Generate the specified things.

Parameters
aGenerateindicate what to generate.
fEpsilonspecifies that vertices that differ in position by less than epsilon should be treated as coincident.
Returns
eFalse if generation failed, else eTrue.
virtual tU32 GetNumFaces ( ) const
pure virtual

Get the number of face contained in the mesh. {Property}.

virtual void SetFacesSubsetsIDs ( const tU32 apIDs)
pure virtual

Set the faces subset's IDs.

Parameters
apIDsis an array of subset id, it must have a size of GetNumFaces().
Remarks
this is used by the rendering optimizer to generate subsets.
virtual const tU32* GetFacesSubsetsIDs ( ) const
pure virtual

Get the faces subsets IDs.

Returns
NULL if the no faces subset's IDs have been set, else return an array of GetNumFaces() subset's IDs. {NoAutomation}
virtual const tU32* GetAdjacencyArray ( ) const
pure virtual

Get the adjacency array.

Returns
NULL if the adjacency array hasn't been generated.
Remarks
The size of the adjacency array is 3*GetNumFaces() {NoAutomation}
virtual tU32 GetNumSubsets ( ) const
pure virtual

Get the number of subsets. {Property}.

virtual iGeometrySubset* GetSubset ( tU32  aulIdx) const
pure virtual

Get the subset at the specified index.

Returns
NULL if the index is invalid, else return a pointer to the subset at the specified index. {Property}
virtual tU32 GetSubsetIndex ( tU32  aulID) const
pure virtual

Get the index of the subset with the specified ID.

Returns
eInvalidHandle if a subset with the specified ID doesn't exists, else return the index of the first subset found that has the given ID. {Property}
virtual iGeometrySubset* AddSubset ( tU32  anID,
tU32  anFirstIndex,
tU32  anNumIndices,
tU32  anMaterial 
)
pure virtual

Add a subset.

virtual tBool RemoveSubset ( tU32  aulIdx)
pure virtual

Remove the subset at the given index.

Returns
eFalse if the subset index is invalid, else remove the subset and return eTrue.
virtual iGeometry* Clone ( tGeometryCreateFlags  aFlags,
tFVF  aFVF = 0 
)
pure virtual

Create a copy of this geometry.

Parameters
aFlagsare the creation flags of the new geometry.
aFVFif not NULL it's used as the new vertex format to use for the new geometry.
Returns
NULL if the new geometry can't be created, else return an instance of a new geometry.
virtual tBool SetDrawOp ( iDrawOperation apDrawOp,
tU32  aulSubsetIdx 
)
pure virtual

Set the specified draw operation to draw the specified subset.

virtual tBool Optimize ( tGeometryOptimizeFlags  aFlags)
pure virtual

Optimize the mesh.